Direct answer
Install Valheim Dedicated Server from Steam's Tools library, copy the supplied startup script before editing it, set the server name, world, password and save path, then start it until the log says Game server connected. Steam-backend hosting normally needs ports 2456–2457 forwarded; the crossplay backend uses a relay and does not require router port forwarding. Stop with Ctrl+C and test the automatic backups before relying on the server.
Evidence boundary: Iron Gate documents the Windows, Linux and Docker server paths and flags, but it cannot provide one router procedure for every network. Treat provider panels and third-party containers as separate implementations.
Do this first
- 01Install Valheim Dedicated Server from the Tools category in Steam Library.
- 02Copy start_headless_server.bat or start_server.sh before editing because updates can reset the original.
- 03Set a unique server name, world name, password and savedir, then choose Steam or -crossplay networking.
- 04Start the server and wait for Game server connected before inviting anyone.
- 05Stop with Ctrl+C, copy the save directory and perform one restore test before normal play.
Install and preserve the startup file
The official tool appears under Steam Library when the Tools filter is enabled. Iron Gate supplies a Windows batch file and Linux shell script beside the server program.
Make an editable copy instead of modifying only the original: Steam updates can replace the supplied script. Record the copy's purpose and keep credentials out of shared screenshots or public repositories.
Choose the backend before opening ports
The Steam backend uses the configured port and the next port; the defaults are 2456 and 2457 and generally require matching router forwarding for internet access. Iron Gate tells hosts to use their router or ISP instructions because the exact interface varies.
The -crossplay flag selects the PlayFab relay backend and removes the need for router port forwarding. Crossplay servers can use a public address, join code or server list, but cannot be joined through a local or loopback address.

Set world, password and save location
The -world flag creates or selects the world, -password protects access, and -savedir moves world and permission files to an explicit path. A public value of 0 hides the server from the browser and leaves direct joining available.
Use a strong private password and verify that adminlist.txt, bannedlist.txt and permittedlist.txt are in the active save location. A permitted list allows only the listed platform user IDs, so an accidental entry can exclude everyone else.
Back up and diagnose startup failure
The default save interval is 1,800 seconds. The official flags keep four backups by default: one short backup after two hours and three longer backups spaced 12 hours apart. Confirm the files actually appear, then copy them away from the active disk and test restoring a duplicate server.
If the log never reaches Game server connected, check the script path, required Linux libraries, firewall, backend and ports in that order. Stop with Ctrl+C; closing only the window can leave the process running in the background. Never diagnose a world problem by deleting the only save.
