Posted on September 16, 2024 · Updated on September 22, 2026

Valheim Dedicated Server Setup (1.0): Windows, Linux & Docker

by Taylor G.

Valheim 1.0 landed on September 9, 2026, and it brought the Deep North, PS5 and Switch 2 versions, and crossplay across every platform. It also brought a wave of people asking the same question they asked in 2021: how do I run a Valheim dedicated server for my friends?

This guide covers the whole thing on Windows, Linux (SteamCMD and Ubuntu) and Docker: installing the server, every launch argument, world modifiers from the command line, ports, crossplay join codes, admin lists, backups and the stuff that goes wrong. If you would rather skip the setup entirely, Host Havoc's Valheim server hosting does all of this from a control panel, but the guide below is for people who want to run it themselves.

Valheim dedicated server requirements

Valheim's server is light on paper and heavier in practice. The whole loaded world sits in RAM, and the server simulates everything near every connected player, so a well-explored 10-player world needs a lot more than a fresh one.

  • CPU: 2 cores minimum, 4 recommended. Clock speed matters more than core count. The main simulation runs on one thread.
  • RAM: 4 GB to start. Plan on 6 to 8 GB once the world is explored and you have 6+ people online at once.
  • Storage: About 1.5 GB for the server files plus your world. A .db file for a mature world is usually 50 to 200 MB, and backups multiply that.
  • Network: Budget roughly 1 Mbps of upload per connected player. A full server on a 10 Mbps upstream connection will feel it.
  • OS: Windows 10/11, Windows Server, or a 64-bit Linux distro with glibc 2.29 or newer (Ubuntu 20.04+, Debian 11+).
  • No GPU needed. The server runs headless.

A Steam account is only needed if you install through the Steam client. SteamCMD uses anonymous login.

Before you update: Valheim 1.0 and your existing world

Two things to know if you already run a world:

The Deep North only generates in unexplored areas. Valheim locks terrain into the world file as players get near it. If nobody has sailed far north, the new biome will generate fine on your existing world. If someone has, that region stays as the old placeholder. Iron Gate's advice is to start a fresh world for 1.0, and they have said they can't guarantee older worlds pick up every change.

Back up before you update, not after. Stop the server, copy both the .db and .fwl files for your world, then update. Once a zone has been loaded on 1.0 it is committed.

Also keep in mind that hotfixes have been landing every few days since launch. Steam updates player clients automatically, and a client can't join a server on a different version, so the server has to update first.

Step 1: Install the Valheim Dedicated Server

The dedicated server is a free tool on Steam (App ID 896660). You can install it two ways.

Through the Steam client (Windows): open your Library, set the filter to Tools, find "Valheim Dedicated Server" and install it. Right-click it and choose Manage > Browse local files to find the folder.

Through SteamCMD (Windows or Linux): this is the method that works on a VPS with no desktop. Install SteamCMD, then run:

steamcmd +force_install_dir /home/valheim/server +login anonymous +app_update 896660 validate +quit

On Windows, swap the path for something like C:\valheim_server. The same command updates the server later, so keep it handy.

Linux dependencies: the server needs libatomic1, libpulse0 and libpulse-dev. On Ubuntu or Debian:

sudo apt update && sudo apt install -y libatomic1 libpulse0 libpulse-dev

If your distro is older than glibc 2.29 (CentOS 7 and friends), the server won't start. The install ships a docker_start_server.sh script for exactly this case, covered in Step 6.

Step 2: Configure the launch script

There is no config file. Everything is set with launch arguments in a start script:

  • Windows: start_headless_server.bat
  • Linux: start_server.sh

Copy the script before editing it. Steam overwrites the original every time the server updates, and you will lose your settings. A minimal Windows script looks like this:

@echo off
set SteamAppId=892970
valheim_server.exe -nographics -batchmode -name "Odin's Basement" -port 2456 -world "Midgard" -password "mjolnir42" -crossplay

And the Linux equivalent (the stock start_server.sh already exports LD_LIBRARY_PATH and SteamAppId, so just change the last line):

./valheim_server.x86_64 -name "Odin's Basement" -port 2456 -world "Midgard" -password "mjolnir42" -crossplay

Password rules trip a lot of people up: the password has to be at least five characters, and it can't appear anywhere inside the server name. The server refuses to start otherwise. Leaving the password empty only works with -public 0, and you should not do that on anything reachable from the internet.

Valheim server launch arguments

ArgumentWhat it doesDefault
-name "..."Name shown in the server browsernone, required
-port 2456Game port. The server also uses port+1 for queries2456
-world "..."World to load. Created if it doesn't existnone, required
-password "..."Join password, 5+ characters, not part of the namenone
-savedir "path"Where worlds and permission lists are storedsee below
-public 0/11 lists the server in the browser, 0 hides it (join by IP only)1
-crossplayUse the PlayFab backend so Xbox, PS5 and Switch 2 can joinoff
-instanceid "..."Unique ID when running several crossplay servers on one machinenone
-logFile "path"Write the log to a file instead of the consoleconsole
-saveinterval 1800Seconds between world saves1800
-backups 4Number of automatic backups to keep4
-backupshort 7200Seconds until the first backup7200
-backuplong 43200Seconds between the remaining backups43200
-preset nameApply a world modifier presetnone
-modifier key valueSet one world modifier (repeatable)none
-setkey nameTurn on a world modifier checkbox (repeatable)none

The default save directory is %USERPROFILE%\AppData\LocalLow\IronGate\Valheim on Windows and ~/.config/unity3d/IronGate/Valheim on Linux. Worlds go in a worlds_local subfolder. Set -savedir to something explicit on a server so you always know where the world lives.

Step 3: World modifiers from the command line

Since the Hildir's Request update, difficulty is set per world rather than per client, and the dedicated server exposes the same options as the in-game World Modifiers screen.

Presets set everything at once: -preset followed by normal, casual, easy, hard, hardcore, immersive or hammer.

Modifiers change one setting: -modifier followed by a key and a value.

KeyValues
combatveryeasy, easy, hard, veryhard
deathpenaltycasual, veryeasy, easy, hard, hardcore
resourcesmuchless, less, more, muchmore, most
raidsnone, muchless, less, more, muchmore
portalscasual, hard, veryhard

Keys are the checkboxes: -setkey followed by nobuildcost, playerevents, passivemobs or nomap.

Order matters. A preset resets every modifier, so put -preset first and your -modifier and -setkey flags after it. A common setup for a friends-only server that doesn't want raids interrupting builds:

-preset normal -modifier raids none -modifier resources more -setkey passivemobs

The server writes these into the world when it starts, so the last combination you launched with sticks even if you remove the flags later.

Step 4: Ports, firewall and port forwarding

Valheim uses two UDP ports: the one you set with -port and the next one up. With the default that means UDP 2456 and 2457. Older guides mention 2458 as well. It was used by the Steam query system years ago and has not been needed since.

If you use the Steam backend (no -crossplay), both ports have to be forwarded from your router to the server's LAN IP, and open in the OS firewall. On Ubuntu:

sudo ufw allow 2456:2457/udp

On Windows, allow valheim_server.exe on private and public networks when the firewall prompt appears at first launch.

If you use -crossplay, the server talks to players through a relay, so there is nothing to forward. The port is still used to tell servers apart when several share one public IP.

Running on a VPS or a dedicated box? The provider usually has a firewall in front of the machine too. Open the ports there as well.

Step 5: Crossplay with Xbox, PS5 and Switch 2

Add -crossplay to the launch line and the server registers with PlayFab instead of Steam. When it comes up, the log prints a line like this:

Session "Odin's Basement" with join code 978199 and IP 203.0.113.10:2456 is active with 0 player(s)

Console players enter that six-digit join code. PC players can use the code or the IP and port. Two catches:

  • A crossplay server can't be joined by LAN IP or 127.0.0.1. Everyone goes through the relay, including you.
  • The relay adds a few milliseconds of latency compared to a direct Steam connection. Not much, but if your group is Steam-only you can leave crossplay off.

If you run more than one crossplay server on the same machine, give each one a different -instanceid so PlayFab can tell them apart.

Console patches sometimes ship a day or two after the PC hotfix. If one platform suddenly can't join after an update, that is usually why.

On a hosted server this is a single checkbox. See how to enable crossplay on a Host Havoc Valheim server for where the join code shows up.

Step 6: Start the server and keep it running

Run the script. The server is ready when the console prints Game server connected. On the Steam backend it can take a minute or two to appear in the server list; joining by IP works right away.

Stopping the server: press Ctrl+C in the console window. That triggers a save. Closing the window or killing the process can throw away everything since the last autosave.

Linux with systemd: a unit file keeps the server running across reboots and, more importantly, sends the right signal on shutdown. Save this as /etc/systemd/system/valheim.service:

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

[Service]
User=valheim
WorkingDirectory=/home/valheim/server
ExecStart=/home/valheim/server/start_server_custom.sh
KillSignal=SIGINT
TimeoutStopSec=60
Restart=on-failure

[Install]
WantedBy=multi-user.target

KillSignal=SIGINT is the important line. It is the same as Ctrl+C, so systemctl stop valheim saves the world before exiting. Enable it with sudo systemctl enable --now valheim.

Docker: the server folder includes docker_start_server.sh. Run ./docker_start_server.sh start_server_custom.sh and it builds a container with the right libraries on the first run, then starts straight away on later runs. World data lives in a Docker volume called valheim_server_data by default. Change DOCKER_DATA_VOLUME in the script to a normal path if you want the files somewhere you can see them.

Admins, bans and whitelists

Permissions are three text files in the save directory, one player ID per line:

  • adminlist.txt: who can use admin commands
  • bannedlist.txt: who is blocked
  • permittedlist.txt: a whitelist. If this file has anyone in it, everyone else is locked out.

IDs use the format Platform_ID, so a Steam player looks like Steam_76561198000000000 and an Xbox player like Xbox_2535400000000000. You can read a connected player's ID from the server log or from the F2 panel in game. The files are read live; no restart needed.

Admins open the console with F5 (the client needs -console in its Steam launch options) and get kick, ban, unban, banned and save. For the full list, see our Valheim console commands reference.

Backups, saves and updates

The server autosaves every 30 minutes by default (-saveinterval). Separately, it keeps rolling backups: with the defaults, one that is 2 hours old and three spaced 12 hours apart (-backups 4 -backupshort 7200 -backuplong 43200). They land next to the world in worlds_local.

Those backups live on the same disk as the server, so they don't help if the disk dies. Copy the world folder somewhere else on a schedule. A world is exactly two files, <name>.db and <name>.fwl, and they have to be backed up and restored as a pair.

To update, stop the server and run the same SteamCMD command from Step 1. The Steam client version updates itself when you launch it.

Troubleshooting

The server doesn't show in the browser. Check -public 1, check both UDP ports are forwarded and open, and wait a couple of minutes. Try joining by IP directly. If that works, the ports are fine and it's just the listing.

"Incompatible version" when joining. The server is behind the clients. Update it.

The server exits right after starting. Almost always the password: too short, or contained in the server name. Check the log.

Crossplay players can't connect but Steam players can. Make sure -crossplay is actually in the launch line and the log shows a join code. If the log shows a Steam-style startup instead, the flag was lost when Steam reset the script.

Everyone got kicked after I added a friend to the permitted list. That's what the file does. Add everyone or nobody.

RAM climbs over a long session. Normal for an explored world. A nightly restart at a quiet hour keeps it in check and is easy to schedule with systemd timers or Task Scheduler.

The world went back in time after a crash. The process was killed without a save. Use Ctrl+C or KillSignal=SIGINT, and restore from the backups in worlds_local if you need to.

Or rent a Valheim server and skip the script

Everything above is doable in an evening, and then it is yours to look after: updates on every hotfix, backups off the box, a machine that stays on, and absorbing whatever the internet throws at an open UDP port.

Rent a Valheim server from Host Havoc and the same settings become checkboxes. Crossplay, world modifiers, the password and the world name are set from the control panel, backups are automatic, and BepInEx mods install in one click. Servers deploy in minutes in North America, Europe, Australia and South America, and support answers around the clock. If you already have a world, you can upload it to your server and carry on where you left off.


Frequently asked questions

How much RAM does a Valheim dedicated server need?

4 GB is enough for a new world with a few players. Budget 8 GB for an explored world with 8 to 10 people online. The server holds the whole loaded world in memory, so usage grows as the map gets explored.

Is the Valheim dedicated server free?

Yes. The server tool is free on Steam and through SteamCMD, and it doesn't need a copy of the game or a logged-in Steam account. You pay for the hardware and the connection.

Can Xbox, PS5 and Switch 2 players join my server?

Yes, if the server runs with -crossplay. It then uses the PlayFab backend and hands out a join code that console players enter. Without the flag, only Steam players can see or join it.

Do I need to forward ports for a crossplay server?

No. Crossplay servers connect through a relay. Steam-backend servers need UDP 2456 and 2457 forwarded.

Will the Deep North appear in my existing world after 1.0?

Only in parts of the map nobody has explored yet. If your group has already been to the far north, that area won't regenerate. Iron Gate recommends a fresh world for 1.0.

How do I make myself admin on my Valheim server?

Add your platform ID (for example Steam_7656...) on its own line in adminlist.txt in the save directory. It takes effect without a restart. Then launch the game with -console and press F5.

How do I host a Valheim server without setting all this up?

Use a host. Host Havoc's Valheim server hosting runs the same dedicated server with crossplay, world modifiers and mods controlled from a panel, and updates it on every patch.