Skip to content

Valheim on a VPS

Valheim dedicated server

Category
Game servers
Author
Iron Gate; installer by LinuxGSM
License
Proprietary

The script is free · VPS from $7.90 per month · installs in about 10 minutes

Install over SSH

root@vps:~# useradd -m -s /bin/bash vhserver && su - vhserver -c 'curl -Lo linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh vhserver' && cd /home/vhserver && ./vhserver install && su - vhserver -c './vhserver auto-install'

  • SystemUbuntu 24.04 · x86_64ok
  • Sourcegithub.com/GameServerManagers/LinuxGSMok
  • Port2456/udplisten

✓ Valheim installed · about 10 minutes

root@vps:~#

Install command from the library. Output is shortened and may differ on your server.

What it is

  • Valheim
  • Co-op
  • LinuxGSM
  • Steam

A Valheim dedicated server keeps your world online around the clock: friends join whenever it suits them, not only when the host is in the game.

LinuxGSM (MIT) downloads the server via SteamCMD, installs dependencies and provides commands to start, update and back up the world.

The server supports crossplay and a join password.

  • World online 24/7
  • Password and crossplay
  • World autosaves and backups
  • Updates via SteamCMD
  • Auto-restart via LinuxGSM

Recommended plan

For Valheim: at least 3 vCPU, 5 GB RAM and 45 GB NVMe.

Minimum to run
2 vCPU · 4 GB RAM · 10 GB disk
Systems
Ubuntu 22.04 · Ubuntu 24.04 · Debian 11 · Debian 12

How to install

Three steps in the bot or one command over SSH; installation takes about 10 minutes.

  1. 01

    Choose a plan in the bot

    Open @ExpressHost_bot and pay for a VPS. The server will be ready in about 60 seconds.

  2. 02

    Add Valheim

    At the “Add-ons” step pick the script from the library, or run it later: Server settings → Scripts.

  3. 03

    Start the server

    su - vhserver -c './vhserver start'

Manually over SSH

Connect to the server as root and run the command. Supported systems: Ubuntu 22.04, Ubuntu 24.04, Debian 11, Debian 12.

Install command
useradd -m -s /bin/bash vhserver && su - vhserver -c 'curl -Lo linuxgsm.sh https://linuxgsm.sh && chmod +x linuxgsm.sh && bash linuxgsm.sh vhserver' && cd /home/vhserver && ./vhserver install && su - vhserver -c './vhserver auto-install'

Ports

Valheim ports
PortProtocolPurpose
2456udpGame ports 2456–2457

After installation

  1. 1.Start the server: su - vhserver -c './vhserver start'
  2. 2.Set the server name, world and password in lgsm/config-lgsm/vhserver/vhserver.cfg (password must be at least 5 characters)
  3. 3.Server console: su - vhserver -c './vhserver console' (exit with Ctrl+B, then D)

Valheim FAQ

Didn’t find an answer? Message @ExpressHost_SupportBot.

How do I update the server?

su - vhserver -c './vhserver update' — LinuxGSM checks Steam for an update and restarts the server only if there is one.

Where are the files and settings?

In /home/vhserver: game files in serverfiles, LinuxGSM settings in lgsm/config-lgsm/vhserver. ./vhserver details shows all ports and paths.

Why doesn't the server run as root?

LinuxGSM forbids running game servers as root for security, so the command creates a separate vhserver user.

Valheim installs at checkout — in the bot.