Back to Blog
Guide
11 min readSep 11, 2026

Valheim Dedicated Server Port Forwarding: The Complete 2026 Setup & Fix

Configure Valheim dedicated server port forwarding on ports 2456-2458 UDP. Resolve AMP game port not listening, fix servers visible in community list but not joinable, and bypass CGNAT.

Quick Answer: Valheim Port Forwarding Settings

To set up Valheim dedicated server port forwarding, forward ports 2456 through 2458 UDP to your host PC static IP address. The primary direct-join game port is 2456 UDP, while 2457 UDP is the Steam server query port. Never forward TCP. If your ISP uses CGNAT or you host behind Starlink, bypass port blocks with Proton VPN or PureVPN.

Valheim Patch 0.218+ & Ashlands Verified
Zero Guesswork Protocol: Pure UDP Ports 2456-2458

Official Port Matrix & Network Protocol Requirements

Setting up a valheim dedicated server port forwarding rule should be an exciting moment: you want your Viking clan to explore the Mistlands and Ashlands together without paying monthly hosting fees. But few things are more frustrating than seeing your server running in the console while friends complain it says "Failed to connect" or isn't showing up in the community server browser.

Whether you run your server via SteamCMD, Docker, Windows batch scripts, or game server panels like AMP (CubeCoders), this guide delivers the exact valheim port forwarding settings, resolves the notorious amp valheim server game port not listening alert, and provides an instant bypass if your ISP traps you behind CGNAT or Starlink satellite routing.

Official Valheim Dedicated Server Port Matrix

Service FunctionDefault PortProtocolRequired For
Main Game Traffic (Direct Connect)2456UDPDirect IP player connections
Steam Server Query Port2457UDPSteam server browser ping & community listing
Secondary Relay & Engine Port2458UDPBackwards compatibility & socket fallbacks
Interactive Tool & Information Gain

Valheim Port Range Calculator & Windows Firewall Generator

If you run multiple instances or customized your start_headless_server.bat with a custom -port argument, enter your base port below. The script updates dynamically:

Notice: Valheim automatically binds Base Port + 1 (2457) as the Steam query port. Always forward the full 3-port range 2456-2458 UDP.

Required Forwarding Range:2456-2458 UDP
Steam Query Listen Port:2457 UDP
Direct Join IP:Port format:your.public.ip:2456
Windows PowerShell Inbound Rule (Administrator)
# Open Valheim Dedicated Server UDP Ports in Windows Defender Firewall
New-NetFirewallRule -DisplayName "Valheim Server UDP (2456-2458)" -Direction Inbound -LocalPort 2456-2458 -Protocol UDP -Action Allow
Protocol Clarification

Is Valheim Server TCP or UDP? (Valheim Port Forward TCP or UDP)

Valheim dedicated servers use UDP exclusively. The game networking architecture and Steam master query service run entirely over the User Datagram Protocol (UDP). You should only forward UDP ports 2456 to 2458. Forwarding TCP is unnecessary and won't enable connections.

Many router interfaces offer options like TCP, UDP, or BOTH / ALL. While selecting "BOTH" does not break the connection, it opens unnecessary attack surface on your host system. Because real-time games prioritize low-latency packet transmission over guaranteed delivery handshakes, Iron Gate designed Valheim around UDP.

If you configured your router rule with TCP only, your friends will receive an immediate timeout because the server never responds to incoming TCP SYN packets.

Search Intent Analysis

Does Valheim Need Port Forwarding? (Valheim Dedicated Server Without Port Forwarding)

A frequent question from gamers is whether they can run a valheim dedicated server without port forwarding. The answer depends strictly on whether you enable the -crossplay flag:

With Crossplay Enabled (-crossplay)

When launching with the -crossplay launch parameter, Valheim uses Microsoft PlayFab relay servers to handle NAT traversal (STUN/TURN). This allows Xbox and PC players to connect via an alphanumeric Join Code without router port forwarding.

Downside: Introduces higher latency (ping spikes), periodic desync, 10-player performance bottlenecks, and frequent "Connecting" loops during high traffic.

Standard Dedicated Server (Direct IP)

Running a high-performance, modded (Valheim Plus / BepInEx), or lag-free 10-player world requires valheim dedicated server port forwarding. Direct UDP connections communicate peer-to-peer without relying on PlayFab relay intermediaries.

Advantage: Lowest possible ping, instant connection loading, full community list discovery, and stability under heavy world physics.

Step-by-Step Walkthrough

How to Set Up Valheim Port Forwarding: 4 Simple Steps

Follow these 4 chronological steps on your host PC and home router:

1Assign a Static Local IP to Your Server PC

Your router routes incoming internet packets to a specific internal IPv4 address (e.g. 192.168.1.150). If your PC uses dynamic DHCP, restarting your computer might change this address and break your forwarding rule.

  • Press Win + R, type cmd, and press Enter.
  • Type ipconfig and note your IPv4 Address and Default Gateway.
  • Reserve this IP in your router's DHCP Reservation menu, or configure a static IP in Windows Network Adapter properties.

2Configure Port Forwarding on Your Router (e.g. ASUS, TP-Link, Netgear)

Access your router's admin interface by opening a browser and navigating to your Default Gateway (commonly 192.168.1.1 or 192.168.50.1). For detailed hardware instructions on ASUS routers, see our dedicated ASUS port forwarding guide.

Rule Name: ValheimServer

Service / External Port Range: 2456-2458 (or 2456:2458 depending on router syntax)

Internal / Local Port Range: 2456-2458

Internal IP Address: [Your Host PC Static IP, e.g. 192.168.1.150]

Protocol: UDP

Source IP: Leave Blank / Any (Do not restrict unless you know friends' exact IPs)

3Allow UDP Inbound Traffic in Windows Firewall

Windows Defender Firewall drops unsolicited external UDP packets by default. Run the one-click PowerShell script generated in our interactive tool above, or create an Inbound Rule for ports 2456-2458 UDP in Advanced Security Settings.

4How to Find IP Port of Valheim Dedicated Server for Friends to Join

To allow outside friends to join:

  1. Test your connection type and discover your public IP using our free NAT Checker diagnostic tool.
  2. Give friends your Public IPv4 formatted as: [YourPublicIP]:2456.
  3. Friends open Valheim, click Start Game → Join Game → Join by IP, enter [YourPublicIP]:2456, and connect!

LAN Note (NAT Hairpinning): If you are playing on the same local network as the server host, do not use your Public IP. Connect using your host PC's local IP (e.g. 192.168.1.150:2456).

Specialized Troubleshooting

AMP Valheim Server Game Port Not Listening: Cause & Fix

A common frustration among server administrators using AMP (CubeCoders) is the warning: "amp valheim server game port not listening" (or amp valheim game server port not listening).

Why Does AMP Report the Game Port as "Not Listening"?

Unlike TCP sockets that establish an active listening listener (visible as LISTENING in netstat), UDP is stateless. The Valheim game server process opens a raw UDP socket on 2456, but in many Windows and Linux kernel builds, UDP endpoints show status *.* rather than a named listening state.

Furthermore, Valheim does not actively emit game heartbeats until the first client attempt triggers an initial handshake! AMP's internal port prober looks for an active response; if no one is connecting, AMP assumes the port is offline.

How to Test and Verify the Port Socket:
Run in PowerShell (Admin):
Get-NetUDPEndpoint -LocalPort 2456,2457 | Format-Table -AutoSize

If the output returns an owning Process ID (PID) matching valheim_server.exe, the server is listening correctly regardless of AMP's visual warning banner!

Valheim Port Forwarding Not Working? Top 4 Reddit & Community Fixes

1. Dedicated Server Appears on Community Servers List but Not Joinable

As reported on Reddit r/valheim: The Steam server query port (2457 UDP) handles master server heartbeats, so the listing appears. However, if port 2456 UDP is blocked by your router or Windows Firewall, players can browse the server but get a timeout when clicking "Join". Ensure both 2456 and 2457 are forwarded.

2. Google WiFi / Mesh Router Double NAT

Google Nest WiFi users often report port forwarding failing even after creating rules in the Google Home app. If your Google WiFi is plugged into an ISP modem/gateway that is ALSO performing NAT, you are in a Double NAT. You must bridge your ISP modem or place the Google WiFi in DMZ.

3. Mistaking Valheim for Minecraft (Port 25565 vs 2456)

If you searched "how do I port forward to 25565", note that 25565 TCP is strictly for Minecraft Java Edition. Valheim servers will not respond on 25565.

4. Port Mirroring vs Port Forwarding

Some routers list Port Mirroring (SPAN) alongside Port Forwarding. Port mirroring duplicates traffic for network packet sniffing (Wireshark) and will not route external players to your Valheim server.

Server Maintenance

How to Transfer Valheim Server to Another PC

If your current hosting rig is struggling with CPU physics or you want to migrate your world to a dedicated 24/7 machine:

1. Navigate to the Valheim world save directory on the source PC:
%USERPROFILE%\AppData\LocalLow\IronGate\Valheim\worlds_local

2. Copy both the [WorldName].db and [WorldName].fwl files to a flash drive or cloud drive.

3. On the new destination PC, install Valheim Dedicated Server via Steam or SteamCMD, launch it once to generate directories, and paste your .db and .fwl files into the same folder.

4. Update the -world "WorldName" argument in your startup script and configure your router's port forwarding rule to target the new PC's local IP.

The Ultimate Fix for CGNAT, Starlink & ISP Port Blocks

Behind CGNAT, Starlink or Playing with a VPN? Here is How to Host

Did you follow every step above, configure Windows Firewall, and set your router rule, but outside friends still cannot connect?

The Hidden Roadblock: Carrier-Grade NAT (CGNAT) & Starlink

If your ISP uses CGNAT (RFC 6598)—common with Starlink satellite internet, T-Mobile/Verizon 5G Home Internet, college dorms, and fiber providers—your router does not have a real public IPv4 address. Instead, thousands of subscribers share one carrier IP.

No router port forwarding setting in the world can open incoming ports on a CGNAT connection.

You can verify whether you are trapped in CGNAT in 10 seconds with our live NAT Type & IP diagnostic tool.

Want to Host a Valheim Server While Keeping Your VPN On?

Many Reddit users ask: "Is there any way to set up a private Valheim server while still having a VPN running?"

Standard VPNs (like ExpressVPN or NordVPN) encrypt outbound traffic and mask your IP, but they do not assign you an open inbound listening port. When a standard VPN is enabled on your hosting PC, outside players attempting to reach your home router receive no response because your server sends game replies out through the encrypted VPN tunnel (routing asymmetry).

The Solution: A Verified Port-Forwarding VPN

By routing your Valheim server through a VPN that explicitly supports Inbound Port Forwarding, the VPN cloud server assigns you an open, publicly reachable endpoint. This bypasses ISP CGNAT, eliminates router Double NAT, protects your personal home IP from DDoS attacks, and lets you host effortlessly!

100% CGNAT Bypass

This page contains affiliate links. If you sign up through them, NAT Checker may earn a commission at no extra cost to you.

Top Choice for Valheim Hosts

Proton VPN

Swiss-engineered privacy with 1-click Inbound Port Forwarding built straight into the desktop app. Ideal for single-instance game servers and low-latency gaming.
  • Built-in Port Forwarding toggle in desktop client (Zero router setup)
  • Ultra-fast WireGuard protocol with up to 10 Gbps server bandwidth
  • Bypasses Starlink, 5G cellular, and ISP Carrier-Grade NAT completely
  • Strict no-logs policy audited under Swiss privacy jurisdiction
  • DDoS protection keeps your real home residential IP concealed from players
Multi-Port & Dedicated IP

PureVPN

Best for hosting complex game server suites requiring multiple open ports or router-level VPN tunnels with a dedicated static IP add-on.
  • Dedicated Port Forwarding add-on allows custom multi-port ranges
  • Optional Dedicated IP add-on ensures your server address never changes
  • Works on Windows, Linux, and router-level OpenVPN/WireGuard tunnels
  • Affordable multi-year plans with 31-day money-back guarantee
  • Over 6,000 servers across 65+ countries for optimal host routing

How to Set Up Valheim with Proton VPN in 3 Minutes:

  1. Subscribe to Proton VPN and install the app on your host PC.
  2. In the app settings, go to Connection → Advanced and toggle Port Forwarding to ON.
  3. Connect to a P2P-supported server near you. Proton VPN displays an active forwarded port number (e.g. 49210).
  4. In your Valheim server start script, set -port 49210, and launch the server.
  5. Give your friends your Proton VPN exit IP and the assigned port. They will connect instantly through CGNAT without any router changes!
Frequently Asked Questions

Frequently Asked Questions: Valheim Dedicated Server

Which hosting provider is best for Valheim servers?

If self-hosting on your PC is too taxing or your ISP refuses to provide open ports, providers like Dathost, GTXGaming, and Indifferent Broccoli specialize in 1-click Valheim hosting. However, self-hosting via a port-forwarding VPN like Proton VPN costs significantly less while giving you full file and mod control.

How do I test Valheim ports to see if they are open?

Standard web port checkers (like CanYouSeeMe) test TCP ports by default and will falsely report Valheim ports as "Closed". To test Valheim ports accurately, run your server, then use a dedicated UDP testing utility like PortQuery or have an outside friend test connecting directly.

Why is my Valheim server visible in Steam favorites but not the in-game browser?

Valheim displays a curated list of active community servers via Valve master servers. Because thousands of servers compete for visibility, it can take up to 15-30 minutes for new servers to index. Adding the server directly via IP:Port in Steam Favorites (View → Game Servers → Favorites) bypasses this lag immediately.

Share this article