How to set up a Valheim dedicated server
Set up a persistent Valheim server for up to 10 players on berrybyte or with SteamCMD app 896660. Covers world name, password rules, crossplay, the full launch-flag reference, UDP ports, and where world files live.
A Valheim dedicated server keeps one world online for up to 10 players, whether or not the person who made it is playing. On berrybyte the install, ports and updates are handled for you. Self-hosting is also straightforward, because Valheim has no configuration file. Every setting is a launch flag.
Set up on berrybyte
Order the server
Open Valheim server hosting, pick the region closest to your group, and check out. Every plan includes all 10 slots.
Wait for the install
My Servers shows Setting up while the server files download. It opens on its own when that finishes.
Set the basics
Under Settings → Game Settings, set Server Name, World Name and Server Password. The password must be at least 5 characters and must not contain the server name. Valheim refuses to start otherwise.
Decide on visibility and crossplay
Public Server controls whether the server appears in the browser. Enable Crossplay is on by default and is what lets console players join. Leave it on unless you are running mods.
Start and share
Press Start. Once the world has loaded, copy the six-digit join code from Overview and send it out with the password. See joining on PS5, Switch 2 and Xbox.
Planning a fresh 1.0 world? Generate it on the 1.0 build rather than beforehand, so the whole map is created by the finished version. See updating your server.
Self-host with SteamCMD
The dedicated server is Steam app 896660, and it downloads anonymously.
Install the server files
steamcmd +force_install_dir /path/to/valheim +login anonymous +app_update 896660 validate +quitInstall the Linux dependencies
Crossplay needs libpulse-dev, libatomic1 and libc6 present. Without them the server
starts but PlayFab registration fails, so no join code is ever printed.
Edit the start script
Use start_server.sh on Linux or start_headless_server.bat on Windows. The script must
export SteamAppId=892970, the game's app ID, not the server's. This trips up almost
everyone who writes their own script.
Start it and watch for the version line
Linux runs valheim_server.x86_64, Windows runs valheim_server.exe.
Stop the server with CTRL+C, never kill -9. Valheim saves on shutdown, and a hard kill discards
everything since the last autosave.
Launch flag reference
There is no server.properties equivalent. These go on the command line:
| Flag | What it does |
|---|---|
-name <name> | Name shown in the server browser |
-port <n> | UDP game port, default 2456. Steam queries use <n>+1 |
-world <name> | Which world file to load, matching the .db/.fwl name |
-password <pw> | Server password. 5+ characters, and must not contain the server name |
-public 1|0 | Whether the server is listed in the browser |
-savedir <path> | Where worlds and permission files are read and written |
-crossplay | Use the PlayFab backend, enabling console players and join codes |
-saveinterval <s> | Seconds between autosaves, default 1800 |
-backups <n> | How many rolling world backups to keep, default 4 |
-preset <name> | World preset: Normal, Casual, Easy, Hard, Hardcore, Immersive or Hammer |
-modifier <name> <value> | Adjust one world modifier, such as combat or resource rate |
-setkey <key> | Set a world key: nobuildcost, playerevents, passivemobs or nomap |
-instanceid <id> | Required to tell apart multiple servers sharing one IP and MAC address |
On berrybyte these are set for you from Game Settings, so you do not pass flags by hand. The panel exposes the ones that matter day to day: name, world, password, visibility, crossplay, autosave interval and backup count.
Ports and connectivity
Valheim is UDP only. There is no TCP listener and no RCON.
| Port | Protocol | Purpose |
|---|---|---|
| 2456 | UDP | Game traffic |
| 2457 | UDP | Steam server query, always game port + 1 |
Forward both if you self-host on the Steam backend. With -crossplay the
traffic is relayed instead, so no forwarding is needed, and local or loopback
addresses stop working, because they are not reachable through the relay.
World files and backups
Worlds live under worlds_local, inside:
- Windows:
%USERPROFILE%\AppData\LocalLow\IronGate\Valheim - Linux:
~/.config/unity3d/IronGate/Valheim
Each world is a matching pair: MyWorld.db and MyWorld.fwl. Keep them
together, always. Valheim also writes rolling .old copies next to them; to
use one, stop the server and drop the .old suffix.
Copy adminlist.txt, bannedlist.txt and permittedlist.txt alongside the
world if you want permissions to survive a move. On berrybyte, use
Backups for a snapshot that covers all of it.
Next steps
Get your group connected with the crossplay join code.
Crossplay or mods?Decide before you build, because you cannot have both on one server.
Admin and console commandsGive yourself admin, then kick and ban from in game.
Upload or migrate a worldBring an existing single-player world across.
Frequently asked questions
What ports does a Valheim server use?
A Steam-backend server uses the configured UDP game port and the next port up for Steam queries, which is 2456 and 2457 by default. Valheim uses UDP only - there is no TCP port and no RCON. A crossplay server relays through PlayFab and does not need either port forwarded.
Do I need to port forward for Valheim crossplay?
No. With crossplay enabled the traffic is relayed, so players connect with a six-digit join code rather than reaching your IP address directly. The flip side is that LAN and loopback addresses do not work on the crossplay backend either, so players on your own network still use the code.
How many players can a Valheim server hold?
Valheim supports 1 to 10 players, and Iron Gate has said the cap is unchanged for 1.0. The limit is the same with crossplay on or off.
Where are Valheim world files stored?
On Windows they are under %USERPROFILE%\AppData\LocalLow\IronGate\Valheim and on Linux under ~/.config/unity3d/IronGate/Valheim. Dedicated-server worlds sit in the worlds_local folder inside that path, as a matching WorldName.db and WorldName.fwl pair.