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 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.
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."
-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.
-crossplay PathOne 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:
-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.
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.
Seven steps from nothing to a running, joinable server. If you take the -crossplay path, step 4 disappears entirely.
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 +quitYou'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.
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.-password — 5+ 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.
This single decision drives everything network-related, and mixing the two up is a top "failed to connect" cause:
-crossplay: PlayFab relay, join code, no port forwarding, Xbox/Game Pass friends welcome. Skip step 4.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.
Skip this step entirely if you launched with -crossplay. Otherwise:
-port value and port+1) to the server's LAN IP.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.
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.
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.
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.
Steam-only servers need two UDP ports forwarded. Crossplay servers need none of this section — that's the whole pitch.
| Port | Protocol | Purpose | Forward? |
|---|---|---|---|
| 2456 | UDP | Game traffic — whatever you set with -port. | Yes (steam-only) |
| 2457 | UDP | Query — 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).
-crossplay (the relay traverses CGNAT) or Tailscale. No ISP phone call required.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.
-crossplay instead — which, for Valheim, is the better answer anyway: same no-port-forwarding result, zero software for your friends to install.Send your friends this section. How they join depends entirely on which backend the server runs — see step 3.
| Server type | How 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, listed | Find 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 IP | Use 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.
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".
+app_update 896660 validate, then relaunch. The generator's "update on launch" option bakes this into the start script so every boot is current."Free Valheim server hosting" is real — but free means electricity, so here's the actual math instead of hand-waving.
| Cost | Amount | The fine print |
|---|---|---|
| Server software | $0 | The dedicated server tool ships free with the game. No second copy, no license. |
| Hardware | $0 | Assuming you run it on a PC you already own. A spare or low-power box works too — the requirements are modest. |
| Network setup | $0 | With -crossplay, not even your time. |
| Electricity | ~$6–8/mo | The 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.
Nearly every "Valheim can't connect to server" post is one of these. Find your symptom, apply the fix, play.
| Symptom | Cause & fix |
|---|---|
| "Failed to connect" right after a Valheim patch | The #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 IP | On 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 fails | Backend 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 minutes | It'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 all | Almost 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. |
-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.-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.-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.-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.+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.Server sorted? The rest of the Valheim kit — and setup guides for the other games you're inevitably going to host next.