⚔️ Complete Valheim Dedicated Server Guide

Everything you need to know about setting up and operating a Valheim dedicated server

🎯 Overview

A Valheim dedicated server handles Remote Procedure Call (RPC) communication and provides map data to connected players. Unlike many other games, Valheim servers are not authoritative - the game logic is handled by individual clients in their local areas.

Key Server Functions:

  • RPC Relay: Routes communication between players
  • Map Data: Provides world generation and terrain data
  • Authentication: Validates Steam IDs and manages bans/permissions
  • Server Discovery: Lists server in Steam's server browser

🔄 Server Processes

The dedicated server runs several parallel processes:

Zonesystem & DungeonDB

Handles world generation and loading. Must be started before accepting players.

Game Server (Steam A2S)

Provides server information to Steam's server browser when enabled with -public 1.

Garbage Collector

Runs every 10 minutes to clean up unused memory and assets.

World Save

Automatically saves world data every 20 minutes. Causes brief lag during memory cloning.

💻 System Requirements

The dedicated server is available for Linux, macOS, and Windows. You can install it via Steam or SteamCMD.

Component Minimum Recommended
CPU Quad-Core 2.8 GHz Hexa-Core 3.4+ GHz
RAM 2 GB 4+ GB
Storage 2 GB 4+ GB
OS Windows 7+, Linux 5+, macOS 10.15+ Latest versions

⚠️ Performance Notes:

  • CPU-Heavy: World generation is CPU intensive
  • Memory-Heavy: Loaded areas consume 100-300 MB each
  • Exploration Impact: New areas cause CPU spikes
  • Modded Servers: Require significantly more resources

🔧 Manual Setup Guide

📥 Step 1: Download Server Files

Windows Installation

  1. Create a folder for your Valheim server
  2. Download SteamCMD
  3. Create a batch file named InstallUpdate.bat
  4. Add this code to the batch file:
@echo off steamcmd.exe +force_install_dir "C:\Your\Valheim\Folder" +login anonymous +app_update 896660 -beta public validate +quit
  1. Run the batch file as Administrator

Linux Installation

  1. Create your server directory
  2. Install SteamCMD for your distribution
  3. Create InstallUpdate.sh script
  4. Add this code:
#!/bin/sh steamcmd +@sSteamCmdForcePlatformType linux +force_install_dir /path/to/server +login anonymous +app_update 896660 -beta public validate +quit
  1. Make executable: chmod +x InstallUpdate.sh
  2. Install crossplay dependencies:
sudo apt update && sudo apt install -y libpulse-dev libatomic1 libc6

🚀 Step 2: Configure Server Launch

Windows Server Script

Create StartServer.bat:

@echo off set SteamAppId=892970 echo "Starting server PRESS CTRL-C to exit" valheim_server.exe -nographics -batchmode -name "YourWorldName" -port 2456 -world "YourWorldFilename" -password "YourPassword" -crossplay

Linux Server Script

Create valheim.sh:

#!/bin/sh export templdpath=$LD_LIBRARY_PATH export LD_LIBRARY_PATH=./linux64:$LD_LIBRARY_PATH export SteamAppID=892970 echo "Starting server PRESS CTRL-C to exit" ./valheim_server.x86_64 -name "YourServerName" -port 2456 -nographics -batchmode -world "YourWorldName" -password "YourPassword" -crossplay export LD_LIBRARY_PATH=$templdpath

🎮 Server Parameters:

  • -name: Server name (shown in browser)
  • -world: World file name
  • -password: Server password
  • -port: Game port (default 2456)
  • -crossplay: Enable crossplay mode
  • -public 1: List in server browser

🌐 Network Configuration

Required Ports

Port Protocol Purpose
2456 UDP Game traffic (or your -port value)
2457 UDP Steam Query Port (+1 from game port)

🔥 Firewall Configuration:

  1. Windows: Add inbound UDP rules for ports 2456-2457
  2. Linux: Configure iptables or ufw to allow UDP traffic
  3. Router: Forward ports 2456-2457 UDP to your server

🔗 Crossplay vs Direct Connection

Crossplay Mode (Recommended)

  • ✅ No port forwarding required
  • ✅ Works with all platforms
  • ❌ Higher latency through relay servers
  • ❌ More connection issues

Direct Connection

  • ✅ Lower latency
  • ✅ More stable connection
  • ❌ Requires port forwarding
  • ❌ Steam only

👑 Admin Configuration

Server admins are configured using text files in your Valheim data directory:

  • Windows: %UserProfile%\AppData\LocalLow\IronGate\Valheim\
  • Linux: ~/.config/unity3d/IronGate/Valheim/

📝 Admin Files

adminlist.txt

// List admin players ID ONE per line 76561198012345678 76561198087654321

bannedlist.txt

// List banned players ID ONE per line 76561198999999999

permittedlist.txt

// List permitted players ID ONE per line (whitelist mode) 76561198012345678 76561198087654321

🆔 Finding Steam IDs:

  • Press F2 in-game to see connected players
  • Use steamid.io to convert Steam profiles
  • Check server console logs for connection attempts

🌍 World & Seed Configuration

To use a specific seed for your dedicated server:

  1. Create the world in single-player with your desired name and seed
  2. Enter the world at least once to generate the files
  3. Copy the world files to your server
  4. Update your server launch script with the correct world name

📁 World File Locations

  • Windows: %userprofile%/AppData/LocalLow/IronGate/Valheim/worlds_local
  • Linux: ~/.config/unity3d/IronGate/Valheim/worlds_local

⚠️ Important Files:

  • WorldName.fwl - World metadata (seed, name, ID)
  • WorldName.db - World progress data
  • Both files are required for proper world loading

❓ Frequently Asked Questions

🐌 Why does my server lag?

Common causes:

  • World saves: Server pauses briefly every 20 minutes
  • Chunk loading: Players exploring new areas cause CPU spikes
  • Hardware limits: Insufficient CPU/RAM for player count
  • Network issues: High packet loss or bandwidth limits

🔄 Why do players desync?

Desync happens when:

  • Players lose connection but appear still connected
  • Chunk master client can't handle the load
  • Network timeouts during world saves
  • Solution: Players should reconnect to the server

💾 My progress was reverted!

Prevention:

  • Always shutdown server gracefully (Ctrl+C, not kill)
  • Wait for "World saved" message before shutdown
  • Keep regular backups of world files
  • Use .old backup files if needed

🔌 Can't connect to my server?

Troubleshooting checklist:

  1. Verify server is running and accessible
  2. Check firewall settings (Windows/Linux)
  3. Confirm port forwarding (UDP 2456-2457)
  4. Try crossplay mode if direct connection fails
  5. Use server IP and port, not domain name
  6. Verify password and server version match client

Need Help with Your Server?

Join our community and get support from experienced Valheim server admins!

Browse Servers List Your Server