Game Servers allow for a seamless multiplayer gaming experience. It sends and receives data to and from each player. Game servers can be local or remote servers used by game clients. Dedicated game servers give better performance and stability for hundreds of gamers.
Traditional it is hard to manage the dedicated game server. LinuxGSM is an open-source command-line tool for quick, simple deployment and management of Linux dedicated game servers. It supports hundreds of gamer servers. LinuxGSM checks dependencies, downloads game server files and loads default configs, schedule common tasks such as monitor and update the game server.
In this tutorial, we learn how to set up Linux Dedicated Game Server using LinuxGSM. Let's check the deployment of the Valheim Dedicated Server on Linux.
Deploy Valheim Game Server using LinuxGSM
LinuxGSM will run on Linux distros such as Ubuntu, Debian, AlmaLinux, RockyLinux, and more.
- A cloud instance - here I am using Ubuntu 20.04
- A user with sudo access
- Required amount of RAM and CPU recommended by the Game. Best to have atleast 4 CPU and 2 GB RAM.
Step 1: Update your system
First, make sure to update the package index:
$ sudo apt update
Step 2: Add a user
Let's create a user and set a password. To create a user name named 'vhserver', type:
$ sudo adduser vhserver
Adding user vhserver' ... Adding new groupvhserver' (1000) … Adding new user vhserver' (1000) with groupvhserver' … Creating home directory /home/vhserver' ... Copying files from/etc/skel' … New password: Retype new password: passwd: password updated successfully Changing the user information for vhserver Enter the new value, or press ENTER for the default Full Name : Room Number : Work Phone : Home Phone : Other :
Make sure the user has the sudo privilege. You can give sudo privilege for the user in Ubuntu using:
$ sudo usermod -aG sudo vhserver
Now switch the user, type:
$ su - vhserver
Step 3: Download linuxgsm.sh
Now we can download the linuxgsm script using wget command. Here I download the Valheim dedicated server installer script.
$ wget -O linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh vhserver
This downloads the installer script and required directory to the user's home directory.
Step 4: Run the Installer Script
Now run the installer script to start the installation of Valheim dedicated game server files.
$ ./vhserver install
Just follow the on-screen instructions to complete the installation. The LinuxGSM config file is located at
Step 5: Start Valheim Server Service
Once the installation is completed start the Valheim game server service.
$ ./vhserver start
[ OK ] Starting vhserver: Applying steamclient.so sdk64 fix: Valheim [ OK ] Starting vhserver: Applying steamclient.so sdk32 fix: Valheim [ OK ] Starting vhserver: Valheim Server
You can verify the status and other information:
$ ./vhserver details
To stop the Valheim game server, type:
$ ./vhserver stop
Connect to Game Server
You can go to steam and Join the Valheim game server. Provide the game server IP address followed by the port number (2456).
LinuxGSM comes with a handful of useful commands to manage the game server. Here you can find all the LinuxGSM commands:
start st | Start the server. stop sp | Stop the server. restart r | Restart the server. monitor m | Check server status and restart if crashed. test-alert ta | Send a test alert. details dt | Display server information. postdetails pd | Post details to termbin.com (removing passwords). skeleton sk | Create a skeleton directory. update-lgsm ul | Check and apply any LinuxGSM updates. update u | Check and apply any server updates. force-update fu | Apply server updates bypassing check. validate v | Validate server files with SteamCMD. check-update cu | Check if a gameserver update is available backup b | Create backup archives of the server. console c | Access server console. debug d | Start server directly in your terminal. install i | Install the server. auto-install ai | Install the server without prompts. developer dev | Enable developer Mode. donate do | Donation options.
In this tutorial, we learned how to set up a Linux Dedicated Game server using Linuxgsm. Here we have successfully deployed Valheim Dedicated Server on Linux.