Hi folks,
here is a short instruction to install and run a dedicated Valheim server on linux:
Installation
Create a user account named steam to run SteamCMD safely, isolating it from the rest of the operating system. Do not run steamcmd while operating as the root user – to do so is a security risk.
useradd -m steam
cd /home/steam
It’s recommended to install the SteamCMD package from your distribution repositories, if available
sudo apt install steamcmd
Run steamcmd in console
steamcmd
Login anonymous or with your account
login anonymous
or
login <username>
Set your app install directory
force_install_dir <path>
Update and validate Valheim
app_update 896660 validate
quit steamcmd
quit
Note: currently its heavy cpu loaded to host a dedicated server!
further information on installing dedicated servers:
https://developer.valvesoftware.com/wiki/SteamCMD
Known issues:
failed to init SDL thread priority manager: SDL not found
Solution:
sudo apt install libsdl2-2.0-0:i386
Run Valheim Server:
Open the path where you installed the dedicated server
you will find a couple of files including a manual.pdf
sudo nano or sudo vim start_server.sh
Now you will see this and you can set your server name and password:
export templdpath=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH
export SteamAppId=892970
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 "My Server Name" -port 2456 -world "Dedicated" -password "My Password" -public 1 > /dev/null &
export LD_LIBRARY_PATH=$templdpath
echo "Server started"
echo ""
read -p "Press RETURN to stop server"
echo 1 > server_exit.drp
echo "Server exit signal set"
echo "You can now close this terminal"
To run the server:
./start_server.sh
Have fun with your dedicated Valheim server!