Valheim Complete Guide 2026 — Dedicated Server Setup. Updated .
[ AdSense Ad Unit — Responsive Leaderboard ]

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.

3
Setup Methods
UDP
Ports 2456-2458
10
Max Players
4GB
Min RAM

1. System Requirements

[ AdSense Ad Unit — Responsive Rectangle ]
ResourceMinimumRecommended
CPU2 cores, 2.0 GHz4-6 modern cores, strong single-thread
RAM4 GB8-16 GB (especially modded)
Storage5 GB freeSSD/NVMe, 10+ GB free
Network2 Mbps uploadWired Ethernet, 5+ Mbps upload
OSWindows 10/11, Linux (GLIBC ≥ 2.29)Ubuntu 22.04, Windows Server 2022

2. Windows Setup (Fastest Path)

  1. Open Steam → Library → Tools → search "Valheim Dedicated Server" → Install
  2. Browse local files, copy start_headless_server.bat → rename to start_my_server.bat
  3. 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:

ParameterDescription
-nameServer display name
-portUDP port (uses port and port+1)
-worldWorld save file name
-password5+ characters, must differ from world name
-public1 = listed publicly, 0 = private
-crossplayEnable cross-platform (Steam + Xbox + MS Store)
-saveintervalAuto-save interval in seconds (default 1800 = 30 min)
-backupsNumber of rolling backups (default 4)
-presetWorld 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)

[ AdSense Ad Unit — Responsive Rectangle ]
# 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

[ AdSense Ad Unit — Responsive Rectangle ]

UDP ports 2456-2458 must be forwarded:

PortPurpose
2456Game/server traffic
2457Query/Steam matchmaking
2458Optional 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

⚠️ CGNAT Warning: If your WAN IP doesn't match your public IP, you're behind CGNAT. Solutions: request a public IPv4 from your ISP, switch to a VPS, or use crossplay (which doesn't need port forwarding).

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

MethodHow
Direct IPJoin Game → Add Server → enter IP:2456 + password
Steam ServersSteam → View → Servers → Favorites → Add Server → IP:2456
In-game browserJoin Game → Community tab (may take 5-10 min to appear)
Steam FriendsRight-click friend on server → Join Game

8. Admin Commands & Management

[ AdSense Ad Unit — Responsive Rectangle ]

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
saveForce world save
kick [name/ip/userID]Remove a player
ban [name/ip/userID]Permanently block a player
unban [ip/userID]Remove a ban
bannedList all banned players
pingCheck 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.

[ AdSense Ad Unit — Responsive Rectangle ]
About the Author

Valheim Guides is built by experienced server admins. All setup methods tested on Windows Server, Ubuntu, and Docker environments.