Valheim Dedicated Server: Complete Setup Guide for 2026
Valheim is deceptively demanding for a 2021 survival game. The world simulation — procedural terrain, enemy spawning, environmental physics — runs on the server, not clients. Getting a stable, low-latency server requires the right setup.
Hardware Requirements
| Players | RAM | CPU | Storage | |---|---|---|---| | 2–5 | 4 GB | 2 cores | 10 GB | | 6–10 | 6 GB | 4 cores | 15 GB | | 10–20 | 8 GB | 4 cores | 20 GB |
Valheim worlds are relatively small (up to 300 MB) but the server process grows with world complexity.
Installing Valheim Dedicated Server on Linux
# Install SteamCMD
sudo add-apt-repository multiverse
sudo apt install steamcmd
# Create a dedicated user (never run game servers as root)
sudo adduser valheim
# Switch to valheim user
su - valheim
# Download Valheim dedicated server (App ID: 896660)
steamcmd +login anonymous +force_install_dir /home/valheim/server +app_update 896660 +quit
Starting the Server
#!/bin/bash
# /home/valheim/start.sh
export SteamAppId=892970
export LD_LIBRARY_PATH=/home/valheim/server/linux64:$LD_LIBRARY_PATH
/home/valheim/server/valheim_server.x86_64 \
-name "Your Server Name" \
-port 2456 \
-world "Dedicated" \
-password "your_password" \
-savedir /home/valheim/data/ \
-public 1
chmod +x /home/valheim/start.sh
Systemd Service (Keeps Server Running)
# /etc/systemd/system/valheim.service
[Unit]
Description=Valheim Dedicated Server
After=network.target
[Service]
Type=simple
User=valheim
WorkingDirectory=/home/valheim/server
ExecStart=/home/valheim/start.sh
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
sudo systemctl enable valheim
sudo systemctl start valheim
Firewall Rules
sudo ufw allow 2456/udp # Game port
sudo ufw allow 2457/udp # Game port +1
Valheim uses UDP, not TCP. Ensure your VPS firewall allows UDP on these ports.