Valheim

Valheim Dedicated Server Setup: Step-by-Step Guide

The official setup from Iron Gate's server manual, every startup flag, how to bring your co-op world and how crossplay changes the port rules.

TheGameHosting Team 8 min read
Viking longship sailing a blue sea in Valheim, the world your crew shares after a valheim dedicated server setup
A longship at sea: on a dedicated server, the world keeps going when the host logs off. Image: Valheim official press kit, © Iron Gate AB and Coffee Stain Publishing

Valheim dedicated server setup takes five steps: install Valheim Dedicated Server (Steam app 896660) from the Tools section of your Steam library or with SteamCMD, copy start_headless_server.bat (Linux: start_server.sh), set -name, -world and a password of at least 5 characters, forward ports 2456–2458 or add -crossplay, and start it. When the window prints Game server connected, your friends can join.

This guide follows the official manual that Iron Gate ships inside the server folder, plus the launch script itself. You will see every startup flag that matters, how to bring the world you already play, how admins and whitelists work, and how the same setup looks on a hosted server where you never touch a router. It is current for Valheim 1.0, which launched on September 9, 2026.

What you need before you start

ItemDetail
Server programValheim Dedicated Server, Steam app ID 896660. It is a separate tool from the game and installs with an anonymous SteamCMD login
Operating systemWindows or Linux. On Linux add libatomic1, libpulse-dev and libpulse0; it needs GLIBC 2.29 or newer (or use the bundled Docker script)
PlayersUp to 10 per server, the cap Iron Gate sets for Valheim
NetworkPorts 2456–2458 forwarded on your router (Steam backend), or -crossplay, which goes through a relay and needs no forwarding
A computer that stays onThe world only exists while the server process runs

That last line is the real cost. A dedicated server is a separate program that keeps the world running without anyone playing on that machine, which is what a dedicated game server means. Iron Gate does not run official servers, so it is your PC or a host.

Valheim dedicated server setup on your PC, step by step

Step 1: Install the server

With the Steam client: open your Library, tick Tools in the filter dropdown, find Valheim Dedicated Server and click Install. On a machine without the Steam client (a Linux box, for example), use SteamCMD:

Code
steamcmd +force_install_dir ./valheim-server +login anonymous +app_update 896660 validate +quit

Run the same command again to update the server when a new Valheim version comes out. If you bought Valheim on the Microsoft Store or PC Game Pass, the server is already in C:\XboxGames\Valheim\Content\Server and the script there is called StartHeadlessServer.bat.

Step 2: Copy the start script

In the install folder (Steam: right-click the tool, Manage, Browse local files) make a copy of start_headless_server.bat and edit the copy. Steam resets the original on every update, which would wipe your settings. The only catch: Steam's Launch button points to the original, so you start the copy yourself.

Step 3: Set the name, world and password

The line you edit looks like this out of the box:

Code
valheim_server -nographics -batchmode -name "My server" -port 2456 -world "Dedicated" -password "secret" -crossplay

Change the values to your own. Two password rules come straight from the comment in Iron Gate's script: at least 5 characters, and the password cannot be contained in the server name. A server called "Vikings" with the password "vikings123" will not work. The -world value is the world's file name: if a world with that name exists in the save folder, it loads; if not, a new one is generated.

Step 4: Open ports or turn on crossplay

You have two ways to let people in from outside your home network:

BackendHow players connectRouter work
Steam (no -crossplay)Steam players only, by server list or IP and portForward the game port and port+1 (2456–2457). The script comment says 2456–2458, so forward the three. Valheim's game traffic is UDP
Crossplay (-crossplay)Any platform: public IP and port, join code or server listNone. Traffic goes through a PlayFab relay. Local and loopback IPs do not work, even inside your house

If you go the Steam route and have never forwarded a port, the router steps are the same as in our port forwarding walkthrough: give the PC a fixed local IP, then add a rule for UDP 2456–2458 instead of Minecraft's port. Also allow the server when Windows Firewall asks, ticking every box.

Step 5: Start it and connect

Run your copy of the script. When the window shows Game server connected, the server is ready. To stop it, press CTRL+C in that window so it saves; closing it with the X can leave it running in the background.

To join, open Valheim, go to Join Game, click Add server and enter your-public-ip:2456 or the join code. With crossplay on, the join code appears in the pause menu (click it to copy) and the server log prints a line such as Session "My server" with join code … is active.

Every Valheim server startup parameter

These are the flags Iron Gate documents in the server manual. Add them to the same line in your script:

FlagWhat it doesDefault
-name "My server"Name shown in the server listMy server
-port 2456Game port; the server also uses port+12456
-world "Dedicated"Loads that world or creates itDedicated
-password "Secret"Join password (5+ characters, not in the name)secret
-public 11 lists the server in the browser; 0 hides it (join by IP only)1
-savedir [path]Where worlds and the permission files are storedSee below
-saveinterval 1800Seconds between world saves1800 (30 min)
-backups 4Automatic backups kept4
-backupshort 7200 / -backuplong 43200Interval for the first backup and for the rest2 h / 12 h
-crossplayPlayFab backend: every platform can joinOff (Steam only)
-instanceid "1"Unique ID when several servers share a port and MAC addressNone
-logFile "path"Saves the log to a fileNone

World modifiers: -preset, -modifier and -setkey

The server can change the difficulty without any mod. -preset accepts Normal, Casual, Easy, Hard, Hardcore, Immersive and Hammer, and overwrites any earlier modifier. -modifier changes one setting and must come after the preset:

ModifierValid values
Combatveryeasy, easy, hard, veryhard
DeathPenaltycasual, veryeasy, easy, hard, hardcore
Resourcesmuchless, less, more, muchmore, most
Raidsnone, muchless, less, more, muchmore
Portalscasual, hard, veryhard

For example, -preset hard -modifier raids none -modifier resources more gives a hard world without base raids and with extra drops. -setkey turns on checkbox options: nobuildcost, playerevents, passivemobs or nomap. Iron Gate notes that Hammer mode blocks certain 1.0 achievements.

How to move your co-op world to the dedicated server

A Valheim world is two files with the same name: .db (terrain, buildings, everything you changed) and .fwl (name, seed and metadata). Local saves on Windows live here:

Code
%USERPROFILE%\AppData\LocalLow\IronGate\Valheim\worlds_local

On Linux the base folder is ~/.config/unity3d/IronGate/Valheim. To use the world you built while hosting from the game menu:

  1. Close the game so both files are fully written.
  2. Copy YourWorld.db and YourWorld.fwl into the server's worlds_local folder (inside its save path or -savedir).
  3. Set -world "YourWorld" exactly like the file names, with the same capital letters.
  4. Start the server. Characters stay on each player's own device; only the world moves.

If the server generates a fresh world instead, the name in -world does not match the files.

Admins, bans and whitelist

Three text files sit in the save folder: adminlist.txt, bannedlist.txt and permittedlist.txt. Put one Platform User ID per line, in the format [Platform]_[User ID], for example Steam_7656119…. The format is case sensitive. You find each player's ID in the server log or in game with the F2 panel.

Be careful with permittedlist.txt: as soon as one ID is in it, everyone else is blocked, so it works as a whitelist. Admins open the console with F5 and can use kick, ban, unban and banned (lists bans).

Crossplay with Xbox, PlayStation and Game Pass

Valheim 1.0 supports crossplay between all of its platforms. Two rules apply. First, only the server can enable it: start it with -crossplay, or console players will not even see it. Second, consoles cannot host a dedicated server, but they can join one if crossplay is allowed on the console; on Xbox that setting can be blocked by parental controls. Valheim has no official mod support, and consoles cannot run mods, so a crossplay server works best without client-side mods.

Hosting it at home vs on a game server host

Your PCTheGameHosting
Online timeOnly while your PC is on24/7
PortsRouter rules or crossplay relayPublic IP and port already assigned
World uploadCopy files between foldersFile Manager in the browser or sFTP
BackupsThe server's own rotationPanel Backups plus Schedules
HardwareShared with your gameAMD 9950X/7950X3D, DDR5, Samsung NVMe, DDoS protection

Skip the setup: run Valheim on TheGameHosting

On a hosted server the same flags exist, but you fill them in a form. Pick a plan from 4 GB of RAM (Valheim's minimum on our list; we suggest 6 GB for bigger bases), and the server is ready about 60 seconds after payment. In the panel, choose Valheim with Game Changer if the server runs another game, open Startup to set the server name, world name, password and crossplay, upload your .db and .fwl with Files or sFTP, and restart. The Console shows the join code, and Backups saves the world before a boss fight or an update. Slots are unlimited, so the game's 10-player cap is the only limit. Read more on our Valheim server hosting page.

If your Valheim dedicated server setup stalled at the router, or the world goes offline when you turn off your PC, compare sizes on our game server plans and use code FULL2026 at checkout for 15% off for life.

FAQ

What ports does a Valheim dedicated server use?

The game port you set with -port (2456 by default) and the next one, 2457. The comment in the official start script asks you to forward 2456–2458. With -crossplay you do not need to forward anything, because traffic goes through a relay.

Why does my Valheim server not accept my password?

The password needs at least 5 characters and cannot appear inside the server name. Change one of them in the start script (or in Startup on a hosted server) and restart.

Where are Valheim world files saved?

On Windows in %USERPROFILE%\AppData\LocalLow\IronGate\Valheim\worlds_local, on Linux in ~/.config/unity3d/IronGate/Valheim/worlds_local. Each world is a .db and a .fwl file with the same name.

How many players can join a Valheim dedicated server?

Up to 10. Iron Gate caps every Valheim server at 10 players, and 1.0 keeps that limit.

Can Xbox players join a Valheim dedicated server?

Yes, if the server runs with -crossplay and crossplay is allowed on the console. They join with the join code or the server's public IP and port. Consoles cannot host a dedicated server themselves.

How much RAM does a Valheim server need?

On TheGameHosting the minimum is 4 GB, and we suggest 6 GB for large bases or a full group. See the Valheim server hosting page for plans.

Hosting for these games

Written by TheGameHosting Team, the people who run our servers in Dallas and Amsterdam and answer your tickets.

All posts