Valheim on a Linux install (Ubuntu)
Posted: Mon Feb 22, 2021 8:01 pm
Valheim is still in early access and is somewhat buggy as a result. Public server listing is unreliable, it is best to add your server to your Steam Server Browser's Favorites tab. To do this, enter your server IP and your port+1. For example if your server is running on 127.0.0.1:2456, you'd enter 127.0.0.1:2457 into the Steam Browser when adding it.
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
2. Update apt
3. Install SteamCMD
As part of installing, you will have to agree to Valve's Steam License Agreement
4. Add a steam user to run your server under. You should never run a server as root.
The steam user won't be able to log in over ssh, but that's fine for our purposes here.
5. Switch to the steam user
6. Make an install directory for Valheim
7. Install the Valheim Dedicated Server Files
8. Create a launch file for your server based off the template included with the files
9. Edit your launch file to fill in your own desired settings
Be sure to change your password before starting. If you want your server to be public, add "-public 1" after your password.
An example start line:
When you have yours edited as desired, press CTRL+O on your keyboard to save the file then press CTRL+X to exit the editor.
10. Start your server
This will load your server up in a "screen" session nammed "Valheim", which will allow you to have it running without staying logged into SSH.
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:
You should now be able to connect to your server using the Steam Browser or by directly entering the IP address in-game. The in-game server browser is somewhat bugged right now and not all servers will show.
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