One page for setup and settings
This guide combines how to set up a Valheim dedicated server with the settings players change after it is running. The tasks form one sequence: install the official tool, create a safe launch script, choose a network backend, verify the first connection, then tune the world and backups.
How to set up a Valheim dedicated server
In Steam, open Library, enable the Tools filter, install Valheim Dedicated Server, and browse its local files. Windows uses start_headless_server.bat; Linux uses start_server.sh.
Make a copy of the startup file before editing it. Steam updates can replace the original, while your copy keeps its name, world, password, and other launch arguments. The copied file will not launch from Steam's normal shortcut, so start the copy directly.
Set at least a server name, world name, password, and port. Start the file with logs visible. The server is ready for a connection when the console reports Game server connected.
valheim_server -nographics -batchmode \
-name "My server" \
-port 2456 \
-world "Dedicated" \
-password "replace-this-password" \
-public 1
Do not reuse that example password. Valheim requires a server password of at least five characters, and the official guide warns against matching it to the server name.
Choose Steam or crossplay before opening ports
The Steam backend is used when -crossplay is absent. Its configured port and the next port must be reachable; with the default base port, the official range is 2456–2457. Router steps vary, so use the router or ISP instructions rather than copying a rule for a different device.
Add -crossplay to use the PlayFab relay when players will join from other platforms. The official guide says relay access does not require port forwarding. Crossplay players may join through the public IP and port, a join code, or server list, but cannot connect with a local or loopback IP.
| Goal | Setting |
|---|---|
| Steam players only | Leave out -crossplay; forward the configured port range |
| PC and console group | Add -crossplay; use a join code for the first test |
| Private unlisted server | Use -public 0; players use direct connection |
| Public server-browser listing | Use -public 1 |
Essential startup parameters
| Argument | Purpose | Official default or note |
|---|---|---|
-name "Name" | Server-list name | Choose a recognizable name |
-port 2456 | Base communication port | Also uses port +1 |
-world "Dedicated" | Creates or loads the named world | Match an existing filename exactly |
-password "Secret" | Join password | At least five characters |
-savedir PATH | Overrides the data and world location | Useful for an explicit backup path |
-public 1 | Controls server-list visibility | 1 listed; 0 unlisted |
-saveinterval 1800 | Seconds between world saves | 30 minutes |
-backups 4 | Automatic backups retained | Four |
-backupshort 7200 | Interval for the first backup | Two hours |
-backuplong 43200 | Interval for later backups | Twelve hours |
-crossplay | Enables PlayFab crossplay backend | Omit for Steam backend |
Longer save intervals may reduce frequent save pauses in a large world, but they also increase the amount of progress at risk after a crash. Keep the official default until the group has evidence that it needs changing.
World modifier settings
Use -preset for a complete ruleset or apply individual -modifier arguments after the preset. A preset overwrites earlier modifier choices, so ordering matters.
| Setting | Valid examples | What it changes |
|---|---|---|
-preset | Normal, Casual, Easy, Hard, Hardcore, Immersive, Hammer | Complete ruleset |
-modifier combat | veryeasy, easy, hard, veryhard | Enemy combat difficulty |
-modifier deathpenalty | casual, veryeasy, easy, hard, hardcore | Item and skill loss |
-modifier resources | muchless, less, more, muchmore, most | Resource yield |
-modifier raids | none, muchless, less, more, muchmore | Raid frequency |
-modifier portals | casual, hard, veryhard | Portal restrictions |
-setkey nomap | no value | Enables the no-map rule |
Change one rules group at a time, restart when required, and test with one player before inviting everyone. That makes a bad setting easy to identify and reverse.
Admins, bans, and the permitted list
The default save directory contains adminlist.txt, bannedlist.txt, and permittedlist.txt. Add one case-sensitive Platform User ID per line. Get the ID from the server log or the in-game F2 panel; it follows the [Platform]_[User ID] form.
Be careful with permittedlist.txt: adding anyone turns it into an allowlist and prevents everybody else from joining. Server admins can open F5 and use kick PLAYERNAME, ban PLAYERNAME, unban PLAYERNAME, and banned.
Back up and stop safely
Back up the chosen save directory, not only the startup script. It contains worlds and the three permission files. Test one restore before calling the server production-ready.
Stop the process with Ctrl+C in the command window. The official manual specifically advises against closing the window with the X because the process may continue in the background. Wait for shutdown to complete before copying an active world file.
First-join troubleshooting
- Confirm the log reaches
Game server connected. - Match the server and client versions.
- Recheck quotation marks around names and passwords.
- Confirm the selected backend: Steam or
-crossplay. - For Steam, test the firewall and forwarded port range.
- For crossplay, use the join code rather than a LAN address.
- Verify the world name points to the intended save.
- Read the log before changing another setting.
Official sources
Last checked: September 17, 2026.
