1. Install Valheim Dedicated Server from Steam Tools
Iron Gate documents a separate Valheim Dedicated Server application in Steam. Install it on the machine that will host the world and browse its local files before editing configuration.
2. Copy the launch script before editing
The official guide recommends making a copy of start_headless_server.bat on Windows (or using the Linux server script) because Steam updates can reset the original file. Keep your customized copy documented.
3. Set the core server arguments
Configure a recognizable -name, the intended -world, a password, and the save directory if you use a custom location. Iron Gate says -world will load an existing world with that name or create one if it does not exist, so verify the name before first launch.
4. Choose Steam backend or crossplay deliberately
Without -crossplay, Valheim uses the Steam backend and only Steam players can see/join. With -crossplay, it uses PlayFab so players from supported platforms can join.
5. Steam backend: match ports and router forwarding
The default port is 2456 and Valheim uses that port plus the next one, so the default pair is 2456–2457. For the Steam backend, the official guide says the router's port-forwarding settings must match the server ports.
6. Crossplay backend: do not port-forward by habit
Iron Gate says the crossplay backend communicates through a relay and does not require router port forwarding. Crossplay servers can use public IP/port, Join Code or the server list, but local/loopback IP is not supported for that backend.
7. Decide whether the server should be public
-public 1 is the default and makes the server visible in the browser. -public 0 hides it and is useful for private/LAN-style setups where players join through the appropriate direct route.
8. Start once and verify the connected state
The official guide says the server is ready when the console reports Game server connected. Test the intended world and one real client before inviting the whole group.
9. Stop cleanly and keep backups
Iron Gate recommends stopping the server with CTRL+C. Keep an external world backup and know the configured -savedir before the first major patch or migration.
Official reference
Iron Gate: A Guide to Dedicated Servers
Unofficial guide. Product and game names belong to their respective owners. Always check current official patch notes before changing a server or important save.