Valheim Dedicated Server Setup Guide 2026
Host your own Valheim world 24/7. Step-by-step guides for Windows, Linux (Ubuntu + SteamCMD), and Docker. Includes port forwarding, crossplay config, admin commands, world management, automatic backups, and modded server setup.
1. System Requirements
| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 2 cores, 2.0 GHz | 4-6 modern cores, strong single-thread |
| RAM | 4 GB | 8-16 GB (especially modded) |
| Storage | 5 GB free | SSD/NVMe, 10+ GB free |
| Network | 2 Mbps upload | Wired Ethernet, 5+ Mbps upload |
| OS | Windows 10/11, Linux (GLIBC ≥ 2.29) | Ubuntu 22.04, Windows Server 2022 |
2. Windows Setup (Fastest Path)
- Open Steam → Library → Tools → search "Valheim Dedicated Server" → Install
- Browse local files, copy
start_headless_server.bat→ rename tostart_my_server.bat - Edit the batch file with your settings:
-name "MyValheimServer" -world "MyWorld" -port 2456 -password "ChangeMe!" -public 1 -savedir "D:\ValheimSaves" -saveinterval 900 -backups 4
Parameter Reference:
| Parameter | Description |
|---|---|
-name | Server display name |
-port | UDP port (uses port and port+1) |
-world | World save file name |
-password | 5+ characters, must differ from world name |
-public | 1 = listed publicly, 0 = private |
-crossplay | Enable cross-platform (Steam + Xbox + MS Store) |
-saveinterval | Auto-save interval in seconds (default 1800 = 30 min) |
-backups | Number of rolling backups (default 4) |
-preset | World modifier preset: Normal, Casual, Easy, Hard, Hardcore |
Run as a service (24/7): Use Task Scheduler → Create Task → Trigger at startup → Action: run your .bat file. Or use NSSM (Non-Sucking Service Manager) for a proper Windows service.
3. Linux Setup (SteamCMD + systemd)
# Install dependencies
apt update && apt install -y steamcmd libatomic1 libpulse0
# Create valheim user
useradd -r -m -d /opt/valheim -s /bin/bash valheim
mkdir -p /opt/valheim/{server,saves}
chown -R valheim:valheim /opt/valheim
# Download server (App ID: 896660)
/usr/games/steamcmd +login anonymous +force_install_dir /opt/valheim/server +app_update 896660 validate +quit
Create systemd service at /etc/systemd/system/valheim.service:
[Unit] Description=Valheim Server After=network.target [Service] User=valheim WorkingDirectory=/opt/valheim/server ExecStartPre=/usr/games/steamcmd +login anonymous +force_install_dir /opt/valheim/server +app_update 896660 +quit ExecStart=/opt/valheim/server/valheim_server.x86_64 \ -name "MyServer" -world "MyWorld" -port 2456 -password "ChangeMe!" \ -public 1 -savedir /opt/valheim/saves -saveinterval 900 -backups 4 Restart=on-failure Environment=LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH LimitNOFILE=100000 [Install] WantedBy=multi-user.target
Enable and start: systemctl daemon-reload && systemctl enable --now valheim
4. Docker Setup
mkdir -p $HOME/valheim-server/{config,data}
docker run -d --name valheim \
--cap-add=sys_nice --stop-timeout 120 \
-p 2456-2457:2456-2457/udp \
-v $HOME/valheim-server/config:/config \
-v $HOME/valheim-server/data:/opt/valheim \
-e SERVER_NAME="MyServer" \
-e WORLD_NAME="MyWorld" \
-e SERVER_PASS="ChangeMe!" \
-e SERVER_PUBLIC=true \
ghcr.io/lloesche/valheim-server:latest
Docker sidesteps GLIBC issues on older distros and makes updates portable.
5. Port Forwarding & Networking
UDP ports 2456-2458 must be forwarded:
| Port | Purpose |
|---|---|
| 2456 | Game/server traffic |
| 2457 | Query/Steam matchmaking |
| 2458 | Optional third service port |
Router Setup Examples: UniFi: Settings → Firewall → Port Forwarding → UDP 2456-2458. TP-Link: Advanced → NAT Forwarding → UDP 2456-2458. ASUS: WAN → Virtual Server → UDP 2456-2458.
Linux firewall: ufw allow 2456:2458/udp
6. Crossplay Configuration
Add -crossplay to launch flags. The server will display a Join Code in the console. Share this code — players enter it in "Join Game" → "Add Server." No port forwarding needed for crossplay. However, crossplay and mods are mutually exclusive — Xbox/MS Store clients cannot load BepInEx mods.
7. Connecting to Your Server
| Method | How |
|---|---|
| Direct IP | Join Game → Add Server → enter IP:2456 + password |
| Steam Servers | Steam → View → Servers → Favorites → Add Server → IP:2456 |
| In-game browser | Join Game → Community tab (may take 5-10 min to appear) |
| Steam Friends | Right-click friend on server → Join Game |
8. Admin Commands & Management
Admin files are in your server's save directory: adminlist.txt, bannedlist.txt, permittedlist.txt. Add Steam64 IDs — one per line.
| Command (F5 in-game) | Effect |
|---|---|
save | Force world save |
kick [name/ip/userID] | Remove a player |
ban [name/ip/userID] | Permanently block a player |
unban [ip/userID] | Remove a ban |
banned | List all banned players |
ping | Check latency |
9. World & Backup Management
Save paths: Windows: %USERPROFILE%\AppData\LocalLow\IronGate\Valheim. Linux: ~/.config/unity3d/IronGate/Valheim.
Backup flags: -saveinterval 900 (every 15 min) + -backups 4 (rolling snapshots).
Manual backup (Linux): tar -czf world-$(date +%F).tar.gz ~/.config/unity3d/IronGate/Valheim/worlds
Restore: Stop server → replace .db and .fwl files → restart.
10. Modded Server Setup
Install BepInEx on both server and ALL clients. Match versions and configs exactly. Most gameplay mods require server+client installation. Use r2modman (Thunderstore) to manage profiles and share export codes. Crossplay must be DISABLED for mods to work. Restart the server weekly to clear memory — big builds and animal farms are the main lag sources.
Was this guide helpful?