⚔️ Complete Valheim Dedicated Server Guide
Everything you need to know about setting up and operating a Valheim dedicated server
📋 Guide Contents
🏗️ Setup & Installation
🔧 Configuration
🛠️ Management
🎯 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
- Create a folder for your Valheim server
- Download SteamCMD
- Create a batch file named
InstallUpdate.bat
- Add this code to the batch file:
- Run the batch file as Administrator
Linux Installation
- Create your server directory
- Install SteamCMD for your distribution
- Create
InstallUpdate.sh
script - Add this code:
- Make executable:
chmod +x InstallUpdate.sh
- Install crossplay dependencies:
🚀 Step 2: Configure Server Launch
Windows Server Script
Create StartServer.bat
:
Linux Server Script
Create valheim.sh
:
🎮 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:
- Windows: Add inbound UDP rules for ports 2456-2457
- Linux: Configure iptables or ufw to allow UDP traffic
- 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
bannedlist.txt
permittedlist.txt
🆔 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:
- Create the world in single-player with your desired name and seed
- Enter the world at least once to generate the files
- Copy the world files to your server
- 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:
- Verify server is running and accessible
- Check firewall settings (Windows/Linux)
- Confirm port forwarding (UDP 2456-2457)
- Try crossplay mode if direct connection fails
- Use server IP and port, not domain name
- Verify password and server version match client
Need Help with Your Server?
Join our community and get support from experienced Valheim server admins!