
Valheim Server Ports and Firewall
Which UDP ports Valheim uses, how port allocation works on GameGrid, and why you never need to configure port forwarding.
The Ports Your Server Actually Uses
GameGrid allocates every server a 100-port block from the 28000-39000 range and hands out three of them. The numbers below are offsets from that base, not Valheim's stock 2456 - the base port for your server is on the Overview tab under Connection Info.
Base + 0, UDP - the game port. This is what -port is set to. On a CROSSPLAY server nothing listens here: traffic is relayed through PlayFab instead, and players join by code. The port is still reserved and still opened in the firewall.
Base + 1, UDP - the Steam query socket. The server answers status queries here, and this is the port the platform health-checks. It is bound whether crossplay is on or off, which is why an unbound game port is not a sign of a dead server.
Base + 3, TCP - the GameGrid Bridge plugin, which is how the panel reads players, chat and events and delivers economy items. It binds 127.0.0.1 only, is never opened in the firewall, and is unreachable from off the machine.
Nothing uses base + 2. It is left free because some Valheim configurations reach for it.
How Ports Work on GameGrid
Ports are assigned by the platform when the server is provisioned, and they are not customer-editable. The Game Port and Query Port fields in Settings are read-only for that reason: changing one would collide with another server on the same host.
Firewall rules are created and managed by the host agent. You do not need to configure Windows Firewall, router port forwarding, or any network settings.
Your assigned port is shown on the server Overview tab under Connection Info. On a crossplay server, share the Crossplay Join Code shown beside it rather than the address - see the Crossplay guide.
If you run multiple Valheim servers on the same host, each gets its own 100-port block. There are no conflicts.
Port Forwarding (Self-Hosted Only)
If you are self-hosting (not on GameGrid), you need to forward both UDP ports on your router:
1. Give the server machine a static LAN IP or DHCP reservation.
2. Log into your router (usually 192.168.0.1 or 192.168.1.1).
3. Create a forwarding rule: external UDP 2456-2457 to the server's internal IP, same ports.
4. Save and reboot the router if required.
5. On Windows, allow the ports through the firewall:
New-NetFirewallRule -DisplayName "Valheim Server UDP" -Direction Inbound -Protocol UDP -LocalPort 2456-2457 -Action Allow
If you use crossplay (PlayFab backend), port forwarding is NOT required - Iron Gate's own dedicated-server guide says the relay handles it, and the game port is then used only to tell apart several servers sharing one public IP.
On GameGrid, none of this is necessary. We handle all network configuration for you.
Changing the Port
You cannot change your server's port from the panel. The allocator owns the 28000-39000 pool and hands each server its own block, so a hand-picked number would collide with another customer on the same host.
If you have a reason that needs a specific port, open a support ticket and we will tell you whether it is possible on your host.
Self-hosted (not on GameGrid): change the -port flag in your start script. The query port moves with it, so -port 2466 uses 2466 and 2467.
Verifying Ports Are Open
On GameGrid: the dashboard shows the server as Online when the query socket answers. That check deliberately targets the query port rather than the game port, because a healthy crossplay server does not bind the game port at all.
Do not use an external port checker against the game port to decide whether your server is up. On a crossplay server it will report the port closed on a perfectly healthy server.
The reliable test is a player connecting - by join code on a crossplay server, or by address on a Steam-only one.
