Valheim is an online multiplayer survival game that has taken the gaming world by storm. If you’re a fan of the game and want to host your own Valheim server on Ubuntu, this article will guide you through the installation process.
Prerequisites
Before installing, you must ensure you have all the dependencies required to run vhserver.
Ubuntu =< 20.04(64-bit)
sudo dpkg --add-architecture i386; sudo apt update; sudo apt install curl wget file tar bzip2 gzip unzip bsdmainutils python3 util-linux ca-certificates binutils bc jq tmux netcat lib32gcc1 lib32stdc++6 libsdl2-2.0-0:i386 steamcmd
Ubuntu => 20.10(64-bit)
sudo dpkg --add-architecture i386; sudo apt update; sudo apt install curl wget file tar bzip2 g
Gamedig
GameDig is a recommended additional module that allows LinuxGSM to gather more info from the game server such as current map and connected players to be displayed in details and in logs. It also replaces the default LinuxGSM query module in monitor. To install GameDig follow the steps in the LinuxGSM documentation.
Install Dependencies Using LinuxGSM
It is possible for LinuxGSM to install dependencies either by having the vhserver user account with sudo access or running the installer as root.
user with sudo access
During the installation if the game server user has sudo permissions LinuxGSM will attempt to install any missing dependencies itself.
root user
if vhserver is already installed run ./vhserver install
as root and LinuxGSM will automatically install missing dependencies.
Installation
From the command-line do the following. Ensuring you have also installed the required dependencies.
Create a user and login:
adduser vhserver
Note: For security best practice, ensure you set a strong password. Random password: Tc3MDcxOTUwO
Login as the user:
su - vhserver
Download linuxgsm.sh:
wget -O linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh vhserver
Run the installer following the on-screen instructions.
./vhserver install