Short answer. You can host a Valheim server yourself for free: install the Valheim Dedicated Server (Steam app 896660) with SteamCMD, start valheim_server.x86_64 with a name, world and password, and, if you run it without crossplay, forward UDP ports 2456 and 2457 on your router. Or rent a Valheim server and skip the setup and updates.
Players join from the in-game server list, with the server's address and port, or with a join code if crossplay is on. Players who are not on Steam (Xbox, PlayStation 5, Nintendo Switch 2 or Game Pass) can only join a crossplay server.
Checked on 5 November 2026, accurate for Valheim patch 1.0.21 (28 October 2026).
This guide uses Iron Gate's own dedicated server manual and what we run on our own Valheim servers. To go straight to the rental route, see Option 2.
What you need
Operating system: Linux or Windows. On Linux the server needs libatomic1, libpulse-dev and libpulse0, plus GLIBC 2.29 and GLIBCXX 3.4.26 or newer. On an older system Iron Gate's manual suggests running the server through the Docker script that ships with it.
Network: UDP 2456 and 2457 by default (the port you choose and the next one), forwarded to the machine. A crossplay server relays through PlayFab and does not need port forwarding.
Steam account: not needed to download the server in the steps below, which use an anonymous login.
The game: every player needs their own copy of Valheim. It runs on PC, Mac, Linux, Xbox, PlayStation 5 and Nintendo Switch 2, and only Steam players can join a server that runs without crossplay.
The server software is free. You pay for the machine, power and bandwidth, and it has to stay on while people play.
The first line lets a fresh SteamCMD update itself before the real download. Our install script does the same and then checks that steamapps/appmanifest_896660.acf exists, because Steam sometimes answers "Missing configuration", SteamCMD carries on to "success" and no game files are installed. If that file is missing, run the download again.
Start the server. Iron Gate's manual says to put your settings in a copy of start_server.sh, because Steam resets the original file on every update. The launch line in the script that ships with the server is:
Make your copy, change the name, world and password in it with any text editor, and run it from the server folder:
cd /home/steam/valheim
cp start_server.sh start_my_server.sh
./start_my_server.sh
The script's own note asks for a password of at least 5 characters. Keep the password out of the world name too: in our tests on Valheim 1.0.17, a public server with its password inside the world name refused to start. The world named after -world is created on the first start, or loaded if it already exists. The shipped line already has -crossplay, so players on every platform can join (see below); delete it to use the Steam backend, which only Steam players can join. The server is ready when the console shows Game server connected.
Open the ports (Steam backend). Without -crossplay, allow UDP 2456 and 2457 on the machine's firewall (with ufw: sudo ufw allow 2456:2457/udp) and forward both on your router. If you chose another -port, use that port and the next one. Iron Gate's manual gives 2456-2457, while the comment inside the shipped start_server.sh says 2456-2458, so opening 2458 as well does no harm. A crossplay server does not need port forwarding.
Stop it cleanly. Press CTRL+C in the server's window. Iron Gate warns that closing a Windows window with the X may leave the server running.
Windows
In the Steam Library, tick Tools in the filter menu and install Valheim Dedicated Server.
In its install folder (right-click, then Manage, then Browse local files), make a copy of start_headless_server.bat and edit the copy. Steam resets the original on every update.
Set -name, -port, -world and -password on the line that starts with start valheim_server.
Run the copy and tick every box in the Windows Firewall prompt. If the line has no -crossplay, forward UDP 2456 and 2457 on your router. Wait for Game server connected.
Options you will probably want
-public 0: keeps the server out of the server list. Players then join with the Join IP button.
-crossplay: runs the server on the PlayFab backend so players on any platform can join. Without it, only Steam players can see and join the server. With it, you do not need port forwarding, and players can join by join code, by address and port, or from the server list. They cannot join with a local or loopback IP address.
-instanceid "1": if you run several servers with the same port from the same machine (the same MAC address), give each one a different value so they get different PlayFab IDs.
-savedir: changes where worlds and the access lists are stored. The default on Linux is ~/.config/unity3d/IronGate/Valheim.
-saveinterval 1800, -backups 4, -backupshort 7200, -backuplong 43200: the save and backup schedule, in seconds. These are the defaults.
Three text files in the save folder control access: adminlist.txt, bannedlist.txt and permittedlist.txt. Put one Platform User ID per line, written as [Platform]_[User ID] and case sensitive. The server log shows each player's ID, and in game the F2 panel shows it. Careful: as soon as anyone is on permittedlist.txt, everyone else is locked out. More in How to find a player's ID for Valheim admin, ban and allow lists.
Option 2: host it on PlayNHost
Renting removes the router, firewall and update work. The start command, ports and world settings are handled for you.
Pick a plan. Open the Valheim server hosting page. The plan at the time of writing is EIKTHYR. Press Customize Plan on it and finish the order. Prices change, so check them on that page.
Wait for the install. The server appears at panel.playnhost.com. The panel counts it as running when the Console prints Opened PlayFab server or Opened Steam server.
Open Settings, then Game Settings. The fields you will use first:
Server Name: the name in the server list.
Server Password: 5 to 20 characters. While Public Server is on, it must not appear anywhere inside the World Name.
World Name: up to 20 characters, and no slash. A world with that name is created on the first start.
Public Server: on lists the server in the browser. Off keeps it unlisted.
Enable Crossplay: on by default, so players on every platform can join. Off: only Steam players can see and join the server.
Difficulty (World Preset, Combat Difficulty, Death Penalty, Resource Rate, Raid Frequency, Portal Rules) has its own place: the Worlds page, on the World rules tab. A change is written into the world at the next start and stays there: setting a field back to keep does not undo it, and a World Preset of normal returns the world to standard settings.
Restart. When the panel shows "Saved. The server must restart before these take effect.", press Restart now and wait for the ready line.
Join. On your server's Overview, the Play with friends card shows the Join code once the server is running. It is new at every restart. Steam friends can keep using the address on the card.
What our setup does for you
It refuses a start that Valheim would refuse. With Public Server on and the password inside the World Name (capitals count), the start command prints a plain message saying Valheim will not start and why, instead of the game's bare Error bad password followed by a stream of errors. Change one of the two and start again.
It reads the right ready line. A start counts as finished at Opened PlayFab server or Opened Steam server, which Valheim prints when each backend is up.
Your settings become start arguments. World name, password, save interval, backups, crossplay, presets and modifiers are turned into the -world, -password, -saveinterval, -backups, -crossplay, -preset and -modifier options at every start. Leaving a difficulty field on keep adds nothing.
Backups on the game's own schedule. Save every 1800 seconds and 4 automatic backups by default, the same defaults as Iron Gate's server.
Updates.Auto Update is on by default and installs the Steam build at every start.
Self-hosting or renting: an honest comparison
Cost: self-hosting has no software cost, but it uses your machine, power and internet, and the machine must stay on. Renting is a plan billed monthly, quarterly or yearly.
Network: with the Steam backend you must forward UDP 2456 and 2457 yourself. With crossplay you do not need to, whether you self-host or rent.
Updates: when Valheim patches, players on the new version cannot join an old server. Self-hosting means you run SteamCMD again. On PlayNHost, Auto Update does it at the next start.
Backups and access lists: self-hosting means copying the save folder and editing the three text files by hand. On PlayNHost the Active players card on the Overview has an Access button with Admins, Banned and Allowed lists.
Control: self-hosting gives you full access to the machine and the start line. Renting gives you the settings the panel exposes.
We use cookies to keep the site working, to understand how it is used, and to measure our marketing. You can accept all, accept essential cookies only, or choose per category.We use cookies to keep the site working, to understand how it is used, and to measure our marketing. They are on by default here. You can switch off anything you do not want.Read our privacy policy