For the dedicated server to run, you will need at least 2GB of RAM available, preferably 3GB.
Before starting, ensure you are logged in as root on your VDS.
1. Enable 32-bit application installs within dpkg
Code: Select all
dpkg --add-architecture i386
Code: Select all
apt update
Code: Select all
apt install steamcmd -y
4. Add a steam user to run your server under. You should never run a server as root.
Code: Select all
adduser steam --disabled-password
5. Switch to the steam user
Code: Select all
su steam
Code: Select all
mkdir ~/valheim
Code: Select all
steamcmd +login Anonymous +force_install_dir ~/valheim +app_update 896660 validate +quit
Code: Select all
cp ~/valheim/start_server.sh ~/valheim/my_start_server.sh
Code: Select all
nano ~/valheim/my_start_server.sh
An example start line:
Code: Select all
./valheim_server.x86_64 -name "NFOServers.com: New Server" -port 2456 -world "Dedicated" -password "ChangeMe" -public 1
10. Start your server
Code: Select all
cd ~/valheim
screen -S Valheim ./my_start_server.sh
Your server should now be running and online.
---
Some additional tidbits:
To stop the server, press CTRL+C on your keyboard to send a terminate command to it. You will need to be attached to the screen session in order to do this.
If you need to get back into that screen session at a later time (such as to stop the server), you can re-attach by running this command:
Code: Select all
screen -R Valheim