Game Hosting home

How to set up a Valheim dedicated server

Run a Valheim dedicated server on Windows: install the tool, choose Steam or crossplay networking, start your world, and check that friends can join.

Difficulty
NormalDifficulty Normal
Time to do
25 min
Reading
8 min
Updated
By
Game Hosting team

You will need

  • Steam and space for the server tool and world backups
  • A PC that stays on while people sail
  • Router access if using Steam backend over the internet
  • A world name and a password (5+ characters)

You can run a Valheim dedicated server on Windows through Steam Tools, then choose Steam networking or crossplay before inviting friends. The server process keeps the world available while your own game is closed, provided the PC and process stay running. This walkthrough gets a test world online and checks the joining route before you move an established save. Crossplay uses a relay, so opening router ports is not a requirement for every setup. Keep the manual included with your installed server nearby if a setting differs from the examples.

Still deciding where to run it? Compare the Windows, Linux, container and rented-machine options before following this Windows walkthrough.

Install the dedicated server#

  1. Install the tool from Steam

    In your Steam library, filter by Tools and install Valheim Dedicated Server. Check Steam’s current disk-space estimate and leave additional room for saves and backups.

  2. Browse to the install folder

    Right-click the tool → Manage → Browse local files. You’ll see valheim_server.exe and a file called start_headless_server.bat. The batch file contains startup arguments; saves and permission files live separately.

Edit the start script#

Make a copy of start_headless_server.bat (call it start_mine.bat) so a Steam update never overwrites your settings. Open the copy in Notepad and edit the last line.

bat
valheim_server -nographics -batchmode -name "Night Shift" -port 2456 -world "Midgard" -password "longboat5" -public 1 -crossplay

What each flag does:

  • -name is what shows in the server list. Anything you like.
  • -port 2456 is the game port. Leave it unless you run two servers.
  • -world is the save name. A new name makes a new world; an existing name loads it.
  • -password sets the password friends enter. Use a unique password of at least 5 characters and check the installed manual and startup output if it is rejected.
  • -public 1 lists it in the in-game browser; 0 hides the listing. Hiding a listing is not an access-control substitute for a password.
  • -crossplay selects the PlayFab relay backend so supported non-Steam platforms can join. Without it, the server uses the Steam backend and only Steam users can join. Neither route is a universal latency winner.

Save, then double-click your .bat. A console window opens and, after a minute of world generation, prints Game server connected. That’s running.

Match the network setup to your backend#

The startup example above enables crossplay. For that route, allow the server through Windows Firewall and use its relay connection; skip router forwarding. Iron Gate’s dedicated-server manual documents a different route for Steam: the configured port and the following port, 2456–2457 by default. Do not add 2458 as a universal requirement.

If everyone uses Steam and you remove the crossplay argument, use these steps for internet access:

  1. Reserve your PC's local IP

    In the router’s DHCP settings, reserve the address your PC has now. Otherwise the forward points at the wrong machine next week.

  2. Forward UDP 2456 to 2457

    Create a forwarding rule for UDP 2456-2457 to your PC’s reserved local IP. If you chose a different starting port, adjust this pair to the configured port and the next one.

  3. Allow it through Windows Firewall

    Allow the dedicated-server application on the network profile it uses. If configuring port rules manually for this Steam setup, match UDP 2456-2457. Keep the firewall enabled.

Get your crew in#

Choose a joining route that matches the running backend:

  1. From the server list. In Valheim, Start Game → Join Game → Community, search the name, enter the password.
  2. By public address. Use Join IP and the server’s public address with the configured port. Confirm the current menu labels on each platform.
  3. By crossplay code. Share the code shown for the running crossplay server. The official crossplay FAQ describes joining with a code for Xbox players.

For crossplay, use the public address, code or server list even when testing from the same home network: the manual explicitly excludes local and loopback IP joining. With the Steam backend, a LAN address can be used by Steam players on that LAN, but that does not prove an outside friend can reach it.

Ask one friend outside your home network to join the test world, then check that you see each other. For a mixed-platform crew, repeat the test with each platform before inviting everyone. Check official patch notes if a platform cannot connect; buying a different host does not repair a platform compatibility interruption.

If the test fails, write down the exact symptom before changing settings. A server that never reaches its ready message needs a startup check; a ready server missing from a list needs a discovery check; a visible server rejecting a player needs its own joining check. Those are different observations. Confirm that you launched the copied script, that its selected backend matches the friend who is joining, and that the supplied address or code belongs to the current running instance.

For a Steam internet test, inspect the router rule’s destination address as well as its port pair. A rule pointing at yesterday’s local address will not reach today’s server. For a crossplay test, confirm you are not using a local or loopback address. Do not open additional ports at random when the selected route uses the relay. Keep a note of each change and repeat the same outside-player test afterward; that gives you a useful record if you need help from your ISP or the game’s support team.

Keeping the world alive#

  • Backups. Stop the process cleanly and copy the whole world folder, worlds_local/<WorldName>/. Since Valheim 1.0 it holds _main.<N>.fwl2, _main.<N>.db2, _main.<N>.chunks, _main.<N>.ok and many *.chunk files, so the old two-file .db + .fwl recipe misses most of the world. The server also writes automatic backups as sibling folders named like <WorldName>_backup_auto-YYYYMMDD-HHMMSS. Keep a separate copy outside the active save location anyway and verify restoration on a test instance.
  • Updates. When Valheim patches, update the server tool in Steam before your friends update the game, or versions won’t match.
  • Sleep and reboots. A Windows update at 3 a.m. takes the world down until you notice. Disable sleep, and set active hours.
  • Ten players. Vanilla supports 10 players. Do not infer a larger limit from your PC’s memory or a rental plan’s resource allocation.

Prove the setup survives a restart#

A successful first login proves connectivity, but your crew also needs the same world after a restart. Run this small acceptance check on a disposable world before treating the machine as the group’s home. Keep the original save untouched if you already have a campaign; experimenting with a new world name is easier to reverse than experimenting on the only copy of a longhouse.

  1. Leave something recognizable in the test world

    Join with your friend and agree on a small visible change you can both find again. Record the server name and world name separately. The displayed server name identifies the listing; the world argument selects the save. Confusing them can make a correctly running server look as if it lost your world.

  2. Stop the process cleanly

    Have everyone disconnect, then press Ctrl+C in the server command window. Wait for it to exit before making a backup. Do not start a second copy while you are unsure whether the first has stopped. Check Task Manager for the dedicated-server process if a window disappears unexpectedly.

  3. Start the same copied script and reconnect

    Launch the script you edited, wait for its ready message, and use the joining route for its backend. Check that the agreed change is still there and the outside friend can rejoin. If a different world appears, stop and inspect the world argument and save location before overwriting or deleting anything.

Keep a short operating note beside your script: which file launches the server, which Windows account runs it, where you store separate backups, and who can restart the PC. A shortcut to the original Steam script can accidentally bypass the copied configuration. Test the exact shortcut you intend to use on an ordinary evening, rather than assuming every launch method reaches the same file.

Autosaves and separate backups solve different problems. A routine save records current progress; an older copy can help when the newest state is unwanted. Neither is a guarantee against every failure. Before restoring anything, preserve the current files too, check that the backup belongs to the intended world, and follow the installed manual’s save-handling instructions. A file’s existence alone does not establish that it will load correctly.

Finally, repeat the outside-player check after changing the router, firewall, Windows account or startup arguments. Change one item at a time so you can identify what affected the connection. A local login can succeed while remote access fails, and a running process can still have the wrong world selected. Those are separate checks, so record both before telling the crew the setup is ready.

If maintaining this PC does not fit your schedule, use the crew hosting checklist to decide which responsibilities you want a provider to handle. The Valheim plans page shows the current offer; confirm access, export and recovery details before committing to a move. On Game Hosting, saves live under /saves/worlds_local/ in the server’s file manager, so moving a campaign means uploading its whole world folder there. A world still in the older .db + .fwl format is converted by Valheim on first load, as described in Iron Gate’s Valheim 1.0 FAQ; keep your original copy until the converted world has loaded and been checked.

Quest complete

Before you invite your friends, check that the intended world loaded and that each player can connect. If those checks pass, you're ready for a session; if you'd rather not keep a PC on, that's what we're here for.

Quick answers

How many players can a Valheim dedicated server hold?

Vanilla Valheim supports 10 players. More server memory does not increase that limit; modifications need their own compatibility checks.

Do I need to own Valheim to run the server?

No. The dedicated server is a free tool in Steam. You do need the game on the account you play with.

Where is my world saved?

Since Valheim 1.0, each world is a folder named after it inside worlds_local, holding numbered _main files (.fwl2, .db2, .chunks, .ok) and many .chunk files. On Windows, local worlds sit in %USERPROFILE%\AppData\LocalLow\IronGate\Valheim\worlds_local unless your launch line sets -savedir. Older .db and .fwl worlds are converted automatically the first time 1.0 loads them.

Why can my friends not connect?

First check the startup log and the selected backend. Steam internet hosting needs forwarding; crossplay uses a relay and cannot be joined through a local or loopback IP.