Intermediate 30 min — Set up a persistent Valheim server using SteamCMD on Debian/Ubuntu.
dpkg --add-architecture i386
apt update
apt install -y lib32gcc-s1 steamcmd
mkdir -p /opt/valheim
steamcmd +@sSteamCmdForcePlatformType linux \
+login anonymous \
+force_install_dir /opt/valheim \
+app_update 896660 validate \
+quit
cat > /opt/valheim/start.sh << 'EOF'
#!/bin/bash
export templdpath=$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH
export SteamAppId=892970
./valheim_server.x86_64 \
-name "My Valheim Server" \
-port 2456 \
-world "Dedicated" \
-password "changeme" \
-savedir "/opt/valheim/data" \
-public 0
export LD_LIBRARY_PATH=$templdpath
EOF
chmod +x /opt/valheim/start.sh
Set -public 1 to list on the server browser. Password must be at least 5 characters and NOT contain the server name.
[Unit]
Description=Valheim Dedicated Server
After=network.target
[Service]
Type=simple
User=root
WorkingDirectory=/opt/valheim
ExecStart=/opt/valheim/start.sh
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Enable: systemctl enable --now valheim
ufw allow 2456:2458/udp
In Valheim: Join Game → Join IP → enter your server IP:2456 and the password.
World files are in the save directory:
# Backup world files
tar czf /opt/valheim/backups/world-$(date +%Y%m%d).tar.gz /opt/valheim/data/worlds/
Back up the .db and .fwl files — both are required for a complete world restore.
Desert Forge hosting starts at $2/week — instant setup, DDoS protection, free tier available.
Get a serverBrowser-based utilities for self-hosters and developers. No signup, no upload.