Your own Valheim server 24/7
SteamCMD, ports, crossplay, admins, and how to keep it running.
Why run a dedicated server
A dedicated Valheim server stays online without a player hosting from their desktop. Friends on Xbox, PlayStation 5, Switch 2, and Steam can join whenever they want. The world keeps running while nobody is in it. That is the trade-off: more setup work upfront, zero downtime when the host closes their laptop.
This guide covers the official Valve SteamCMD method. Providers such as G-Portal, ServerBlend, and 4Netplayers pre-install the tool and set the -crossplay flag. If you rent, skip to the provider-specific control panel and jump to the adminlist step.
SteamCMD installation
Download SteamCMD from Valve’s SteamCMD page. Extract it to a folder such as C:\valheim-server. Run steamcmd.exe once to update itself. The next command downloads the Valheim server files:
steamcmd +login ANONYMOUS +force_install_dir C:\valheim-server +app_update 896660 validate +quit
Replace ANONYMOUS with your Steam credentials if you own Valheim and want to host your own library copy. The app ID 896660 is the Valheim Dedicated Server. Run this on the machine that will stay on, not on the gaming PC you turn off at midnight.
Startup batch file
Create a file called start.bat in the server folder:
@echo off
set SteamAppId=892970
start "Valheim Server" /min "C:\valheim-server\valheim_server.exe" -nographics -batchmode -port 2456 -world "MyWorld" -password "MyPassword" -crossplay
Key flags:
-port 2456— UDP port for game traffic. Add2457for Steam matchmaking on the same machine.-world "MyWorld"— the world name. Creates it if it does not exist.-password "MyPassword"— the world password players need to join.-crossplay— enables PlayStation and Switch connections through the relay. Do not omit this if console friends are joining.
Port forwarding
Steam-only traffic (no console players): forward UDP 2456 and UDP 2457 on your router to the server machine. Check the NAT type on the router; Full Cone or Restricted Cone NAT works best. Open the ports in Windows Firewall too: create inbound rules for valheim_server.exe on those ports.
Crossplay traffic (console players): the relay handles this. You do not need to open ports for PlayStation or Switch connections in most cases. The -crossplay flag routes traffic through Valve/PlayFab relays.
Crossplay and join codes
When the server starts, it prints a six-digit join code to the console window. Players on every platform use Join Game → Add server → enter the code. The code can change after a restart; copy the new one from the console.
On a server without -crossplay, only Steam players see it in the server browser. Without that flag, PlayStation and Switch players get a “server not found” error even if the machine is online.
Adminlist setup
Create a file called adminlist.txt in the world folder (C:\valheim-server\valheim-server\saves\worlds\MyWorld). Add one Steam ID or platform ID per line. To find your Steam ID, search “Steam ID” in Google and use a site like steamid.io.
When you are in the world, type kick and ban commands from the console without needing devcommands. Player-hosted worlds treat the host as admin automatically. Dedicated boxes need this file.
World backup
Back up the worlds_local folder before every major session. A corrupted Deep North chunk after a crash is recoverable from yesterday’s copy. Schedule a daily backup if the server runs 24/7. Use the server’s save command from the console to force a save before you stop the process.
Performance tips
Valheim is CPU-heavy, not GPU-heavy. A 4-core processor at 3.5 GHz handles a ten-player world comfortably. RAM is less critical; 8 GB is usually enough. The world simulation runs on one core. If players rubber-band, the server CPU is the bottleneck.
Do not run other games on the same machine while the server is hosting. Do not set the world tick rate higher than default; it is tuned for the simulation, not for performance benchmarks.
Providers and hosting
Rented Valheim servers typically come with:
- The SteamCMD tool pre-installed
-crossplayalready set- A web-based control panel for start/stop/restart
- Automatic world backups
Look for Valheim-specific plans rather than generic VPS. The game expects a persistent world on stable hardware. A cheap OpenVZ container with shared resources will stutter under ten connected players.
For a ten-player co-op that plays evenings, a player-hosted world is still fine. For a guild with members in multiple time zones, the monthly cost of a rented box is worth the 24/7 availability.
Common errors
“Connection timed out” — ports not forwarded, or Windows Firewall blocking. Test with a site like canyouseeme.org.
“Server not found” for console players — missing -crossplay flag. Restart with it set.
Wrong world loading — the -world name must match exactly, including case. Delete and recreate if you typo’d the world name at setup.
Crossplay code changes every restart — this is normal. Copy the new code from the console window after each start.
Achievements still disabled after stopping cheats — devcommands disables them per session. Create a separate clean character if you want achievements while using a server that has cheats enabled for others.
Frequently Asked Questions
Quick answers to the most common Viking questions.
How do I enable crossplay on a dedicated server?
Add `-crossplay` to the server startup command. Without it, PlayStation and Switch players cannot see or join the server.
What ports does Valheim dedicated server use?
UDP 2456 for game traffic and UDP 2457 for Steam matchmaking. Forward both on your router and open them in Windows Firewall.
How do I add admins to my Valheim server?
Create an adminlist.txt file in the world folder with one Steam ID or platform ID per line. The server must be stopped when you edit this file.
Can console players join a dedicated server?
Yes. They need the `-crossplay` flag and the join code. They cannot host a dedicated server themselves; they can only join.
How do I backup my Valheim world?
Copy the worlds_local folder. On a dedicated server, the path is typically in the saves directory. Do this before every major update or session.
Why did the join code change after restart?
The six-digit code regenerates on each startup. Copy the new one from the console window and share it with your group again.