How to Host a Valheim Dedicated Server on LinuxGo back

How to Host a Valheim Dedicated Server on Linux

A Valheim dedicated server keeps your world online when the friend who hosts it logs off, and it holds the game's full ten players without one of them carrying the whole simulation on a gaming PC. Iron Gate ships the server as a free SteamCMD download with a native Linux build. Valheim left early access with version 1.0 on 9 September 2026, and the release changed the save format: a world is now a folder of chunks instead of a .db and .fwl pair. On Ubuntu or Debian the server needs SteamCMD, three libraries, a systemd unit that stops it with SIGINT so it saves, and either three open UDP ports or Iron Gate's crossplay relay. Admin and ban lists, off-machine backups and BepInEx mods complete the setup.

24 September 2026

by Clay Berndt

Valheim

Game Servers

SteamCMD

Self-Hosting

Loading...

Setup summary

A Valheim server is a native Linux binary downloaded through SteamCMD, with no game licence required. It uses a UDP port pair starting at 2456 and holds up to ten players. The full procedure on a clean Ubuntu or Debian machine:

  1. Pick a machine with 4 GB of RAM or more and a few fast cores.
  2. Install SteamCMD and the three libraries Iron Gate lists.
  3. Download the server (Steam app 896660) as an unprivileged user.
  4. Decide the launch options: server name, world, password, whether it appears in the public list, crossplay.
  5. Run it under systemd, stopping it with SIGINT so it saves the world on the way down.
  6. Open UDP 2456 to 2458, or use crossplay and open nothing.
  7. Put your own ID in adminlist.txt.
  8. Copy the save folder off the machine on a schedule.

The example server address, 203.0.113.10, comes from a range reserved for documentation. Use your own.

What Valheim 1.0 changed for servers

Iron Gate released Valheim 1.0 on 9 September 2026, adding the Deep North biome, a Unity engine upgrade and a new save system. Launch options, ports and the install carried over from the early-access server unchanged.

The save system is the change a server operator meets first. Patch notes for the public test build 0.221.13, released on 6 May 2026, describe a format that splits world data across chunks and writes only the chunks that changed, so a world is now a folder. A pre-1.0 world is converted the first time a 1.0 server loads it, and the server keeps a backup of the original. Early conversions had a bug: items on item stands and armour stands lost their upgrade levels. Patch 1.0.15 fixed it for conversions after 1.0.12 and tells affected players to restore that first-load backup.

Player IDs changed too. Since 1.0 a Steam player's ID carries a V_ prefix, and patch 1.0.12 made the ban list and whitelist accept the old Steam_ form alongside it.

Then there is the patch rate: 1.0.10 and 1.0.12 on 11 September, 1.0.14 on 17 September, 1.0.15 on 18 September. Players cannot join a server on a different version, so each patch means an update.

How much hardware a Valheim server needs

No official hardware requirements exist for the dedicated server. The numbers in circulation come from two community sources, neither of them measured on 1.0:

SourceMinimumRecommendedNotes
Valheim wiki (labelled unofficial)4 cores at 2.8 GHz, 2 GB RAM6 cores at 3.4 GHz or faster, 4 GB RAM or moreA fresh world uses 1.8 to 2.4 GB, plus 100 to 300 MB for each area where players are active
valheim-server-docker README4 GB RAM, 2 cores8 GB RAM, 4 high-clock coresMeasured about 2.8 GB resident with the server idle, on an undated early-access build

The per-area figure explains most of the spread. The server holds every area with an active player in memory, so ten people building in one base load one area, while ten people each sailing to a different biome load ten. Plan for the second case.

Hosting provider ConnectHosting measured a freshly generated 1.0 world with no players at 1.34 GB resident, on build 1.0.7 (published 10 September 2026), and reports that memory changes little between two and ten players in one world. Early-access figures ran higher. In an April 2021 thread, the maintainer of the mbround18 Docker image measured about 4 GB with four or five players, and another user watched an idle server climb to 3.1 GB over eight hours.

An estimate built from those figures and the wiki's per-area model:

SituationRAM in useBasis
Fresh 1.0 world, no playersAbout 1.3 GBConnectHosting's 1.0.7 measurement
Up to ten players in one base2 to 3 GBOne loaded area on the wiki's model, and ConnectHosting's small two-to-ten player difference
Ten players in ten separate areasUp to about 5.5 GBThe wiki's upper figures: 2.4 GB plus 10 × 300 MB
Any of these after days of uptimeAdd about 1 GBEarly-access growth reports from 2021 to 2023

A 4 GB machine covers the first two rows. 8 GB covers all four with room left for the operating system.

Install on Ubuntu or Debian

Step 1: SteamCMD and libraries

SteamCMD is a 32-bit program, so enable the i386 architecture first. On Ubuntu it is in the multiverse component; on Debian, add non-free to your apt sources instead of the first line:

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

The last three packages are the ones Iron Gate's dedicated server guide lists for Linux. The Valheim wiki adds libc6 for the PlayFab connection crossplay uses; it is installed on every standard Ubuntu and Debian system already.

Step 2: Service user and download

A game server parses traffic from strangers all day. Give it an account that owns nothing else:

sudo useradd --create-home --shell /bin/bash steam
sudo -u steam /usr/games/steamcmd +force_install_dir /home/steam/valheim \
  +login anonymous +app_update 896660 validate +quit

+force_install_dir only works ahead of +login. The server's app ID is 896660; the game client's is 892970, which the server needs in its environment at launch.

Step 3: Look at the stock start script

The download includes start_server.sh. It sets LD_LIBRARY_PATH to the bundled linux64 libraries, exports SteamAppId=892970 and starts valheim_server.x86_64 with example options. The script's own comment tells you to make a copy before editing, because every SteamCMD update overwrites it. A systemd unit that starts the binary directly does not use the script at all, so an update that overwrites it costs nothing.

Launch options

Everything about the server is set on the command line. The options from Iron Gate's guide:

OptionWhat it does
-name "Nine Worlds"Name shown in the server list
-port 2456Game port. The server also uses the port above it
-world "Dedicated"Loads the world with that name, or creates it
-password "..."Join password. The stock script's comment sets two rules: at least five characters, and it cannot contain the server name
-public 1 or 01 lists the server in the community list; 0 makes it joinable only by address
-crossplayRuns the server on Iron Gate's PlayFab relay, which console and Microsoft Store players need
-savedir /pathMoves worlds and permission lists away from the default location
-saveinterval 1800Seconds between world saves. 1800 (30 minutes) is the default
-backups 4How many automatic backups to keep
-backupshort 7200 / -backuplong 43200Age of the first backup and of the rest, in seconds
-instanceid 1A unique ID per server when several run from one machine on the same port

World modifiers

World modifiers set the difficulty per world. -preset takes normal, casual, easy, hard, hardcore, immersive or hammer, and -modifier adjusts one setting after it, such as -modifier raids none or -modifier portals casual. -setkey switches on one of nobuildcost, playerevents, passivemobs or nomap.

Modifiers are stored in the world save, not read fresh on each start. Removing -preset hardcore from the command line leaves the world on hardcore; LinuxGSM's config notes that you reset it by starting once with -preset normal.

Run it under systemd

Iron Gate's instruction for stopping the server is Ctrl+C, which sends SIGINT, and the server saves the world as it exits. systemd stops services with SIGTERM by default, so the unit changes the signal to match what Iron Gate documents.

Keep the password out of the unit file, which every user on the system can read. Put it in /etc/valheim.env with mode 600:

VALHEIM_PASSWORD=long-join-password

Then the unit, at /etc/systemd/system/valheim.service:

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

[Service]
User=steam
Group=steam
WorkingDirectory=/home/steam/valheim
EnvironmentFile=/etc/valheim.env
Environment=LD_LIBRARY_PATH=/home/steam/valheim/linux64
Environment=SteamAppId=892970
ExecStart=/home/steam/valheim/valheim_server.x86_64 -nographics -batchmode \
  -name "Nine Worlds" -port 2456 -world "Dedicated" \
  -password ${VALHEIM_PASSWORD} -public 0
KillSignal=SIGINT
TimeoutStopSec=120
Restart=on-failure
RestartSec=15

[Install]
WantedBy=multi-user.target

-nographics -batchmode are the Unity switches the stock script passes for a headless server. TimeoutStopSec=120 gives a large world two minutes to write before systemd gives up and kills it. Start the service and watch the log:

sudo systemctl daemon-reload
sudo systemctl enable --now valheim
journalctl -u valheim -f

The server is ready when the log reports the game server connected and the world loaded; the first start of a new world takes longer because it generates the map.

Ports and how players join

There are two ways in, and they need different network setups:

Direct connectionCrossplay (-crossplay)
Who can joinSteam playersEvery platform: Steam, Microsoft Store, Xbox, PlayStation 5, Switch 2
Inbound portsUDP 2456 to 2458None
How to joinJoin IP with 203.0.113.10:2456, or the community list if -public 1Join IP, a join code, or the community list
PathPlayer straight to the serverPlayer through Iron Gate's PlayFab relay
ModsWork, if every player has themConsole players cannot load mods

For a direct server, open the ports:

sudo ufw allow 2456:2458/udp comment 'Valheim'

Iron Gate's guide names the game port and the one above it (2456 and 2457, the second being the Steam query port). The stock script's comment and the 2021 server manual list 2456 to 2458, and the community Docker image uses 2458 for crossplay and for some mods, so open all three. No TCP port needs to be reachable; the Valheim wiki notes that the TCP port the server opens is for local Steamworks traffic only.

Crossplay trades those ports for a relay. Iron Gate's guide says a crossplay server "transmits data via a relay server and therefore does not require Port Forwarding". The costs, per the Valheim wiki: the relay adds its own hop to every packet, LAN and loopback addresses stop working for joining, and two hosts behind the same carrier-grade NAT address can collide at registration. On a server with a public IP and a firewall you control, direct connection is the shorter path. Crossplay is the right switch when someone in the group plays on a console, since Iron Gate's 1.0 FAQ states that Valheim supports crossplay between all platforms.

An open UDP port on a public address is also a DDoS target. A flood fills the link before any host firewall rule sees it, which is why the DDoS attack types guide puts mitigation in the network upstream of the server.

Admins, bans and a whitelist

Three text files in the save directory (/home/steam/.config/unity3d/IronGate/Valheim/ by default) control who can do what:

  • adminlist.txt: players who can use admin console commands such as kick and ban
  • bannedlist.txt: players who cannot join
  • permittedlist.txt: a whitelist. As soon as one ID is in it, everyone not listed is refused

Each file takes one ID per line, in the format Iron Gate gives as [Platform]_[User ID], case sensitive. Users of the community Docker image report that a bare SteamID64 is ignored on 1.0. Have the player join once and copy their exact ID from the F2 panel or the server log. The 1.0.12 fix for old-style IDs covered the ban and whitelist files; its notes do not mention the admin list, so write admins in the form the server prints.

Saves and backups under the 1.0 format

Worlds live in worlds_local/ under the save directory, one folder per world since 1.0. The server writes the world every 30 minutes by default and keeps its own rotating backups, set by -backups, -backupshort and -backuplong. Those sit on the same disk. They cover a bad save, not a dead drive or a deleted home directory.

A nightly copy off the machine covers the rest. Stopping the server first gives a consistent snapshot, and a restart at 4 a.m. costs the players nothing:

sudo systemctl stop valheim
tar -C /home/steam/.config/unity3d/IronGate -czf /var/backups/valheim-$(date +%F).tar.gz Valheim
sudo systemctl start valheim
rsync -a /var/backups/ backup@198.51.100.20:/srv/valheim/

To move a world from a friend's PC onto the server, copy its folder from their worlds_local directory into the server's, and start the server with -world set to its name. A pre-1.0 world arriving as a .db and .fwl pair converts on first load. The community Docker project notes that the conversion is one-way, so keep a copy of the old files somewhere the server cannot touch.

Updating is the install command again with the service stopped:

sudo systemctl stop valheim
sudo -u steam /usr/games/steamcmd +force_install_dir /home/steam/valheim \
  +login anonymous +app_update 896660 validate +quit
sudo systemctl start valheim

Mods with BepInEx

Valheim modding runs on BepInEx, without the studio's backing: Iron Gate's 1.0 FAQ says it has no official mod support and cannot guarantee any mod works on 1.0. The loader, BepInExPack_Valheim on Thunderstore, has been updated for 1.0; it installs into the server directory and brings its own start_server_bepinex.sh. Copy that script, edit your launch options into the copy, point ExecStart at it, and drop mod DLLs into BepInEx/plugins. systemd sends the stop signal to every process in the service, so KillSignal=SIGINT still reaches the server behind the script.

Mods split into two kinds. Server-only mods, such as backup or admin tools, change nothing on the client. Gameplay mods need the same version on every client, and a mismatch shows up as players who connect and then get kicked. ValheimPlus, the long-running gameplay and quality-of-life mod, stopped at version 0.9.9.11 in its original repository in December 2022; the maintained fork is Grantapher/ValheimPlus, which released 0.10.2.0 on 20 September 2026.

Console players cannot install mods at all, per the same FAQ, so any mod that needs a client install makes the server Steam-only. Decide between crossplay and a modded world before inviting anyone.

FAQ

How many players can join a Valheim dedicated server?

Ten. Iron Gate's 1.0 FAQ describes Valheim as a game for 1 to 10 players, and the server has no launch option to raise the cap. Community mods lift it, but every player then needs a matching modded client.

Which ports does a Valheim server need?

UDP 2456 and 2457 for a server joined directly: the game port and the port above it. Open 2458/udp as well, which the stock start script's comment lists and some mods use. No TCP port needs to be public. A server started with -crossplay connects out to a relay and needs no inbound ports at all.

How much RAM does a Valheim server need?

Iron Gate publishes no figure. One hosting provider measured a fresh 1.0 world with no players at 1.34 GB, and on the Valheim wiki's per-area figures ten players in ten separate areas reach about 5.5 GB. A 4 GB machine covers a group that plays together; 8 GB covers ten players spread across the map.

Can Xbox and PlayStation players join a server on Linux?

Yes, if the server runs with -crossplay. Iron Gate's 1.0 FAQ states that Valheim supports crossplay between all platforms, and crossplay traffic goes through Iron Gate's relay. Console players cannot load mods, so a modded server is Steam-only in practice.

Will my pre-1.0 world work on a 1.0 server?

Yes. The server converts the world to the new chunked format the first time it loads it and keeps a backup of the original. The conversion is one-way, so copy the world off the machine before the first 1.0 boot if you might want to go back.

Deploying on Serverside

A ten-player Valheim world is a light load next to Palworld, and a few friends can run one on a small VPS. What changes the picture is running it for a community that plays every evening: a direct-connect server has a public UDP port that anyone can flood, and it shares a CPU with nobody only if the machine is yours. A Serverside game server is a single-tenant AMD Ryzen box with full root on our own network, AS55285, with always-on DDoS mitigation inline in front of the game ports and provisioning in under a minute.

One machine also holds several worlds. Each Valheim instance needs its own port range (2456, 2466, 2476 and so on) and its own -world, and the game server hosting guide covers running many instances behind a panel. The other two guides in this series are how to host a Palworld server and how to host a Minecraft server.

Clay Berndt

Written by

Clay Berndt

CEO, Serverside.com & Host Havoc

Clay is the CEO of Serverside.com and Host Havoc, with more than a decade of experience running globally distributed hosting infrastructure and a game-server platform that has served over 200,000 customers.

Keep reading

View all articles