Valheim is a recently released early-access game available on Steam, yet it has blown up significantly in popularity, topping the steam charts as the most played game of the year so far. The game is an open-world adventure, similar to The Legend of Zelda: Breath of the Wild and Astroneer, in that you gather resources and explore the world around you. Unfortunately, Valheim doesn't have dedicated servers, so in order to play with friends, someone must be the host. This poses the problem of playing together with friends through different schedules/timezones as the host may not want to keep their computer on 24/7 in order to keep the server running. Luckily, because Shells™are always running and ready to use, we can use a Shell™ in order to host our Valheim server!
LinuxGSM
This article will assume that you will be using Ubuntu 20.04. We will be using LinuxGSM in order to install and run our dedicated server. Make sure that the account that the installation is occurring on has sudo privileges, as this will allow the LinuxGSM installer to detect and install any missing dependencies that may occur during the installation. It is also heavily recommended that you do not run the server as a root user as this may open your system to vulnerabilities should your server become compromised.
Installation
Open up a terminal session and input the following command:
wget -O linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh vhserver
This will install LinuxGSM if you don't have it already while also installing the packages necessary for running your Valheim server. Once you obtain the packages necessary for running your server, input the following command:
./vhserver install
Follow the on-screen instructions and you are now able to run your dedicated server!
Configuration
There will be a couple of things that you will want to configure for your server. First, open up lgsm/config-lgsm/vhserver/_default.cfg with your favorite text editor and you should be greeted with the following screen:
Take note of the variables "server name", "serverpassword", "port", "gameworld", and "public". Note that this is the default configuration file and thus cannot be changed. To work around this, input the following command to create another config file as follows:
cp lgsm/config-lgsm/vhserver/_default.cfg lgsm/config-lgsm/vhserver/common.cfg
We can then modify the variables mentioned above in common.cfg in order to set a password for the server, the server name, as well as the name of the world and whether it is public or private.
Running the server
You can start, stop, and restart the server with the following commands:
./vhserver start
./vhserver stop
./vhserver restart
You can view aspects of the server, such as the port number, status, and cpu/RAM usage with the following:
./vhserver details
This is some of the data available through details
You can save a backup of the server with:
./vhserver backup
Lastly, you can update the server with:
./vhserver update
These are the essential commands you need for your server to be up and running smoothly. Happy hunting, and good luck!
Comments
0 comments
Please sign in to leave a comment.