Omnipass

Valheim

Host a Valheim dedicated server on your PC

Steam Tools dedicated server, a copy of start_headless_server.bat, UDP 2456 and 2457, a required password of at least 5 characters. Ten players is the cap. Do not pin a build.

Updated 10 September 2026

Run Valheim on a Pass

This is for someone who has never run a game server. You will put the official Valheim dedicated server on a Windows PC so friends can play even when you are not in the world. The PC has to stay on while people play.

Iron Gate's own how-to is A Guide to Dedicated Servers on valheim.com. This page is the click-by-click Windows version, plus the router bit.

Do not pin an old Valheim build. When Steam updates the dedicated server, start it again so friends can join. Ten people is a hard cap. There is no slot setting to raise it.

1. Install Valheim Dedicated Server

  1. Open Steam.
  2. At the top of your Library, open the dropdown that says Games. Tick Tools.
  3. Find Valheim Dedicated Server. Click Install. This is not the game you play.
  4. Right-click it, Manage, Browse local files. Leave this folder open.

2. Copy the start file

Steam resets start_headless_server.bat every time it updates. The Steam Play button only starts the original name. Edit a copy, and start that copy.

  1. In the install folder, right-click start_headless_server.bat, Copy, then Paste. You should now have start_headless_server - Copy.bat.
  2. Rename the copy to something you will recognise, for example start_friends_server.bat.
  3. Right-click that copy, Edit. It opens in Notepad.

3. Make a save folder

By default worlds live under %USERPROFILE%\AppData\LocalLow\IronGate\Valheim. A folder you pick is easier to find and back up. Since Valheim 1.0, each world is its own folder under worlds_local. File names inside that folder change when the server autosaves, so always copy the whole world folder, not one .db file.

  1. Create a folder you will keep, for example C:\ValheimServerData.
  2. After the first start, you will see a folder like C:\ValheimServerData\worlds_local\Midgard (the name matches -world). That whole folder is the save.
  3. To back up or move the world, copy the whole Midgard folder. Do not chase individual .db or .fwl files.

4. Edit the start line

Find the line that starts valheim_server. Replace it with this, then Save. Change the name, world, and password. Keep the quotes.

valheim_server.exe -nographics -batchmode -name "Friends" -world "Midgard" -password "letmein" -port 2456 -public 0 -savedir "C:\ValheimServerData"

What those bits mean:

  • -nographics and -batchmode run it as a server, not the game window.
  • -name is what friends see in the list.
  • -world is the save name. Max 20 characters. Use the same name next time or Valheim makes a new world.
  • -password is required. There is no open server. Valheim refuses anything under 5 characters.
  • -port 2456 uses UDP 2456 and 2457.
  • -public 0 is Join IP only. Use -public 1 if you want it in the public list.
  • -savedir is the folder from step 3.

5. Start the server

  1. Double-click your copy of the bat file, not the original, and not the Steam Play button.
  2. If Windows Firewall asks, allow it. Tick the boxes it shows.
  3. Wait until the window says Game server connected.

Leave that window open while people play. To stop, click in the window and press Ctrl+C. Do not click the X. That can leave the server running in the background.

6. Let friends in (Steam, over the internet)

Friends outside your house need two holes in your router: send UDP ports 2456 and 2457 to this PC. Follow Port forwarding so friends can join for the Windows Firewall and router clicks. Use the Valheim row on that page.

They open Valheim, choose Join IP, and type your public IP from that page, with :2456 on the end. On this same PC you can try 127.0.0.1:2456 first.

7. Console friends instead

If someone is on Xbox or a console, add -crossplay to the same start line and save, then start the copy again. Iron Gate sends that traffic through a relay, so you skip router forwarding. You join with the public IP and port, a join code, or the server list. Local addresses like 127.0.0.1 will not work with crossplay.

8. After a Steam update

Steam will reset the original start_headless_server.bat. Your copy is the one that still has your name, world, and password. Double-click that copy again. Friends must be on the same Valheim version as this dedicated server.

If you do not want the PC on

A hosted world does not need a bat file or a router. omnipass.gg can run the dedicated server for you, so friends join without leaving a PC awake.