Version 2 vs 7
Version 2 vs 7
Content Changes
Content Changes
=== User Data Location ===
* {icon linux} `~/.config/unity3d/IronGate/Valheim`
* {icon windows} `%USERDIR%\AppData\LocalLow\IronGate\Valheim\Dedicated` maybe?
=== Dedicated Server Setup ===
# In {nav icon=steam, name=Steam}, show the "Tools" in your Library, and install {nav Valheim Dedidicated Server}
# It should now be installed to something like `~/.steam/steam/steamapps/common/Valheim dedicated server/`
# In that folder, you //could// make a copy of `start_server.sh` or `start_server.bat` and edit it for what you need
Example script:
```
lang=bash
export templdpath=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH
export SteamAppId=892970
echo "Starting server PRESS CTRL-C to exit"
# Tip: Make a local copy of this script to avoid it being overwritten by steam.
# NOTE: Minimum password length is 5 characters & Password cant be in the server name.
# NOTE: You need to make sure the ports 2456-2458 is being forwarded to your server through your local router & firewall.
./valheim_server.x86_64 -name "keithzg's server" -port 2456 -world "KeithZGsServer" -password "Zomboat!" -public 1
export LD_LIBRARY_PATH=$templdpath
```
But, better yet, make a systemd unit file like so:
```
lang=ini, name=/etc/systemd/system/valheim.service
### Configuration
[Unit]
Description=Valheim Dedicated Server
[Service]
# Using my own user account and Steam install
User=keithzg
Group=keithzg
WorkingDirectory=/home/keithzg/.steam/steam/steamapps/common/Valheim dedicated server
# Same library setup as the shellscript does
Environment=LD_LIBRARY_PATH="/home/keithzg/.steam/steam/steamapps/common/Valheim dedicated server/linux64":$LD_LIBRARY_PATH
# While we're (for now) using the Steam-installed copy of the dedicated server, we've copied the savefiles to /opt/valheim/savedir to be written to there, so that Steam's cloud saves don't wreck havoc or such.
ExecStart="/home/keithzg/.steam/steam/steamapps/common/Valheim dedicated server/valheim_server.x86_64" -name "keithzg" -port 2456 -world "KeithZGsFirstWorld" -password "Zomboat!" -public 1 -savedir /opt/valheim/savedir
# By default, systemd send SIGTERM to services when stopping them. This appears to at least sometimes cause Valheim to not save! Lets specify use of a more polite signal.
KillSignal=SIGINT
[Install]
# Lazy way to ensure it starts when things should be ready
WantedBy=multi-user.target
```
=== External Documentation ===
* [[ https://valheim.fandom.com/wiki/ | Valheim Wiki ]]
** [[ https://valheim.fandom.com/wiki/Hosting_Servers | Hosting Servers ]]
=== User Data Location ===
* {icon linux} `~/.config/unity3d/IronGate/Valheim`
* {icon windows} `%USERDIR%\AppData\LocalLow\IronGate\Valheim\` maybe?
----
=== Non-obvious Keyboard Commands ===
Many are rebindable but if you're like me or @pwrightlindl, you won't even look at the on-screen text (you should though, hella useful).
* {key ctrl F3} toggles the HUD, so you can take sweet screenshots.
* {key x} sits down, so you can chill at a campfire.
* {key F2} toggles a diagnostics display, showing things like your ping and FPS.
=== Performance ==
On {nav icon=windows, name=Windows}, when you start the game you should get a {nav icon=steam, name=Steam} popup asking if you want to run it in Vulkan. If you're on an NVIDIA GPU, you'll probably //not// want to run it under Vulkan. If you have a reasonably recent Radeon GPU it should be fine?
You also may need to go {nav icon=steam, name=Steam > right-click Valheim > Properties... > General > Launch Options} and put in the following text to force exclusive fullscreen:
`-window-mode exclusive -screen-fullscreen`
You may still have to press {key alt enter} twice to toggle it into actual fullscreen. This is all via [[ https://www.reddit.com/r/valheim/comments/lwria0/huge_fps_boost_from_50_to_90110_for_me/ | some bloke on Reddit ]]; on @keithzg's Radeon system none of the above resulted in an appreciable FPS change.
On {nav icon=linux, name=Linux}, you are instead offered "Play Valheim" and "Play Valheim using OpenGL". The first option //is// Vulkan, and it works fine for @keithzg at least.
----
=== Dedicated Server Setup ===
Want to run your own dedicated server? Well, the laziest way is to install letting Steam handle things:
# In {nav icon=steam, name=Steam}, show the "Tools" in your Library, and install {nav Valheim Dedidicated Server}
# It should now be installed to something like `~/.steam/steam/steamapps/common/Valheim dedicated server/`
Better is to use `steamcmd` so it can be managed without a GUI (y'all nerds know what I mean)
# `steamcmd +login anonymous +force_install_dir /opt/valheim/bin +app_update 896660 validate +exit`
** Re-run this command to update the installation
Whichever method you chose, in the resulting install folder, you //could// make a copy of `start_server.sh` or `start_server.bat` and edit it for what you need. That's the officially suggested approach. But, better yet, make a systemd unit file like so:
```
lang=ini, name=/etc/systemd/system/valheim.service
### Configuration
[Unit]
Description=Valheim Dedicated Server
[Service]
# Using my own user account and Steam install
User=keithzg
Group=keithzg
WorkingDirectory=/home/keithzg/.steam/steam/steamapps/common/Valheim dedicated server
# Same library setup as the shellscript does
Environment=LD_LIBRARY_PATH="/home/keithzg/.steam/steam/steamapps/common/Valheim dedicated server/linux64":$LD_LIBRARY_PATH
# While we're (for now) using the Steam-installed copy of the dedicated server, we've copied the savefiles to /opt/valheim/savedir to be written to there, so that Steam's cloud saves don't wreck havoc or such.
ExecStart="/home/keithzg/.steam/steam/steamapps/common/Valheim dedicated server/valheim_server.x86_64" -name "keithzg" -port 2456 -world "KeithZGsFirstWorld" -password "Zomboat!" -public 1 -savedir /opt/valheim/savedir
# By default, systemd send SIGTERM to services when stopping them. This appears to at least sometimes cause Valheim to not save! Lets specify use of a more polite signal.
KillSignal=SIGINT
[Install]
# Lazy way to ensure it starts when things should be ready
WantedBy=multi-user.target
```
=== External Documentation ===
* [[ https://valheim.fandom.com/wiki/ | Valheim Wiki ]] but over on the server I have running we've mostly tried to just figure things out in-game
** [[ https://valheim.fandom.com/wiki/Hosting_Servers | Hosting Servers ]]
=== User Data Location ===
* {icon linux} `~/.config/unity3d/IronGate/Valheim`
* {icon windows} `%USERDIR%\AppData\LocalLow\IronGate\Valheim\Dedicated` maybe?
=== Dedicated Server Setup ===
# In {nav icon=steam, name=Steam}, show the "Tools" in your Library, and install {nav Valheim Dedidicated Server}
# It should now be installed to something like `~/.steam/steam/steamapps/common/Valheim dedicated server/`----
=== Non-obvious Keyboard Commands ===
# In that folderMany are rebindable but if you're like me or @pwrightlindl, you //could// make a copy of `start_server.sh` or `start_server.bat` and edit it for what you need
Example script:won't even look at the on-screen text (you should though, hella useful).
```
lang=bash* {key ctrl F3} toggles the HUD, so you can take sweet screenshots.
export templdpath=$LD_LIBRARY_PATH* {key x} sits down, so you can chill at a campfire.
export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH
export SteamAppId=892970
echo "Starting server PRESS CTRL-C to exit"* {key F2} toggles a diagnostics display, showing things like your ping and FPS.
# Tip: Make a local copy of this script to avoid it being overwritten by steam.=== Performance ==
# NOTE: Minimum password length is 5 characters & Password cant be in the server name.On {nav icon=windows, name=Windows}, when you start the game you should get a {nav icon=steam, name=Steam} popup asking if you want to run it in Vulkan. If you're on an NVIDIA GPU, you'll probably //not// want to run it under Vulkan. If you have a reasonably recent Radeon GPU it should be fine?
You also may need to go {nav icon=steam, name=Steam > right-click Valheim > Properties... > General > Launch Options} and put in the following text to force exclusive fullscreen:
# NOTE: You need to make sure the ports 2456-2458 is being forwarded to your server through your local router & firewall. `-window-mode exclusive -screen-fullscreen`
You may still have to press {key alt enter} twice to toggle it into actual fullscreen. This is all via [[ https://www.reddit.com/r/valheim/comments/lwria0/huge_fps_boost_from_50_to_90110_for_me/ | some bloke on Reddit ]]; on @keithzg's Radeon system none of the above resulted in an appreciable FPS change.
On {nav icon=linux, name=Linux}, you are instead offered "Play Valheim" and "Play Valheim using OpenGL". The first option //is// Vulkan, and it works fine for @keithzg at least.
----
=== Dedicated Server Setup ===
Want to run your own dedicated server? Well, the laziest way is to install letting Steam handle things:
# In {nav icon=steam, name=Steam}, show the "Tools" in your Library, and install {nav Valheim Dedidicated Server}
./valheim_server.x86_64 -name "keithzg's server" -port 2456 -world "KeithZGsServer" -password "Zomboat!" -public 1 # It should now be installed to something like `~/.steam/steam/steamapps/common/Valheim dedicated server/`
export LD_LIBRARY_PATH=$templdpathBetter is to use `steamcmd` so it can be managed without a GUI (y'all nerds know what I mean)
``` # `steamcmd +login anonymous +force_install_dir /opt/valheim/bin +app_update 896660 validate +exit`
** Re-run this command to update the installation
Whichever method you chose, in the resulting install folder, you //could// make a copy of `start_server.sh` or `start_server.bat` and edit it for what you need. That's the officially suggested approach. But, better yet, make a systemd unit file like so:
```
lang=ini, name=/etc/systemd/system/valheim.service
### Configuration
[Unit]
Description=Valheim Dedicated Server
[Service]
# Using my own user account and Steam install
User=keithzg
Group=keithzg
WorkingDirectory=/home/keithzg/.steam/steam/steamapps/common/Valheim dedicated server
# Same library setup as the shellscript does
Environment=LD_LIBRARY_PATH="/home/keithzg/.steam/steam/steamapps/common/Valheim dedicated server/linux64":$LD_LIBRARY_PATH
# While we're (for now) using the Steam-installed copy of the dedicated server, we've copied the savefiles to /opt/valheim/savedir to be written to there, so that Steam's cloud saves don't wreck havoc or such.
ExecStart="/home/keithzg/.steam/steam/steamapps/common/Valheim dedicated server/valheim_server.x86_64" -name "keithzg" -port 2456 -world "KeithZGsFirstWorld" -password "Zomboat!" -public 1 -savedir /opt/valheim/savedir
# By default, systemd send SIGTERM to services when stopping them. This appears to at least sometimes cause Valheim to not save! Lets specify use of a more polite signal.
KillSignal=SIGINT
[Install]
# Lazy way to ensure it starts when things should be ready
WantedBy=multi-user.target
```
=== External Documentation ===
* [[ https://valheim.fandom.com/wiki/ | Valheim Wiki ]] but over on the server I have running we've mostly tried to just figure things out in-game
** [[ https://valheim.fandom.com/wiki/Hosting_Servers | Hosting Servers ]]