To run a Valheim dedicated server on Linux, download app 896660 with SteamCMD, start valheim_server.x86_64 with a name, world and password, and open UDP ports 2456–2457, or add -crossplay and open none. Run it as its own user under systemd and stop it with SIGINT, the signal Valheim treats as “save and quit”. This guide covers Valheim 1.0, released on 9 September 2026, which changed how worlds are stored on disk.
| Item | Value |
|---|---|
| SteamCMD app ID | 896660 |
| Ports (Steam backend) | UDP 2456 gameplay, UDP 2457 Steam query (-port and port+1) |
| Ports (crossplay) | None inbound; traffic goes through a PlayFab relay |
| Default save path | ~/.config/unity3d/IronGate/Valheim |
| Worlds | worlds_local/<World>/, one folder per world since 1.0 |
| Player cap | 10 (Iron Gate calls it a game for 1–10 players) |
| Linux packages | libatomic1, libpulse0, libpulse-dev |
How much RAM and CPU does a Valheim server need?
Iron Gate publishes no hardware requirements for the server. The community-maintained Valheim wiki puts a fresh world at roughly 1.8–2.4 GB of RAM, adds about 100–300 MB for every area where players are active, and recommends 4 GB or more. For the CPU it lists four cores as the minimum and six as recommended. Load is low most of the time and peaks when players explore, because the server generates new terrain on the fly.
One architectural fact explains most “server lag”: Valheim’s server mostly relays traffic. The physics and creatures of an area are simulated by the first client that enters it. When that player’s PC or connection struggles, everyone near them sees doors and chests respond late, and a bigger server does not change that. Let the player with the strongest PC enter busy areas first.
How do I install a Valheim server with SteamCMD?
- 1Install the libraries and create a user
Iron Gate’s guide lists
libatomic1,libpulse-devandlibpulse0for Linux; SteamCMD itself needslib32gcc-s1. Valve advises against running SteamCMD as root, so the server gets its own account:Debian 12 · 13 · Ubuntu 24.04 sudo apt update sudo apt install -y curl ca-certificates lib32gcc-s1 libatomic1 libpulse0 libpulse-dev sudo useradd --system --create-home --home-dir /opt/valheim --shell /usr/sbin/nologin valheim sudo -u valheim -H mkdir -p /opt/valheim/steamcmd /opt/valheim/data - 2Install SteamCMD
Debian · Ubuntu sudo -u valheim -H sh -c 'curl -fsSL https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz | tar -xz -C /opt/valheim/steamcmd' - 3Download the dedicated server
The install directory goes before the login, as Valve recommends. Run the same command again whenever Valheim updates: a client and a server on different versions cannot connect.
Debian · Ubuntu sudo -u valheim -H /opt/valheim/steamcmd/steamcmd.sh \ +force_install_dir /opt/valheim/server \ +login anonymous +app_update 896660 validate +quit
What goes in start_server.sh?
The server ships a start_server.sh that sets two environment variables and launches the binary with your options. Iron Gate suggests editing a copy, because a server update overwrites the original. Under systemd you do not need the script at all; the unit below sets the same variables. These are the arguments that matter:
| Argument | What it does | Default |
|---|---|---|
-name "My server" | Name in the server list | — |
-world "Dedicated" | Loads this world, or creates it if missing | — |
-password "secret" | At least 5 characters and not contained in the server name, world name or seed, or the server will not start | — |
-port 2456 | Gameplay port; the query port is this +1 | 2456 |
-public 1 | 1 lists the server, 0 hides it (join by IP only) | 1 |
-crossplay | PlayFab backend: players on every platform can join, consoles included | off |
-savedir /path | Where worlds and the admin and ban lists live | ~/.config/unity3d/IronGate/Valheim |
-saveinterval 1800 | Seconds between world saves | 1800 |
-backups 4 | Automatic backups kept, at -backupshort and -backuplong spacing | 4 (2 h, then 12 h apart) |
-preset hard | World modifier preset, e.g. casual, hard, hardcore | — |
Should I use -crossplay or the Steam backend?
The flag decides who can join and how traffic flows, so choose deliberately:
| Steam backend (no flag) | -crossplay | |
|---|---|---|
| Who can join | Steam players only | All platforms, including consoles |
| Inbound ports | UDP 2456–2457 | None; the server talks to a relay |
| Join by | Server list or IP:port | Server list, IP:port or a join code |
| Connection quality | Direct path to your server | Extra relay hop; the Valheim wiki notes more lag and disconnects |
A VPS has a public IP and no router in the way, so the main reason for crossplay, avoiding port forwarding, does not apply. If your whole group plays on Steam, leave the flag off. Add it as soon as one friend plays on a console or the Microsoft Store version.
How do I run Valheim as a systemd service?
Keep the password out of the unit file, then let systemd start the server, update it before each start, and stop it with SIGINT so the world is saved:
sudo install -d -m 0700 /etc/valheim
echo 'VALHEIM_PASSWORD=choose-a-long-password' | sudo tee /etc/valheim/valheim.env >/dev/null
sudo chmod 600 /etc/valheim/valheim.env[Unit]
Description=Valheim dedicated server
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=valheim
Group=valheim
WorkingDirectory=/opt/valheim/server
EnvironmentFile=/etc/valheim/valheim.env
Environment=LD_LIBRARY_PATH=/opt/valheim/server/linux64
Environment=SteamAppId=892970
# update before every start; the leading "-" lets a failed update fall through
ExecStartPre=-/opt/valheim/steamcmd/steamcmd.sh +force_install_dir /opt/valheim/server +login anonymous +app_update 896660 +quit
ExecStart=/opt/valheim/server/valheim_server.x86_64 -nographics -batchmode \
-name "Midgard EU" -port 2456 -world "Midgard" -password ${VALHEIM_PASSWORD} \
-savedir /opt/valheim/data -public 1
# add -crossplay to the line above for console and Microsoft Store players
KillSignal=SIGINT
TimeoutStartSec=900
TimeoutStopSec=120
Restart=on-failure
RestartSec=15
[Install]
WantedBy=multi-user.targetsudo systemctl daemon-reload
sudo systemctl enable --now valheim
sudo journalctl -u valheim -f # wait for "Game server connected"
sudo journalctl -u valheim | grep -i 'join code' # crossplay onlySteamAppId=892970 is the game’s own app ID, not the server’s, and the server needs it to talk to Steam. -nographics -batchmode are the standard Unity switches for running without a display. The systemd service guide explains each directive if you want to adapt the unit.
Which firewall rules does a Valheim server need?
For the Steam backend, open the gameplay and query ports for UDP. Allow SSH first so enabling the firewall does not lock you out:
sudo apt install -y ufw # preinstalled on Ubuntu
sudo ufw allow 22/tcp # your SSH port, first
sudo ufw allow 2456:2457/udp comment 'Valheim'
sudo ufw enable
sudo ss -ulpn | grep valheim # Steam backend: 2456 and 2457 should showA crossplay-only server needs no inbound game ports. The server only needs outbound internet access to reach Steam and the relay, which a default ufw setup allows. Check any firewall in your provider’s panel too; more on rules in the UFW guide.
Where are Valheim world files, and how do I upload my own?
With the unit above, worlds live in /opt/valheim/data/worlds_local, next to adminlist.txt, bannedlist.txt and permittedlist.txt. Since 1.0, each world is a folder named after the world, split into chunk files that are written only when that area changes. Guides telling you to copy one .db and one .fwl file describe the old format; you now need the whole folder. A pre-1.0 world is converted the first time a 1.0 server loads it.
To host a world you started in single player, copy its folder from your PC. On Windows it is under %USERPROFILE%\AppData\LocalLow\IronGate\Valheim\worlds_local. A cloud save lives in worlds instead; use Manage Saves in the game to move it to local first:
# on your PC
scp -r "$env:USERPROFILE\AppData\LocalLow\IronGate\Valheim\worlds_local\Midgard" root@203.0.113.10:/tmp/
# on the server
sudo systemctl stop valheim
sudo install -d -o valheim -g valheim /opt/valheim/data/worlds_local
sudo mv /tmp/Midgard /opt/valheim/data/worlds_local/
sudo chown -R valheim:valheim /opt/valheim/data/worlds_local/Midgard
sudo systemctl start valheim # -world "Midgard" must match the folder nameFor admins, add one ID per line to adminlist.txt. Copy the ID exactly as the F2 panel in game or the server log shows it, platform prefix included; IDs are case sensitive. Admins can use kick, ban, unban and banned in the F5 console. Adding anyone to permittedlist.txt locks out everyone not on it.
How do I back up a Valheim server?
The built-in -backups rotation covers a bad evening. Add a nightly archive you can copy off the machine. The safest copy is taken while the server is stopped, and a short stop at 05:00 also installs any pending update through ExecStartPre:
sudo tee /usr/local/sbin/valheim-backup >/dev/null <<'EOF'
#!/bin/sh
set -eu
DEST=/var/backups/valheim
mkdir -p "$DEST"
systemctl stop valheim
trap 'systemctl start valheim' EXIT # start again even if tar fails
tar -czf "$DEST/valheim-$(date +%F).tar.gz" -C /opt/valheim data
ls -1t "$DEST"/valheim-*.tar.gz | tail -n +15 | xargs -r rm --
EOF
sudo chmod 750 /usr/local/sbin/valheim-backup
(sudo crontab -l 2>/dev/null; echo "0 5 * * * /usr/local/sbin/valheim-backup") | sudo crontab -Then pull /var/backups/valheim to another machine with rsync. Before a major game update, a backup of the whole VPS from your provider’s panel is the faster way back; on VMHeaven that is the Backups tab of the server.
Why doesn’t my Valheim server show up or let me join?
| Symptom | Confirm with | Fix |
|---|---|---|
| Service exits right after start | journalctl -u valheim -n 50 | Most often the password: under 5 characters, or contained in the server name, world name or seed |
| Incompatible version | Message in the game client | Restart the service so ExecStartPre updates the server, or have players update |
| Not in the server list | sudo ss -ulpn | grep 2457 | Steam backend: open UDP 2457 and wait a few minutes; or join by IP:2456 |
| Joining by IP times out | sudo ufw status | Open UDP 2456–2457 in ufw and any panel firewall |
| New empty world instead of yours | ls /opt/valheim/data/worlds_local | -world must match the folder name exactly, and -savedir must point at the right place |
Which VPS plan fits a Valheim server?
Valheim is light compared with Palworld: memory scales with the areas players have loaded, CPU with exploration. Matched against the wiki’s figures, our Hi-CPU KVM line (AMD EPYC, ECC memory) sizes up like this:
- 2–5 players, mostly building: HI-CPU 2 with 2 vCores and 4 GB meets the wiki’s memory recommendation. It has fewer cores than the wiki suggests, so expect slower terrain generation when someone sails into new land.
- Up to 10 players, big bases or a lot of exploring: HI-CPU 4 with 4 vCores and 8 GB reaches the wiki’s core minimum and leaves memory for many active areas.
- Modded servers: HI-CPU 5 with 6 vCores and 12 GB matches the six-core recommendation; mods add memory and CPU that the numbers above do not include, so measure.
Those are shared vCores, not the dedicated cores the wiki has in mind, so watch top during the first big exploring session. If you want more cores for the same money, Standard KVM (Intel, DDR4 ECC) carries more vCores and more RAM on each price step. If you would rather start from a plain Debian VPS, the commands above work unchanged. To size Valheim against eight other games on both lines, see gaming VPS.
Every plan sits behind always-on DDoS filtering, and you can pay by card, PayPal or crypto (Bitcoin, Ethereum, USDT, Litecoin, Monero and more). Servers stand in Amsterdam and Frankfurt; stock differs per location, so check the product page.
Frequently asked
What ports does a Valheim dedicated server need?
UDP 2456 for gameplay and UDP 2457 for the Steam query, or your -port value and the port above it. A server started with -crossplay connects through a relay and needs no inbound port, at the cost of an extra hop that can add lag and disconnects.
Where does a Valheim dedicated server save the world on Linux?
In ~/.config/unity3d/IronGate/Valheim/worlds_local of the user running the server, unless -savedir points elsewhere. Since Valheim 1.0 each world is a folder named after the world, and you need every file in that folder to back it up or move it.
How many players can join a Valheim dedicated server?
Ten. Iron Gate describes Valheim 1.0 as a game for 1 to 10 players, and the server has no official setting to raise that cap.