
How to Set Up a Valheim Server on a Linux VDS
Install a Valheim dedicated server on a Linux VDS with SteamCMD. Launch parameters, ports, BepInEx mod setup and world save backups.
How to Set Up a Valheim Server on a Linux VDS
Standing up a Valheim server is a handful of commands. The real work is keeping it smooth and your saves safe once the world is months old.
1. Preparing the System
sudo apt update && sudo apt upgrade -y
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y lib32gcc-s1 curl tar
sudo useradd -m -s /bin/bash valheim
sudo su - valheim2. SteamCMD and the Server Files
The App ID for the Valheim dedicated server is 896660:
mkdir -p ~/steamcmd && cd ~/steamcmd
curl -sqL "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz" | tar zxvf -
./steamcmd.sh +force_install_dir ~/valheim-server +login anonymous +app_update 896660 validate +quit3. Starting the Server
cd ~/valheim-server
export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH
export SteamAppId=892970
./valheim_server.x86_64 -name "Your Server Name" -port 2456 -world "WorldName" -password "STRONG_PASSWORD" -public 1 -crossplay⚠️ The password has to be at least 5 characters and must not contain the server name or the world name. If it does, the server refuses to start.
4. Ports
| Port | Protocol | Purpose |
|---|---|---|
| 2456 | UDP | Game traffic |
| 2457 | UDP | Query (port + 1) |
sudo ufw allow 2456:2457/udp5. systemd Service
[Unit]
Description=Valheim Dedicated Server
After=network.target
[Service]
Type=simple
User=valheim
Environment=LD_LIBRARY_PATH=/home/valheim/valheim-server/linux64
Environment=SteamAppId=892970
WorkingDirectory=/home/valheim/valheim-server
ExecStart=/home/valheim/valheim-server/valheim_server.x86_64 -name "Server" -port 2456 -world "WorldName" -password "PASSWORD" -public 1
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target6. Installing Mods with BepInEx
For a modded server, extract the BepInEx package into the server directory and use the launch script that ships with it. Mod files go into BepInEx/plugins.
💡 On a modded server players need the same mods you run. Tell your community before you add anything new.
7. Backing Up the World
Saves live in this directory:
~/.config/unity3d/IronGate/Valheim/worlds_local/
For a daily backup:
tar czf /backup/valheim_$(date +%F).tar.gz ~/.config/unity3d/IronGate/Valheim/worlds_localValheim keeps its own .old backups on the same disk, so this alone is not enough. Store your backups on a different server.
8. Performance Notes
- Iron Gate publishes no hardware requirement for the server; in our own measurements clock speed matters more than core count
- Memory use climbs as the world gets explored, and a daily restart clears it
- Large numbers of structures and dropped items pull server performance down directly
Conclusion
The Valheim install is quick. What keeps the server healthy long term is regular backups and choosing the right game server hardware.
👉 See our Valheim server hosting page to match a package.