How to Setup a Valheim Dedicated Server
Valheim is best played with friends, and a dedicated server ensures your world is always online, even when you aren't. In this guide, we will cover how to set up your own Valheim dedicated server using SteamCMD, and compare the DIY method vs. professional Valheim server hosting. Prefer to skip the setup entirely? Our Valheim dedicated server hosting gives you a fully managed dedicated box, online 24/7.
Option 1: Rent a Server
Pros: Instant setup, DDoS protection, 24/7 uptime, no hardware required.
Cons: Monthly cost.
View Hosting Plans →
Option 2: DIY / Self-Hosted
Pros: Free (if you have hardware), full control.
Cons: Requires technical skills, uses your electricity, potential security risks.
Prerequisites for Valheim Server Hosting
Before you begin, ensure your hosting machine meets the following requirements:
- OS: Windows 10/11 or Linux. Iron Gate's server manual sets the Linux minimum at GLIBC 2.29 and GLIBCXX 3.4.26 (Ubuntu 20.04 or newer has them) and lists three packages to install:
libatomic1,libpulse-devandlibpulse0. On an older distribution, the manual's answer is the Docker script that ships with the server,docker_start_server.sh. - CPU: Quad-core processor (3.0 GHz+)
- RAM: 4GB is plenty for vanilla: the Valheim servers we run use 1.8 GB in a typical reading and about 3.2 GB at their busiest with 6 to 10 players. Mods add their own.
- Network: on the Steam backend, UDP ports 2456-2457 forwarded; a crossplay server needs no forwarding
Method 1: Using SteamCMD (Windows/Linux)
Step 1: Install SteamCMD
SteamCMD is the command-line version of Steam, used to download server files.
- Download SteamCMD for Windows.
- Extract the contents to a folder (e.g.,
C:\steamcmd).
Step 2: Download Valheim Server Files
Open a command prompt or terminal and run the following command to download the Valheim dedicated server files. App ID 896660 is for the dedicated server.
steamcmd +login anonymous +force_install_dir C:\ValheimServer +app_update 896660 validate +quit
Step 3: Configure the Startup Script
Navigate to your server installation folder (C:\ValheimServer). You will see a file named start_headless_server.bat (Windows) or start_server.sh (Linux). Make a copy of this file and rename it to start.bat or start.sh to prevent updates from overwriting it. Since 1.0, the start_server.sh that ships with the server already includes -crossplay; take it out if your group is all on Steam and you want the direct Steam connection.
Edit the file with a text editor and customize the following parameters:
valheim_server -nographics -batchmode -name "MyServerName" -port 2456 -world "Dedicated" -password "Secret123" -public 1
-name: The name displayed in the server browser.-world: The name of your save file.-password: Required on a public server, which is the default. At least 5 characters, and it must not appear inside the world name or the world's seed, or the server quits at start withError bad passwordin its log.-public 1: Sets the server to be visible in the community list.
Step 4: Port Forwarding
For players outside your local network to join, you must forward ports 2456-2457 UDP on your router to your server's local IP address. If you skip this step, your server will be "Invisible" to the internet. This only applies to the Steam backend: a server started with -crossplay sends its traffic through a relay and needs no forwarded ports, though it then cannot be reached on its local address, even from the same network.
Advanced Configuration: Crossplay & Performance
Enabling Crossplay
To let players on every platform join, Xbox, PS5, Switch 2 and the Microsoft Store version included, add the -crossplay argument to your startup script. Note that crossplay servers use a relay network which may increase latency, so a group that is all on Steam does better without it.
Troubleshooting: If you see "Failed to connect", check the firewall first. Ensure valheim_server.exe is allowed through Windows Defender Firewall.
Need a Professional Solution?
Self-hosting is a great learning experience, but it comes with maintenance overhead. If you want to skip the technical setup and get straight to playing, check out our premium Valheim server hosting.
- Mods in one click: BepInEx and Thunderstore mods from the panel.
- Daily Backups: Never lose your world to corruption.
- Four regions: put the server close to your group.