Valheim: can't connect to a friend's server? Start with the join code, not the router
By DayOneFix Editorial · September 19, 2026
Work through these
0 / 6 doneTicks are saved on this device — close the page and pick up where you left off.
Lag or disconnects on launch day?
Half the launch-week "server errors" we trace are routing problems between you and the game servers, not the servers themselves. A game booster reroutes that path. GearUP is the one we point people to: it supports most new releases within a day of launch.
Use code DAYONEFIX at checkout for 10% off (new users, any plan).
Try GearUP Booster →Affiliate link: if you subscribe through it we earn a commission. It does not change which fixes we recommend, and we say so when a fix does not need it.
The standard advice for “my friend can’t join my Valheim server” is to forward ports 2456 to 2458. That number is repeated almost everywhere, it is not what Iron Gate’s own documentation says, and for most people today port forwarding is not needed at all.
Check these four before you touch the router
Almost all of these failures resolve above the network layer.
1. The join code is stale. Valheim generates a new join code every time the server starts. If the host restarted the server, updated it, or the machine rebooted, every code shared before that moment is dead. When a console friend says “the code doesn’t work”, this is nearly always it. Get a current one and try again — and if the server only just came up, give the crossplay backend a minute to publish the session before deciding it failed.
2. Versions do not match. An “incompatible version” message means exactly what it says: one side has patched and the other has not. On update day the pattern is consistent — the game client updates itself, the dedicated server does not, and the host is left hosting a build nobody can join. Update the server.
3. The server is on the wrong backend. This is the one that silently excludes console players. From Iron Gate’s server documentation, on the -crossplay argument:
Runs the Server on the Crossplay backend (PlayFab), which lets users from any platform join. If you do not include this argument, the Steam backend is used, which means only Steam users can see and join the Server.
So a server started without -crossplay is not broken — it is Steam-only by design. Your Xbox friend will never see it, no matter what you do to your router.
4. The server is hidden. Also from the official documentation:
Set the visibility of your server. 1 is default and will make the server visible in the browser. Set it to 0 to make the server invisible and only joinable via the “Join IP”-button.
If nobody can find the server in the Community list, check -public before assuming a connection fault.
The port numbers, corrected
Here is what Iron Gate actually publishes:
Valheim uses the specified Port AND specified Port+1. Default Ports are 2456-2457.
If you’re using the Crossplay backend (enabled using the “-crossplay” argument), you do not need to do Port Forwarding on your Router.
Two corrections fall out of that:
| What guides say | What the documentation says |
|---|---|
| Forward 2456–2458 | The server uses the port and port+1 — 2456 and 2457. The third port is not in the official documentation. |
| Always port forward | On the crossplay backend, no port forwarding is required. Port forwarding is a Steam-backend concern. |
If you are on the Steam backend and do need to open ports, Valheim’s networking runs over UDP — a firewall rule that only allows TCP will look correct and do nothing.
When it really is the connection
Once the code is fresh, the versions match, the backend is right and the server is visible, you are into the part where the network actually matters. Two things behave differently here than people expect:
- Crossplay authenticates through PlayFab. If your network or a filtering layer blocks PlayFab’s endpoints, the session never registers and the join fails with no useful message. A restrictive DNS, a corporate or campus network, or an aggressive security suite can all do this.
- A struggling host drags everyone. Valheim’s world is simulated by the host. If the host machine is overloaded, the other players experience it as lag and disconnects, and every one of them will spend the evening testing their own connection.
For the distance problem — a group split across continents joining one person’s server — there is no configuration fix. The world lives where the host lives, and everyone else is paying for the trip.
Related
If you are hosting for a group and the connection is fine but the session still falls apart, the usual suspect is the host’s machine rather than anyone’s router. Rotate hosts once to find out: if the problem follows one specific host, you have your answer in five minutes instead of an evening.
Sources
The port behaviour (“the specified Port AND specified Port+1. Default Ports are 2456-2457”), the statement that no port forwarding is required on the crossplay backend, the description of the -crossplay argument and the -public visibility setting are all quoted from Iron Gate’s official Guide to Dedicated Servers. Join-code regeneration on every server start, the “incompatible version” cause, the UDP-only networking and the PlayFab authentication dependency are consistently documented across community server-hosting references and match the official argument list; Iron Gate does not publish a connection-troubleshooting page of its own.