Home/ Guides/ Valheim/ Dedicated Server Setup
🌳 Valheim · Server Setup Guide

Valheim Dedicated Server Setup — Free, Start to Finish

How to host a Valheim server without paying anyone: the server tool is free with the game, your PC is the hardware, and one launch flag — -crossplay — means no port forwarding at all. Friends get a join code; your router stays untouched. This is the full setup, including the classic Steam-only route with its ports, Tailscale for private groups, honest cost math, and the real reasons "failed to connect" happens.

Crossplay behavior, ports & flags checked against the official Iron Gate server guide · last verified June 2026
Jump to a section
🔓
The part most guides bury: you may not need to port forward at all
Launch the server with the -crossplay flag and traffic routes through the PlayFab relay — no port forwarding, no firewall rules, no knowing your public IP. Friends enter a join code and they're in, from anywhere. It's also what lets Xbox and PC Game Pass players join your server. Valheim has the easiest zero-network-setup path of any survival game; most guides walk you through twenty minutes of router config first and mention this at the end, if at all. Details in the crossplay section.
🧰

Valheim Dedicated Server Requirements

A dedicated server runs the world whether or not anyone's playing, so the only hard requirement is a machine that stays on. Valheim's server is genuinely light — the bar is "a PC you already own."

  • MachineA Windows or Linux PC that stays on while people play — official server builds exist for both. Consoles can't host, only join (via crossplay).
  • RAMA fresh world runs around 2 GB; mature, heavily-built worlds creep up to 3–4 GB. Budget 4 GB free and forget about it.
  • CPUModest — any reasonable desktop from the last several years handles a small group. Iron Gate doesn't publish hard minimum specs, so treat any guide quoting exact ones with suspicion.
  • The gameOwn Valheim and the free Valheim Dedicated Server tool appears in your Steam library under Tools. No second purchase, no separate license.
  • NetworkWith -crossplay: nothing — the relay does the work. Steam-only: a real public IP and two forwarded UDP ports.

All of Valheim's server configuration is launch flags — there's no settings INI. This guide covers getting the server running; for what every flag and world modifier actually does, see Valheim server settings explained, and to skip the typing entirely, the Valheim server config generator builds the full start script plus the admin, banned, and permitted lists.

🔓

Free Hosting, No Port Forwarding: the -crossplay Path

One flag on the launch line changes which backend the server uses — and removes the entire networking chapter of this guide.

With -crossplay, the server registers with the PlayFab backend and player traffic goes through its relay. Consequences, all good ones:

  • No router workNo port forwarding, no firewall rules, no public IP needed. The relay traverses your NAT — including CGNAT, which kills the traditional route outright.
  • Join codeThe server gets a join code; friends type it in and connect from anywhere. No IP to share, no DDNS to maintain.
  • CrossplayXbox and PC Game Pass players can join a player-hosted crossplay dedicated server — per the official FAQ. (Xbox can't host one, and there is no PlayStation version of Valheim.)
The one quirk, straight from the official guide: you cannot connect to a -crossplay server via its local or loopback IP on your own LAN. Even sitting next to the server box, you join with the code. Trying 192.168.x.x against a crossplay server is one of the classic "can't connect" causes — see troubleshooting.

When would you skip -crossplay? If your whole group is on Steam and you specifically want direct Steam networking — the classic IP-and-server-browser flow. That route works fine; it just brings the port forwarding homework with it. For everyone else, the flag is the answer.

🛠️
Shortcut: generate the launch script instead of hand-editing
The steps below edit the launch script by hand. If you'd rather not, the Valheim server config generator builds start_server.bat / start_server.sh from toggles — name, password (with the boot-killing rules enforced), -crossplay, world modifiers — plus the adminlist.txt / bannedlist.txt / permittedlist.txt files. Set your options, download, drop them in at step 2.
🛠️

How to Set Up a Valheim Dedicated Server, Step by Step

Seven steps from nothing to a running, joinable server. If you take the -crossplay path, step 4 disappears entirely.

1

Install the Valheim Dedicated Server tool

If you own Valheim, the server is already in your Steam library: open Library → Tools (enable the "Tools" filter) and install Valheim Dedicated Server. It's free, official, and the path this guide assumes. It lands in ...\steamapps\common\Valheim dedicated server\.

Running a headless box without the Steam client? The server is SteamCMD app 896660:

steamcmd +force_install_dir C:\valheim-server +login anonymous +app_update 896660 validate +quit

You'll find guides claiming app 896660 no longer installs over +login anonymous — we tested it ourselves (June 2026) and anonymous login downloads the server fine, no game purchase needed. If it ever fails for you, logging in with a Steam account that owns Valheim is the fallback.

Either way, re-run the same command with validate to repair a broken install later.

2

Configure the launch script

In the install folder, copy the stock script (start_headless_server.bat on Windows) to your own file — say start_server.bat — and edit the copy. Updates overwrite the stock script; they leave yours alone.

:: start_server.bat — your copy valheim_server -nographics -batchmode -name "BurnHeim" -port 2456 -world "Dedicated" -password "OdinSentMe" -crossplay
  • -name — what players see. Your password cannot be a substring of it.
  • -world — the world file name; created on first boot, loaded ever after.
  • -password5+ characters, not blank, not inside the server name. Break any of these and the server silently refuses to boot.
  • -crossplay — the no-port-forwarding backend. Drop it only if you want Steam-only.

Difficulty, raids, portals-carry-ore and the rest are also launch flags (-preset / -modifier) — the full list with recommendations is in server settings explained, or let the generator write the line for you.

3

Pick your backend — and know which one you picked

This single decision drives everything network-related, and mixing the two up is a top "failed to connect" cause:

  • With -crossplay: PlayFab relay, join code, no port forwarding, Xbox/Game Pass friends welcome. Skip step 4.
  • Without it (Steam-only): direct Steam networking, friends join by IP or the in-game browser, and you must forward UDP 2456–2457.

Tell your friends which kind of server it is. A join code does nothing for a Steam-only server, and an IP does nothing useful for a crossplay one.

4

Steam-only path: forward UDP 2456–2457

Skip this step entirely if you launched with -crossplay. Otherwise:

  • Router: forward UDP 2456–2457 (your -port value and port+1) to the server's LAN IP.
  • Windows Firewall: allow valheim_server.exe through, inbound. Windows usually prompts on first launch — say yes.

Port details, the stale-third-port story, UPnP, and CGNAT are all in the ports section.

5

Start the server and grab the join code

Run your script. First boot generates the world — give it a few minutes before deciding something's broken. The console keeps scrolling while it works.

Crossplay server: once the world is up, the console output includes the session's join code — search the scrollback for "join code". That code is what you hand your friends. Steam-only server: friends need your public IP (search "what is my IP") plus the port instead.

Server not appearing yet? It isn't joinable until the world finishes loading and the session registers. Patch-day updates and first-boot world generation both take a while — "still booting" is a real troubleshooting entry below, not a joke.
6

Make yourself admin

Admin is three plain-text files in the server's save directory — by default under AppData\LocalLow\IronGate\Valheim\ on Windows — one 17-digit SteamID64 per line:

  • adminlist.txt — kick, ban, and the rest. Add yourself first.
  • bannedlist.txt — the naughty list.
  • permittedlist.txt — careful: any entry here flips the server to whitelist-only.

Crossplay servers may need platform-prefixed IDs in these lists. The generator builds all three files alongside the start script.

7

Keep it alive — and updated

Stay alive: wrap your script in a restart-on-crash loop (an option in the generator's script output) or run it under Task Scheduler / a service manager so it survives crashes and reboots.

Update after every patch. The server version must match clients — a stale server is the #1 cause of "failed to connect" the day a Valheim patch drops. The updating section has the exact moves for both install methods.
🔌

Valheim Dedicated Server Ports

Steam-only servers need two UDP ports forwarded. Crossplay servers need none of this section — that's the whole pitch.

PortProtocolPurposeForward?
2456UDPGame traffic — whatever you set with -port.Yes (steam-only)
2457UDPQuery — always your game port + 1. Also what Steam's server list wants when you add a favorite.Yes (steam-only)

Seen "2456–2458" elsewhere? Most guides — and plenty of host dashboards — still list three ports. The current official guide lists two: the port and port+1. If you already forwarded 2458, nothing breaks; you just didn't need it. Change -port and both forwards shift with it (port and port+1).

Skip UPnP. It's the router feature that lets any program on your network open ports without asking — convenient, and exactly as safe as it sounds, with a long history of abuse. Forward the two ports manually and leave UPnP off.
CGNAT: when port forwarding is impossible. If your ISP puts you behind carrier-grade NAT, forwarded ports can't reach you no matter what the router says. Starlink is officially CGNAT — its router doesn't even offer port forwarding — and T-Mobile Home Internet behaves the same way. Quick test: if your router's WAN IP doesn't match the IP a "what is my IP" site shows you, you're behind CGNAT. For Valheim the fix is refreshingly simple: use -crossplay (the relay traverses CGNAT) or Tailscale. No ISP phone call required.
🕸️

Tailscale: the Other No-Port-Forward Option

For private Steam-backend groups who don't want to open ports — though honestly, -crossplay already solves this for most people.

Tailscale puts your machines and your friends' machines on a private mesh network, so they connect to your server as if they were on your LAN — no forwarded ports, no public IP, and it works through CGNAT. Tailscale officially documents game-server hosting as a use case. The flow: you and each friend install Tailscale and sign into the same tailnet, then friends join the server via your Tailscale IP (the 100.x.y.z one) and port 2456 using Join IP.

The free Personal plan covers 6 users and unlimited devices — those are the numbers as of April 8, 2026; most guides still quote the stale 3-user/100-device limits. Six users is a Valheim group.

PC friends only. Consoles can't install Tailscale. If anyone in the group is on Xbox or Game Pass console, use -crossplay instead — which, for Valheim, is the better answer anyway: same no-port-forwarding result, zero software for your friends to install.
🚪

How to Join a Valheim Server (the Friend's-Eye View)

Send your friends this section. How they join depends entirely on which backend the server runs — see step 3.

Server typeHow to join
Crossplay (-crossplay)Select your character, open the Join Game screen, and enter the join code the host gave you. Works from anywhere — including the host's own LAN, where it's actually the only way in (local IPs don't work against the crossplay backend).
Steam-only, listedFind it in the in-game community server browser by name, or add your.host.ip:2457 (the query port) as a favorite in Steam's server list so it shows under the Favorites tab.
Steam-only, by IPUse Join IP from the Join Game screen with your.host.ip:2456 (the game port).

Two universal rules: you'll be asked for the server password, and your game version must match the server's — if a patch just dropped and the server hasn't updated, nobody's getting in regardless of method.

🔄

How to Update a Valheim Dedicated Server

The server and every client must be on the same version. After each Valheim patch, the server needs updating before anyone can connect — this is the single most common cause of patch-day "failed to connect".

  • Steam installStop the server, let Steam update the tool like any other app (Library → Tools), start it again. Steam can't patch a running server, so the stop matters.
  • SteamCMDStop the server and run +app_update 896660 validate, then relaunch. The generator's "update on launch" option bakes this into the start script so every boot is current.
  • Your savesWorlds and lists live in the save directory, not the install directory — they persist across updates.
Patch-day ritual: Valheim updates → your friends' clients auto-update → your server doesn't. Update the server first, then tell the group it's safe. Doing it in the other order generates exactly one Discord argument per patch.
💸

How Much Is a Valheim Server, Really?

"Free Valheim server hosting" is real — but free means electricity, so here's the actual math instead of hand-waving.

CostAmountThe fine print
Server software$0The dedicated server tool ships free with the game. No second copy, no license.
Hardware$0Assuming you run it on a PC you already own. A spare or low-power box works too — the requirements are modest.
Network setup$0With -crossplay, not even your time.
Electricity~$6–8/moThe real number. A typical gaming PC draws roughly 50–100 W sitting there serving; at 60 W, 24/7 is about 43 kWh a month — call it $6–8 at average US electricity rates. Your wattage and rate will vary; the shape of the math won't.

So a self-hosted Valheim server costs about as much as a sandwich per month, paid to your utility, plus the non-monetary bits: the PC stays on, the server only exists while it's running, and you're the one updating it on patch day. Renting a server moves all of that into someone else's building for a monthly fee — a fair trade for some groups, unnecessary for others. That's the honest version; decide accordingly.

🩺

Troubleshooting: "Failed to Connect" and Friends

Nearly every "Valheim can't connect to server" post is one of these. Find your symptom, apply the fix, play.

SymptomCause & fix
"Failed to connect" right after a Valheim patchThe #1 cause, every patch day: version mismatch. Clients auto-updated; the server didn't. Update the server and everyone gets back in.
Can't connect over your own LAN with the local IPOn a -crossplay server this is by design — the crossplay backend can't use local or loopback IPs. Use the join code, even sitting next to the server box.
Join code does nothing / IP join failsBackend mismatch. Join codes only work on -crossplay servers; IP and browser joins are the Steam-only flow. Confirm which flag the server launched with (step 3) and use the matching method.
Nobody outside your network can connect (Steam-only)The ports aren't actually open: forward UDP 2456–2457 to the current LAN IP of the server box (it changes — consider a DHCP reservation), allow valheim_server.exe through the firewall, and rule out CGNAT. Or sidestep the whole category with -crossplay.
Server unreachable for the first few minutesIt's still booting. World generation on first launch — and loading a big world on any launch — takes a while, and the server isn't joinable until the session registers. Watch the console; on crossplay servers the join code appearing is your "open for business" sign.
Server never starts at allAlmost always the password rules: 5+ characters, not blank, and not a substring of the server name. Break one and it silently refuses to boot. Fix the flags and relaunch.
Forwarded the ports, still invisible (Starlink / T-Mobile Home Internet)CGNAT. Your ISP shares one public IP across many customers, so inbound traffic can't find you and "port forwarding" does nothing. Fix: -crossplay or Tailscale — both traverse it.

Valheim Dedicated Server FAQ

Is a Valheim dedicated server free?
Yes. The Valheim Dedicated Server tool ships free with the game — it appears under Library → Tools in Steam if you own Valheim, and there's no second purchase to host. Self-hosting costs electricity: a PC drawing around 60 W all month is roughly 43 kWh, about $6–8 at average US rates. The cost section has the full math.
Do I need to port forward for a Valheim server?
Not if you launch with -crossplay — traffic routes through the PlayFab relay and friends join with the code from anywhere, no router changes. Steam-only servers (no -crossplay) do need UDP 2456–2457 forwarded to the server's LAN IP. See the crossplay section and ports.
Can Xbox and PC Game Pass players join my self-hosted server?
Yes — launch the server with -crossplay and they join with the code, per the official crossplay FAQ. Xbox can join but can't host a dedicated server, and there is no PlayStation version of Valheim.
What ports does a Valheim dedicated server use?
UDP 2456–2457 by default — your -port value and port+1. Older guides say 2456–2458, but the current official guide lists just the two; if you already forwarded all three, no harm done. None of this applies to -crossplay servers, which need no forwarding at all.
Why do I get "failed to connect" on my friend's server?
In rough order of likelihood: version mismatch after a patch (the server must update), wrong backend (join code for -crossplay servers, IP/browser for Steam-only), trying a local IP against a crossplay server (the relay can't use loopback or LAN addresses — use the code even at home), ports not actually forwarded on a Steam-only server, or the server is still booting. The troubleshooting table walks each one.
How much RAM does a Valheim server need?
A fresh world runs around 2 GB; mature, heavily-built worlds creep up to 3–4 GB. CPU load is modest — any reasonable desktop handles it. Iron Gate doesn't publish hard minimum specs, so treat anything more precise with suspicion.
How do I update my Valheim dedicated server?
Steam-library install: stop the server, let Steam patch the tool, start it again. SteamCMD: +app_update 896660 validate. Server and client versions must match after every patch — skipping this is the #1 cause of failed-to-connect on patch day. Details in the updating section.
📚
Official documentation
Iron Gate ships the official dedicated-server manual as a PDF inside the server's install folder — it's the source of truth for flags and ports, and it updates with the tool. For crossplay specifics, the official Valheim FAQ at valheimgame.com covers which platforms can host and join. When a random guide and the manual disagree, trust the manual.
Did all this and decided babysitting a server isn't your hobby?
Renting exists — that's literally why we run one. VanillaNodes is our own Valheim host: vanilla servers where every setting on this page is a field in the panel, and patch-day updates are someone else's ritual (ours). Full disclosure: VanillaNodes is ours — same team as GamesOMG. This is the only pitch on the page.
Host it for me →

More GamesOMG tools

Server sorted? The rest of the Valheim kit — and setup guides for the other games you're inevitably going to host next.