How to Set Up a Valheim Dedicated Server: Steam or Crossplay, Home or Rented

To run a Valheim dedicated server, install the free Valheim Dedicated Server tool (Steam app 896660) from the Tools filter of your Steam Library or with SteamCMD, copy its example launch script, and set a world name, a server name and a password, as Iron Gate’s official dedicated server guide describes. Then pick a backend: with the -crossplay flag the server runs through a relay, needs no router changes and hands out a join code that lets players on any platform join (Valheim Companion lists PC, Xbox, PS5 and Switch 2); without it, only Steam players can join and UDP ports 2456-2457 have to be forwarded by hand. The steps are written for Valheim patch 1.0.21, released on October 28, 2026.

Google · Preferred Sources

Don't miss new tech stories on Google

Add Tech Insider once in the Google app and our stories appear in your news suggestions.

Add Now

Step 1: Steam backend or crossplay relay decides who can join and whether you touch the router

Iron Gate’s guide says that setting up a dedicated server takes some scripting knowledge and, depending on your configuration, router changes, and that Iron Gate cannot give router-specific instructions. The -crossplay flag is how you avoid the router work. It runs the server on the PlayFab crossplay backend, which lets players from any platform join. Leave it out and the Steam backend is used, where only Steam users can see and join the server. The Valheim wiki notes that the example launch scripts shipped with the server already include the flag, so a server started from an unedited example is a crossplay server.

Steam backend (no flag)Crossplay backend (-crossplay)
Who can joinSteam users onlyPlayers on any platform; Valheim Companion lists PC, Linux, Mac, Xbox, PS5 and Switch 2
Router workForward UDP 2456-2457 by hand; the server uses neither UPnP nor NAT-PMPNone; the server sends its data through a relay
How players connectThe server’s IP address and portA 6-digit join code that changes at every start and is written to the log
Where it tends to failPorts not reachable from the internetLag, timeouts and disconnects; registration can fail behind a shared IP; local or loopback addresses cannot be used to connect

The cost of the relay is stated plainly on the Valheim wiki: “Crossplay has a major disadvantage”, because players on a crossplay server are more likely to experience lag, timeouts and disconnects. The wiki also describes a trap for hosts on an ISP that shares one external IP between customers: the first registration with Azure PlayFab Party fails if another customer of the same ISP hosts Valheim on the same external IP and gameplay port. Choosing a unique -port avoids the collision.

Valheim Companion lists crossplay across PC, Linux, Mac, Xbox, PS5 and Switch 2 whenever the server uses crossplay-compatible networking. Iron Gate’s crossplay FAQ adds that an Xbox can join a dedicated server but cannot host one, and that crossplay has to be enabled on both the console and the server. The Valheim 1.0 FAQ describes Valheim 1.0 as a game for 1-10 players and also says there is no cross platform sync for save files; Valheim Companion lists Xbox and Microsoft Store PC as the exception.

The decision follows from your group. If anyone plays on a console, or on the Microsoft Store version of the PC game (not a Steam user, so locked out of the Steam backend), use -crossplay and accept the lag risk. If every player is on Steam and you control the router, the Steam backend avoids the relay at the price of the port forwarding in Step 7.

Step 2: Home PC or rented slot, and the electricity price where renting wins

The server tool is a separate free Steam app, 896660, distinct from the retail game, app 892970, according to Vi.ki’s dedicated server page. SteamCMD fetches the tool with an anonymous login, so a spare PC can host without owning the game. Iron Gate’s server guide gives no dedicated-server CPU or memory minimum, a gap Valheim Companion’s setup guide also points out, and the player cap is 10 (see Step 1). The choice is between a machine you power yourself and a flat monthly plan.

On OuiHeberg’s English Valheim page, which shows its prices in US dollars including VAT and billed monthly, the Start plan was listed at $3.46 a month on November 3, 2026, and the Pro plan at $13.86 a month with 16 GB of RAM, 6 vCPU and 120 GB of NVMe storage, still limited to 10 players. A September 2026 comparison on Vi.ki gives Pine Hosting’s three Valheim plans as $12, $21 and $30 a month, and Pine Hosting’s own Valheim page names its tiers Essential (4 GB), Performance (6 GB) and Extreme (8 GB). The prices and the tier names come from different pages, so the table lists the Pine plans by price rank rather than tier name. Multiplying each monthly price by 12 gives the yearly bill, assuming the listed price holds for the full year.

PlanPer monthPer year
OuiHeberg Start$3.46$41.52
OuiHeberg Pro (16 GB)$13.86$166.32
Pine Hosting, cheapest plan$12$144
Pine Hosting, middle plan$21$252
Pine Hosting, top plan$30$360

A home server’s cost is electricity. A machine drawing W watts around the clock uses W × 8.76 kilowatt-hours a year (8,760 hours divided by 1,000). Dividing a plan’s yearly price by that figure gives the tariff above which the home machine costs more than the plan. The wattages below are illustrative inputs, not measurements, so read your own machine’s draw from a wall meter. Hardware purchase and your connection’s upload limit are left out.

Wall drawkWh a yearvs Start ($41.52)vs Pro ($166.32)vs Pine $12 plan ($144)
15 W131.4$0.316$1.266$1.096
50 W438$0.095$0.380$0.329
100 W876$0.047$0.190$0.164
200 W1,752$0.024$0.095$0.082

A 50 W machine uses 438 kWh a year, so it costs more than OuiHeberg Start once power passes about $0.095 per kWh, while against Pro the crossover is about $0.380. A 200 W desktop reaches the Start crossover at about $0.024 per kWh and the Pro crossover at about $0.095. The plans differ in size: OuiHeberg’s page recommends Pro for a very large world, so set a home machine against the plan that matches the world you expect to host.

Steps 3 and 4: Getting app 896660 onto the machine by Steam Library, SteamCMD or Linux packages

Step 3: Steam Library, Microsoft Store or Windows SteamCMD

Three routes install the same server. On Steam, open the Library’s filter dropdown at the top left, tick Tools, scroll to Valheim Dedicated Server and click Install, per Iron Gate’s guide. If you own the Microsoft Store version, the crossplay FAQ says to open the Server folder created when the game is installed and run StartHeadlessServer.bat. On a spare PC without the Steam client, SteamCMD does the same job. Save this as install-valheim.bat in the folder that holds steamcmd.exe and run it; running it again later updates the server files.

@echo off
steamcmd.exe +force_install_dir "C:\ValheimServer" +login anonymous +app_update 896660 validate +quit

Step 4: Linux packages, the GLIBC check and a dedicated user

Iron Gate’s guide lists libatomic1, libpulse-dev and libpulse0 as the extra Linux packages, and sets a floor of GLIBC_2.29 and GLIBCXX_3.4.26. Check the floor before installing anything. If the first command prints a glibc version below 2.29, or the second prints 0, the host is too old; Valheim Companion’s setup guide points to a Docker script for that case.

ldd --version | head -n 1
grep -c GLIBCXX_3.4.26 /usr/lib/x86_64-linux-gnu/libstdc++.so.6

On Ubuntu, this script adds the package sources SteamCMD needs, installs the packages, creates a valheim user so the server does not run as root, and downloads the server into that user’s home:

#!/bin/bash
set -euo pipefail

sudo dpkg --add-architecture i386
sudo add-apt-repository -y multiverse
sudo apt update
sudo apt install -y steamcmd libatomic1 libpulse-dev libpulse0 libc6-i386 rsync

getent passwd valheim || sudo useradd -m -s /bin/bash valheim
sudo -iu valheim /usr/games/steamcmd \
  +@sSteamCmdForcePlatformType linux \
  +force_install_dir /home/valheim/server \
  +login anonymous \
  +app_update 896660 validate \
  +quit

Steps 5 and 6: The launch script’s flags, and moving a pre-1.0 world into worlds_local

Step 5: Copy the launch script and set the flags

Iron Gate recommends editing a copy of the example launch script, because Steam resets the original each time the server updates; the copy cannot be started from Steam, so run it from the file system. The table lists the flags whose behavior Iron Gate’s guide, ValheimDB or Vi.ki document:

FlagWhat it does
-portGameplay port; the Steam backend’s default range is 2456-2457
-worldThe world to load, by name (see Step 6 for an existing world)
-passwordJoin password; Vi.ki’s dedicated server page, checked on November 12, 2026, says it must be at least 5 characters and must not appear in the server name
-crossplayCrossplay (PlayFab) backend; omit it for the Steam backend
-savedirThe server’s save folder, which holds worlds_local
-saveintervalSeconds between world saves; default 1800 (30 minutes)
-backupsHow many automatic backups are kept; default 4
-backupshortSeconds for the short backup interval; default 7200
-backuplongSeconds for the long backup interval; default 43200

Save this as /home/valheim/server/start-valheim.sh and make it executable. Change the name, world and password; to use the Steam backend, delete the -crossplay line. The script sets SteamAppId to 892970, the retail game’s ID.

#!/bin/bash
set -euo pipefail

cd "$(dirname "$0")"
templdpath="${LD_LIBRARY_PATH:-}"
trap 'export LD_LIBRARY_PATH="$templdpath"' EXIT
export LD_LIBRARY_PATH="./linux64${templdpath:+:$templdpath}"
export SteamAppId=892970

./valheim_server.x86_64 \
  -name "My Valheim Server" \
  -port 2456 \
  -world "MyWorld" \
  -password "change-me-please" \
  -public 0 \
  -crossplay \
  -saveinterval 1800 \
  -backups 4 \
  -backupshort 7200 \
  -backuplong 43200

For Windows, this launch line adds -savedir, so you know which folder ends up holding worlds_local, your backups and the list files in Step 12:

@echo off
set SteamAppId=892970
valheim_server.exe -name "My Valheim Server" -port 2456 -world "MyWorld" -password "change-me-please" -public 0 -crossplay -savedir "C:\ValheimData" -saveinterval 1800 -backups 4 -backupshort 7200 -backuplong 43200
pause

Step 6: Bring an existing world across

Valheim 1.0 stores worlds as folders. Per Vi.ki, “an older world is backed up and converted, irreversibly, the first time a 1.0 server loads it, and backups must copy the whole folder”. Copy your pre-1.0 world somewhere safe before the first start. Then, as ValheimDB describes, copy the world’s folder from worlds_local in your own save folder to worlds_local in the server’s save folder (or the -savedir folder) and start the server with -world set to that world’s name.

If the server itself still runs a pre-1.0 build, back up the whole worlds_local folder before you update it with app_update 896660, because the first 1.0 start converts an older world irreversibly.

Steps 7 to 9: UDP 2456-2457, the “Game server connected” line and joining from each platform

Step 7: Forward the ports, Steam backend only

If you left out -crossplay, forward UDP 2456 and 2457 on your router to the server’s LAN address. The Valheim wiki states that the dedicated server does not use UPnP or NAT-PMP to automate this, and lists the gameplay ports as UDP 2456 and 2457; Iron Gate’s guide gives the same default range. If you set a different -port, forward the range that starts there. Give the server PC a fixed LAN address or a DHCP reservation first so the rule keeps pointing at it. With -crossplay, skip this step: Iron Gate says the relay means the server needs no port forwarding to be reachable from outside your local network.

Step 8: Start it and wait for the confirmation line

Run your copy of the launch script. Iron Gate’s guide says that when the server shows “Game server connected” it is up and ready to accept connections. On a crossplay server the log also carries the join code, which ValheimDB says is 6 digits and new at each start. Stop the server with Ctrl+C in its window: Iron Gate warns that closing it with the X in the window frame may leave it running in the background.

Step 9: Join from each platform

On a crossplay server every platform joins the same way: Join Game, Add server, then the join code from the log, per the crossplay FAQ. A console needs crossplay switched on in its own settings, and the FAQ notes that parental controls can hide the option. On the Steam backend, Steam players enter the server’s IP address and port. Joining from the server’s own machine with a crossplay server does not work with a local or loopback address, so use the code. On the Steam backend, from inside your network, use the server’s LAN address if your router will not loop back to its public one.

Every player must run the same game version, and Vi.ki notes that Steam patches often reach other platforms a few days later. Patch 1.0.20 came on October 15, 2026 and patch 1.0.21 on October 28, 2026; Iron Gate’s patch 1.0.21 notes say crossplay stays functional while the platforms catch up. A server updated on patch day is therefore a build ahead of any console that has not updated yet, so check what your console friends are running before you run the update in Step 11.

SymptomCauseFix
PC players join, console players cannot see the serverNo -crossplay flag, so the Steam backend is in use and only Steam users see itAdd the flag and restart
Steam players outside your network cannot connectUDP 2456-2457 not forwarded to the server’s LAN addressRecheck the router rule and the server’s LAN address
Crossplay server will not registerAnother customer on the same external IP uses the same portPick a different -port
Public server refuses to startPassword under 5 characters or appearing in the server nameUse a longer password that does not appear in the server name
Server will not start on LinuxGLIBC or GLIBCXX below the minimum, or libatomic1 or libpulse0 missingRun the Step 4 checks, install the packages, or use Docker
A new empty world loads-world does not match the name of the copied world folderSet -world to the folder’s name
Host cannot join its own crossplay serverLocal and loopback addresses cannot be used with the crossplay backendJoin with the 6-digit code
One player cannot join while others canDifferent game version, or the server runs modsMatch versions; see Step 12 on mods

Steps 10 and 11: Why the default backups should reach back about 38 hours, then an off-disk copy and a service that stops like Ctrl+C

Step 10: Know the reach of the built-in backups, then copy them off the disk

With the defaults in Step 5, four automatic backups are kept. Iron Gate’s guide treats the first as the short backup and the rest as long ones, so on that reading the oldest restore point sits the short interval plus three long intervals back: 7200 seconds is 2 hours and 43200 seconds is 12 hours, so 2 + 3 × 12 = 38 hours. If you shorten -backupshort to 3600 seconds, the sum becomes 1 + 3 × 12 = 37 hours. These figures are worked out from the documented defaults, not read from a backups folder, so check the timestamps on your own server before relying on them.

Setting-backupshort-backuplong-backupsOldest restore point
Defaults7200 s43200 s438 hours back
Shorter short interval3600 s43200 s437 hours back

That is under two days, so damage noticed after a weekend away is out of reach, and the backups live on the same disk as the world. Valheim Companion puts it directly: “Automatic backups are valuable, but they are not a substitute for an offline copy.” On Linux the worlds are in ~/.config/unity3d/IronGate/Valheim/worlds_local for the user running the server, according to the Valheim wiki; on Windows, use the worlds_local folder inside your -savedir. Because of the 1.0 folder format, archive the whole folder. This script, run as the valheim user, archives it, copies the archives to a mounted off-disk location and deletes local archives older than 14 days; it stops if either folder is missing and removes a half-written archive if anything fails.

#!/bin/bash
set -euo pipefail

SRC="$HOME/.config/unity3d/IronGate/Valheim/worlds_local"
DEST="$HOME/backups"
OFFSITE="${VALHEIM_OFFSITE:-/mnt/offsite/valheim}"
STAMP="$(date +%F-%H%M)"
TMP="$DEST/.partial-$STAMP.tar.gz"

[ -d "$SRC" ] || { echo "No worlds_local at $SRC"; exit 1; }
[ -d "$OFFSITE" ] || { echo "Off-disk target $OFFSITE is not mounted"; exit 1; }

mkdir -p "$DEST"
trap 'rm -f "$TMP"' EXIT

tar -czf "$TMP" -C "$(dirname "$SRC")" "$(basename "$SRC")"
mv "$TMP" "$DEST/worlds-$STAMP.tar.gz"
rsync -a --ignore-existing "$DEST/" "$OFFSITE/"
find "$DEST" -maxdepth 1 -name 'worlds-*.tar.gz' -mtime +14 -delete

Save it as /home/valheim/backup-valheim.sh, make it executable and schedule it from the valheim user’s crontab (sudo -iu valheim crontab -e) with the line 0 4 * * * /home/valheim/backup-valheim.sh. To restore, stop the server and extract an archive over the save folder:

sudo systemctl stop valheim
sudo -iu valheim tar -xzf /home/valheim/backups/worlds-DATE.tar.gz -C /home/valheim/.config/unity3d/IronGate/Valheim
sudo systemctl start valheim

Step 11: Run it as a service and update it safely

Iron Gate’s advice is to stop the server with Ctrl+C. A systemd unit can do the same: KillSignal=SIGINT is our choice to match that advice, and the stop timeout gives the server time to finish saving. Create /etc/systemd/system/valheim.service:

[Unit]
Description=Valheim dedicated server
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=valheim
WorkingDirectory=/home/valheim/server
ExecStart=/home/valheim/server/start-valheim.sh
Restart=on-failure
RestartSec=15
KillSignal=SIGINT
TimeoutStopSec=60

[Install]
WantedBy=multi-user.target

Run sudo systemctl daemon-reload and sudo systemctl enable --now valheim, then follow the log with journalctl -u valheim -f until “Game server connected” appears. On Windows, keep the launch window open and stop it with Ctrl+C. For updates, this script stops the service, takes a backup, updates the files and starts the service again. The EXIT trap restarts the server even when app_update fails, which keeps the server from staying down but can leave a half-updated build running, so read SteamCMD’s output after every run. Run it only once your players’ platforms have the same build:

#!/bin/bash
set -euo pipefail

trap 'sudo systemctl start valheim' EXIT
sudo systemctl stop valheim
sudo -iu valheim /home/valheim/backup-valheim.sh
sudo -iu valheim /usr/games/steamcmd \
  +@sSteamCmdForcePlatformType linux \
  +force_install_dir /home/valheim/server \
  +login anonymous \
  +app_update 896660 validate \
  +quit

Step 12: adminlist, bannedlist and permittedlist, and why one mod sends every console player away

Iron Gate’s guide names three files in the save path: adminlist.txt, bannedlist.txt and permittedlist.txt, each with one Platform User ID per line. You create them yourself and restart the server after editing. Admins get console commands, and the guide warns that adding anyone to the permitted list bans everyone else from the server. So fill the permitted list completely or leave it out. Iron Gate’s hotfix notes report repairing the ban list and whitelist, which had worked only with new IDs such as V_123456789 and not old ones such as Steam_123456789; Vi.ki dates the hotfixes to September 11, 2026. Test an entry with a second account before relying on a permitted list.

Mods decide who can be on the server at all. Vi.ki states that the console versions cannot load mods, and Iron Gate’s 1.0 FAQ says consoles get no mod support in 1.0 and the Steam Workshop is not featured. A server that requires mods is therefore a PC-only server, whichever backend it uses.

Whichever backend your group ends up on, the roughly 38-hour backup reach worked out in Step 10 means the off-disk copy is worth setting up before the first week of play.

Sofia Lindström

Sofia Lindström

Security and privacy

Sofia Lindström writes about security and privacy for Tech Insider: software vulnerabilities and the updates that fix them, data breaches, privacy rules and how products handle personal data. She works from vendor advisories, official vulnerability catalogues and the documents behind each story.

View all articles