How to port forward a Valheim server
Valheim wants two consecutive UDP ports: the game port itself and the one directly above it, which carries the Steam query traffic. Both should point at the same machine.
Your setup
Pick the firmware family, not the exact model — the menus are identical across a range.
Default is 2456. If you changed it, it is the value of -port launch argument.
The private address of the machine running the server — ipconfig on Windows, ip addr on Linux. It starts with 192.168, 10. or 172.
Open these
This firmware accepts ranges, so each line below is a single rule.
- 2456-2457 UDP
2456UDPGame trafficThe port you actually connect to.2457UDPSteam queryHow Valheim advertises itself and how the in-game browser finds you. Forward it, or your friends must join by IP every time.
Old versions only
Current builds do not use these. They are listed because older guides still tell people to open them.
2458UDPLegacy Steam portRequired by builds from 2021 and earlier. Harmless to include, unnecessary on current versions.
Do not open these
This game has no remote-administration port to get wrong. Forward only what is listed on the left and nothing else.
Step by step: your router
- 1
Give the server a fixed local IP
A forward points at one address. If the server picks up a different one after a reboot, the rule silently starts pointing at nothing — this is why forwards "stop working" on their own.
On this router:look for DHCP Reservation, Address Reservation, Static Lease or Manually Assigned IP
- 2
Open the router admin page
Try these addresses in a browser on the same network:
- 192.168.0.1
- 192.168.1.1
- 192.168.2.1
- 10.0.0.1
Almost always printed on a sticker on the router itself.
- 3
Find the port forwarding page
Port Forwarding, Virtual Server, NAT, Applications & Gaming, or Port Mapping
Vendors use at least six names for the same feature. Whatever it is called, the page you want is the one asking for a port, a protocol and a device on your network. If the external and internal port fields both exist, set them to the same number.
- 4
Create one rule per line
a description field, if there is one External / WAN / Public / Service port Internal / LAN / Private port Protocol Internal IP / Device / Server IP Valheim 2456-2457 2456-2457 UDP your server’s local IP External and internal port are the same number here. Changing the external port is possible, but then everyone connects on the new one, so keep them matched unless you have a reason.
- 5
Let the server through its own firewall
The router now sends traffic to the machine, and the machine can still refuse it. Windows Defender Firewall in particular blocks a freshly installed dedicated server by default, which looks exactly like a failed forward.
Take it with you
Valheim — port forwarding rules ------------------------------- 2456-2457 UDP -> <server local IP>
Check whether it worked
Test from outside your own network. Connecting from a machine in the house proves nothing — that traffic never leaves the LAN and never touches the rule you just wrote.
What usually goes wrong
Skipping the query port produces a server that works and appears not to. Friends can still join by typing your address, but the server never shows up in the in-game community browser and never appears in anyone's favourites list, which reads exactly like a broken setup. Older guides add a third port; that one was needed by builds from 2021 and is harmless but pointless now.
Not forwarding at all
Valheim's crossplay backend can relay a session hosted from inside the game, which needs no forwarding but keeps the world alive only while the host is playing. A dedicated server is the difference between a world your friends can visit and one they can only visit when you are online.