How to host a Valheim server

A new world with a few players is undemanding. The problem arrives at month three. Every structure, every dropped item and every tamed animal is persistent, and all of it is held and simulated. Plan for growth from the start rather than sizing for the world you have on day one.
How to install it
- Install Steam’s command-line tool on the machine. Valheim’s server is free, so the hosting account does not need to own the game.
- Install the dedicated server application using an anonymous login.
- Copy the example start script rather than writing your own. It contains flags that are easy to miss.
- Set your server name, world name and password in that script.
- Open the port you chose and the two above it. Valheim needs the block, not just the first one.
- Start it and wait. First launch generates the world and takes noticeably longer than later ones.
Valheim uses UDP 2456, 2457 and 2458. Opening only the first gives you a server that works for anyone connecting directly and is invisible to everyone else.
How to configure it
Valheim has no server.properties equivalent. Everything you would expect to configure — the name, the world, the password, crossplay — is a launch flag in your start script. If you are hunting for a settings file to edit, that is why you cannot find one.
| Flag | What it does | Watch out for |
|---|---|---|
| -name | The name shown in the browser. | Not the same as the world name. |
| -world | Which save to load, by name. | A typo silently creates a new empty world rather than erroring. This is how people “lose” a world. |
| -password | Required — there is no open-server option. | Cannot contain the server name. |
| -port | Game port. The two above it are used as well. | Forward all three. |
| -crossplay | Lets console and Game Pass players see the server. | Its absence is the usual reason friends cannot find you. |
- The world name creates the world. A typo silently generates a brand new empty one rather than erroring, which is how people "lose" their world.
- Crossplay is a flag. If console or Game Pass friends cannot see the server, this is why.
- Admin lists are read at startup. Adding yourself while the server is running does nothing until it restarts.
- Saves live in a separate user directory, not next to the server files. Find it before you plan your backups, not after.
Stopping the server by killing the process. Valheim writes its world periodically and on shutdown, and interrupting that write is the main cause of the corrupted-world stories you will find in every community. Always stop it properly and let it finish.
Worth knowing
- Keep old world backups, not just the newest. Corruption is often noticed days later, by which point a single rolling backup has been overwritten.
- Mods need BepInEx on both server and clients, and versions must match.
Written from experience running these servers. If something here no longer matches what you are seeing, tell us and we will recheck it.
Building GameDash at Schokker IT — the game server control panel we always wished existed. Writes about infrastructure automation, the SDK and running game servers at scale.