Valheim will happily host from inside the game, and that is the problem: the world lives on one player's machine, exists only while they are playing, and their frame rate is everybody's simulation. A dedicated server separates the world from the people visiting it. It needs about 2 GB of memory for a handful of friends and 4 GB for a full group of ten, one fast CPU core, two UDP ports, and a password. Everything else in this guide is detail - but it is the detail that decides whether the world is still there in six months.
What a Valheim dedicated server is, and what it can do#
The dedicated server is a separate, free application (valheim_server, Steam app id 896660) with no graphics. It loads one world, keeps it running with nobody online, and accepts up to 10 players at a time. That cap is hard-coded; only mods raise it, and the game is not balanced or optimised for more.
What it supports out of the box:
- Crossplay between Steam, Microsoft Store / Game Pass on PC, and Xbox, through the
-crossplayflag. Crossplay servers are joined with a six-digit join code or through the community list, and traffic is relayed through PlayFab rather than sent straight to your port. - World modifiers - the difficulty presets and individual sliders added in the Hildir's Request update: combat difficulty, death penalty, resource rate, raid frequency, portal rules and a few switches such as no build cost.
- An allow list, a ban list and an admin list, each a plain text file of player IDs.
- Automatic world backups on a timer, kept beside the world file.
- Mods, through BepInEx, which the vanilla server knows nothing about but runs perfectly well under.
What it does not have is a configuration file. A Valheim server is configured entirely by its launch arguments, which surprises people arriving from Minecraft looking for a server.properties.
One design decision explains most of Valheim's multiplayer behaviour, so it is worth knowing before you size anything: the server does not simulate the whole world. The world is divided into zones, and each zone is simulated by the first player who walks into it. The server stores the world, relays state between players and owns the zones nobody else does. This is why one player on hotel wifi can make monsters rubber-band for everybody standing near them, and why a dedicated server improves things (the world no longer depends on the host's PC) without curing every kind of lag.
Requirements and resource usage#
Valheim's server is light next to the survival games that came after it. Memory grows with the explored area and with the number of pieces built - a world with four large bases holds far more instances than a fresh one.
| Group | RAM | CPU | Notes |
|---|---|---|---|
| 1-3 players, new world | 2 GB | 1 core | Comfortable until the world is well explored |
| 4-6 players, several bases | 3-4 GB | 1.5-2 cores | The common case |
| 7-10 players, mapped world | 4-6 GB | 2+ cores | Large builds and terraforming start to cost |
| Modded (BepInEx, 10+ mods) | 6-8 GB | 2+ cores | Depends entirely on the mods |
- CPU: the simulation leans on one thread, so clock speed matters more than core count. A second core is still useful - saving and networking happen off the main thread.
- Disk: the server is about 2 GB installed. A world is one
.dbfile, typically 20-150 MB for a long-lived world, plus its backups. 10 GB is more than enough; fast storage shortens the freeze during a save. - Network: Valheim sends little data - roughly 50-150 KB/s per player at peak. Latency between players matters more than bandwidth, because of the zone ownership described above. See latency, jitter and packet loss for how to tell which one you have.
The heaviest thing you can do to a Valheim server is terraform. Every raised or flattened patch of ground is stored as a modification, and a base built on a levelled mountain costs more than the same base on natural ground. If a mature world stutters when people gather at the main base, that is usually the reason - not the plan. The general rule in CPU vs RAM for game servers applies: check which one is actually at its limit before paying for more of the other.
Launch settings: the whole configuration#
On your own Linux machine, the server is installed with SteamCMD and started with a line like this:
$ steamcmd +force_install_dir /home/valheim/server +login anonymous +app_update 896660 validate +quit$ cd /home/valheim/server$ ./valheim_server.x86_64 -nographics -batchmode \ -name "Longship Crew" -port 2456 -world "Midgard" \ -password "herring-barrel-42" -public 1 -crossplay \ -saveinterval 1200 -backups 4On a panel-based host you do not write that line; the same arguments appear as fields on the Startup tab. Either way, these are the ones that exist:
| Argument | Default | What it does |
|---|---|---|
-name | - | The name in the server browser. Must not contain the password |
-world | Dedicated | The world file to load, created if it does not exist |
-password | - | Minimum 5 characters. Must not appear in the server name or world name |
-port | 2456 | Game port. The server also uses the next port up |
-public | 1 | 1 lists the server in the community browser, 0 hides it |
-crossplay | off | Enables Xbox / Microsoft Store players and the join code |
-savedir | platform default | Where worlds and the list files live |
-saveinterval | 1800 | Seconds between world saves |
-backups | 4 | How many automatic backups to keep |
-backupshort | 7200 | Seconds until the first backup |
-backuplong | 43200 | Seconds between later backups |
-preset | - | A world modifier preset (see below) |
-modifier | - | One modifier and its value, repeatable |
-setkey | - | A world switch such as nomap, repeatable |
-instanceid | - | Distinguishes several servers on one machine |
-logFile | stdout | Write the log to a file instead |
The world name is a file name. -world "Midgard" loads Midgard.db and Midgard.fwl from the worlds_local folder, and creates them with a random seed if they are missing. That is also how you move an existing world onto a server, covered below.
Ports, crossplay and connecting#
| Port | Protocol | Purpose |
|---|---|---|
2456 | UDP | Game traffic |
2457 | UDP | Steam query - what the server browser talks to |
Both must be open, and both are UDP - a TCP-only firewall rule is the classic reason a server runs but cannot be found. If you changed -port, the query port is always that number plus one. Game server ports explained goes through why query ports exist and what happens when only one of the pair is reachable.
There are three ways in, and they behave differently:
- Join by IP (Steam players only): Join Game, then Add Server, then
203.0.113.10:2456. The most reliable method, and the one to use when the browser is being slow. - Community list: needs
-public 1and can take several minutes to show a new server. The list is long and the in-game filter is weak, so search for an unusual word in your server's name. - Join code (crossplay servers): six digits, printed in the log at startup and shown in the panel console. Anyone on any platform enters it under Join Game. The code changes every time the server restarts.
Session "Longship Crew" with join code 483920 and IP 203.0.113.10:2456 is active with 0 player(s)Crossplay is worth switching on only if you need it. Relayed traffic adds a hop, and players on a crossplay server are identified by platform IDs rather than plain SteamIDs, which changes what goes in the admin list. A Steam-only group gets slightly lower latency with -crossplay left off. You can also put a name on the address - connecting a domain to a game server covers the A record - though for Valheim it only helps players who join by IP.
Admins and console commands#
Admin rights come from adminlist.txt in the save directory, one player ID per line. bannedlist.txt and permittedlist.txt work the same way; if permittedlist.txt contains any ID at all, the server becomes allow-list-only.
// Steam-only server: the 17-digit SteamID6476561198012345678// Crossplay server: the platform-prefixed IDSteam_76561198012345678Xbox_2535412345678901The reliable way to get the exact ID is to have the player join once and read it from the server log, where every connection is recorded with the ID in the form the server expects. The files are re-read while the server runs, so a restart is not required.
An admin opens the console with F5 (it has to be enabled first: add -console to the game's launch options in Steam) and can use:
| Command | Effect |
|---|---|
help | Lists available commands |
kick [name/ip/userID] | Removes a player |
ban [name/ip/userID] | Bans and adds them to bannedlist.txt |
unban [ip/userID] | Removes a ban |
banned | Prints the ban list |
save | Forces a world save immediately |
ping | Round trip to the server |
info | Prints system and version info |
That short list is all of it. The cheat commands people know from single-player - devcommands, spawn, god, fly - do not work on a vanilla dedicated server, admin or not. Enabling them needs a mod (Server Devcommands is the usual one). There is also no RCON in vanilla Valheim; remote administration is the panel console plus the three list files.
World modifiers and presets#
Modifiers are set at launch and stored in the world, so they can be changed later by restarting with different arguments. A preset is a bundle; individual modifiers override it.
# A forgiving server for a casual group-preset casual# Or build your own-modifier combat hard -modifier deathpenalty casual -modifier resources more \-modifier raids less -modifier portals casual -setkey playerevents| Modifier | Values |
|---|---|
combat | veryeasy, easy, hard, veryhard |
deathpenalty | casual, veryeasy, easy, hard, hardcore |
resources | muchless, less, more, muchmore, most |
raids | none, muchless, less, more, muchmore |
portals | casual (ores allowed), hard (no boss portals), veryhard (no portals) |
Presets are normal, casual, easy, hard, hardcore, immersive and hammer. The -setkey switches are nobuildcost, playerevents (raids scale to each player's progress instead of the world's), passivemobs and nomap. portals casual is the single most requested setting: it lets metals through portals and removes most of the sailing-as-logistics the game is built around, so agree on it as a group before the first swamp trip rather than after. Valheim world modifiers and presets takes each of these apart in detail.
Moving an existing world onto the server#
A world is two files with the same name: Name.fwl (metadata and seed, a few hundred bytes) and Name.db (everything else). On Windows, single-player worlds live in:
%USERPROFILE%\AppData\LocalLow\IronGate\Valheim\worlds_local\If the folder is empty, the world is in Steam Cloud under worlds instead - open the game, use Manage Saves, and move it to local first.
- Stop the server. Never upload over a running world; the next save overwrites it.
- Upload both files to the server's
worlds_localfolder over SFTP or the file manager - SFTP and the file manager has the connection details. - Set the world name on the Startup tab to the file name without its extension, matching capitals exactly.
- Start the server and watch the log for
Load world: Name. If it says it is generating a new world, the name did not match.
Characters are not part of the world. They stay on each player's own machine, which is why inventory survives a move between servers - and why a server cannot stop somebody arriving with gear from another world.
Mods on a dedicated server#
Valheim mods run on BepInEx. On a server, that means the BepInExPack for Valheim unpacked into the server's root folder - a BepInEx directory, doorstop_libs, and a start_server_bepinex.sh script that replaces the normal start command. Mods are .dll files placed in BepInEx/plugins, and their settings appear in BepInEx/config after the first start.
The distinction that matters is where a mod has to be installed:
- Server-side only: backup managers, server-side anti-cheat, Discord bridges. Players need nothing.
- Client-side only: interface and quality-of-life mods. The server is not involved at all.
- Both: anything that changes game rules or adds content - Valheim Plus forks, Epic Loot, Plant Everything, creature and biome packs. Every player needs the same mod at the same version, with matching config, or they are kicked at connection or desync after it.
Two consequences follow. Xbox players cannot install mods, so a server that requires client mods is a PC-only server whatever the crossplay flag says. And every game patch breaks BepInEx mods until their authors update them, so a modded server should not auto-update on the day of a patch. Keep a copy of the working BepInEx folder, and read what to do when a mod update breaks before you need it. The full install is in Valheim mods with BepInEx on a server.
Saves, backups and restarts#
This is the part that loses worlds. Valheim does not write changes as they happen. The world is held in memory and written out every -saveinterval seconds - thirty minutes by default. Anything that ends the process without a save throws away everything since the last one.
- A clean stop saves. Stopping the server normally (the panel's Stop or Restart, or
SIGINTon your own machine) triggers a save before exit. Wait forWorld savedin the log. - A kill does not. Killing the container, an out-of-memory stop or a host crash loses up to a full interval.
- Lower the interval.
-saveinterval 600costs a brief hitch every ten minutes on a big world and caps the loss at ten minutes. For most groups that is the right trade. - The built-in backups are not backups. They sit in the same folder as the world on the same disk. They protect against a corrupt save, not against a deleted server or a mistake made with the file manager.
A Valheim world is a single file, so corruption takes everything rather than one region. Keep real backups somewhere else, on a schedule, and restore one occasionally to prove it works - backups that actually restore explains why the second half of that sentence matters more than the first. A sensible schedule is a daily backup at an hour when nobody plays, plus a manual one before every game update and before installing any mod.
On RE:NODE the Restart button sends a clean stop, so the world is saved first; backup slots are included on every Valheim plan and restoring is one button; and the Schedules tab can run the daily backup and a weekly restart for you. If the server ever reaches its memory limit it is stopped and restarted clean rather than left to swap - which is exactly the unsaved-stop case above, and one more reason to shorten the save interval on a large world.
Troubleshooting#
The server does not appear in the community list. Check -public 1, check that both UDP ports are open, then wait ten minutes - the list is slow. Test by joining by IP; if that works, the server is fine and the list is the problem.
"Failed to connect" when joining by IP. Almost always the port. Confirm you are using the game port (2456), not the query port, and that it is UDP.
"Incompatible version". The client updated and the server did not, or the reverse. Restart the server with updates enabled; if you run mods, wait for them to be updated first.
Everyone lags near one player. Zone ownership. The player who entered the area first is simulating it on a poor connection. Have them step well away or relog, and ownership passes to someone else.
The world reset to a new map. The -world name does not match the file. The server created a fresh world beside the old one; your original .db is still there. Fix the name and restart.
Memory climbs for days. Normal up to a point: more explored zones means more to hold. A weekly scheduled restart keeps it flat - see restart schedules that help.
FAQ#
How many players can a Valheim dedicated server hold?
Ten. The limit is in the game, not the host, and the simulation is tuned around it. Mods can raise it, but enemy scaling and network load were not designed for larger groups, so expect trouble past about fifteen.
Do I need a dedicated server if only two of us play?
Not strictly, but it changes how you play: either of you can log in without the other, the world is not tied to one person's PC, and the host no longer pays a performance cost. The smallest plan is enough for two.
Can Xbox and PC players use the same server?
Yes, with -crossplay enabled. Players join with the six-digit code. The server must be vanilla, or use only server-side mods, because console players cannot install anything.
Does the server need to be the same version as the game?
Exactly the same. After every Valheim patch the server has to be updated before anyone can join. A modded server should be updated only after its mods have been.
Can I change difficulty on a world that already exists?
Yes. World modifiers are applied at launch, so restart the server with new -preset or -modifier arguments. Existing builds and progress are untouched; only the rules change from that point on.
Why did we lose twenty minutes of progress after a crash?
Because the world is written to disk on a timer, not continuously. Whatever happened since the last save existed only in memory. Reduce -saveinterval, and always stop the server cleanly.




Comments
Completely anonymous: no account, no email, no cookie. We store the name you type, the text and the time - nothing else. Links are limited and markup is not rendered.