Skip to main content
To install LinuxGSM, create a user for the game server (for example vhserver for Valheim), log in as that user and run curl -Lo linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh vhserver, then ./vhserver install. Manage the server with ./vhserver start, stop, update, monitor, backup and details. FREAKHOSTING also offers managed game servers on its Game Panel if you’d rather not run them yourself: see how to log in to the Game Panel.

Before you start

  • LinuxGSM (Linux Game Server Managers) is a free command-line tool that installs and manages more than 100 dedicated game servers. Each game has its own script name, such as vhserver (Valheim), rustserver (Rust) or ts3server (TeamSpeak 3). Find yours in the LinuxGSM server list.
  • LinuxGSM recommends Ubuntu 24.04 LTS, Debian 11 or newer, or Enterprise Linux 8 or newer. Use a supported release from that list.
  • Run each game server under its own user. LinuxGSM refuses to run as root, apart from the install command.
  • Check the game’s own RAM and disk needs. Many Steam games need several GB of each.

How to install a game server with LinuxGSM

This example installs a Valheim server. Replace vhserver with your game’s script name.
1

Create a user for the game server

Set a strong password. On AlmaLinux / Rocky, adduser creates the user without asking for a password; set one with sudo passwd vhserver.
2

Switch to the new user

3

Download LinuxGSM

This creates the ./vhserver script in the user’s home folder.
4

Run the installer

Follow the prompts. LinuxGSM installs missing system packages itself when the user has sudo rights. If it doesn’t, install the packages it reports as missing from a root session, then run ./vhserver install again. The installer then downloads the server files, often through SteamCMD.
5

Start the server

details shows the server name, passwords, ports and the location of the config files.

How to open the game’s ports

Use the ports and protocols that ./vhserver details lists. For example, if it lists UDP ports 2456 and 2457, exit back to your sudo user and run:
If you are turning on ufw for the first time, run sudo ufw allow OpenSSH before sudo ufw enable. Otherwise you lock yourself out of SSH. See set up a firewall with UFW.

LinuxGSM commands

Run these as the game server user, in its home folder.

How to automate monitoring and updates with cron

As the game server user, run crontab -e and add:
This checks the server every 5 minutes, looks for game updates every 30 minutes and updates LinuxGSM every Sunday at midnight. See schedule tasks with cron.

How to change LinuxGSM settings

LinuxGSM’s own settings live in lgsm/config-lgsm/vhserver/ in the user’s home folder: The game’s own config file location is shown by ./vhserver details.

How to check it worked

The Status line shows STARTED, and the ports match what you opened. Players connect to your server IP and the game port listed in details, for example 203.0.113.10:2456.

Frequently asked questions

Can I run several game servers on one VPS?

Yes. Create a separate user for each server, or run several instances under one user with different ports. Make sure the VPS has enough RAM for all of them.

Does LinuxGSM start the server after a reboot?

Not by itself. Add @reboot /home/vhserver/vhserver start > /dev/null 2>&1 to the game server user’s crontab.

How do I see the console without stopping the server?

Run ./vhserver console, then press Ctrl+B followed by D to detach. Pressing Ctrl+C in the console stops the server.

Where are the backups stored?

./vhserver details shows the backup folder. Copy backups off the server too; see back up a Linux server.

VPS and dedicated server guides

Every guide in this section.

Minecraft server on a VPS

Java, server.jar and port 25565.

Install Pterodactyl Panel

A web panel for many game servers.

Tune Linux for game servers

Lower latency for players.

Set up a TeamSpeak server

Voice chat next to your game.

Checked against the official LinuxGSM documentation and the LinuxGSM Valheim page on 4 November 2026. Commands and ports differ between games; always use what ./gameserver details shows.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: November 2026