Valheim Server Ports: What to Open (2456 and 2457 UDP) and When You Don't Need To
A Valheim server uses two consecutive UDP ports: its own (2456, unless you change it) and the next one (2457). With crossplay you don't need to open any on your router; without it, you do.
Valheim's ports
The server listens on the port you give it with -port and on the next one. If you don't change it, they're 2456 and 2457, over UDP. The first is the one you type when joining by IP; the game uses the second for the Steam server list.
If you have two servers on the same IP, space their ports two apart: the second with -port 2458, for example, which will use 2458 and 2459. Where -port goes, in creating a Valheim dedicated server on your PC.
Rather not set it up yourself? Valheim servers from €8 a month, no contract and a full refund within 72 hours. Or create a free Valheim server, no card needed.
With crossplay you don't need to open ports
Started with -crossplay, the server goes through Valheim's crossplay system (PlayFab), which relays the data through an intermediate server. According to the official manual, that way you don't need to open ports on your router: people join with the public IP and port, with the code or from the list. It's also what lets console players in (crossplay in Valheim).
The catch: with crossplay you can't join with the local IP (192.168.x.x) or with 127.0.0.1. If you play on the same PC or in the same house as the server, join with the code.
The port number still matters even if you don't open it: it's what tells several servers on the same IP apart. And if you ever run several with crossplay on the same PC and the same port, the manual asks for a different -instanceid for each one.
Forwarding the ports on your router (without crossplay)
Give the server PC a fixed IP
On the router, reserve its local IP so it doesn't change when it restarts.
Forward the ports
In the router settings (usually called NAT, virtual server or port forwarding), send UDP 2456 and 2457 to that IP. Every router puts it somewhere different: look up the manual for your model.
Allow the program through the firewall
The first time you start the server on Windows, the firewall asks: tick every box so it can talk to the internet.
Check it from outside
With the server running, ask a friend to join using your public IP and the port, or use Is my Valheim server online?, which checks it from the internet.
If you open the ports and still nobody can join
Look at the IP your router says it has on its status page. If it doesn't match the one any “what is my IP” website shows you, your ISP has you behind CG-NAT and opening ports won't help. Three ways out: start with -crossplay, ask your ISP for a public IP or, if the server has to run without crossplay, have everyone join through a VPN like Radmin VPN or Hamachi.
If the server closes right after starting, check the password: on a public server, Valheim won't start if it has fewer than 5 characters or is contained in the world name. If it starts but your friends can't get in, go over the usual joining errors.
Why it doesn't show up in the server list
First, make sure it isn't started with -public 0: that keeps it off the list on purpose. Then give it a few minutes after starting and search for the exact name.
The list isn't the most reliable way to join. With the address and port (or with the code, if it has crossplay) you can join just the same even if it doesn't appear.
On NapNodes
You don't have to open anything. Each server has its own port, which doesn't have to be 2456: you'll see it on the “Address to play” card, next to the address (yourserver.play.napnodes.com). The next port is yours too, and the game uses it for the list. When joining by IP, type the address with the port, separated by a colon.
Servers are created with crossplay turned on: console players can join too and the code works. If you don't want to appear in the list, turn off “Show in the public list” in “Settings”; both changes apply on restart. To close it off completely to strangers, see Valheim private server.
Frequently asked questions
Which ports does a Valheim server use?
The one you give it with -port and the next one: by default, 2456 and 2457, over UDP.
Do I need to open ports to play Valheim with crossplay?
No. According to the official manual, with -crossplay the server goes through an intermediate server and you don't need to open ports. In exchange, you can't join with the local IP: use the public one or the code.
Are Valheim's ports TCP or UDP?
UDP. Forward 2456 and 2457 over UDP to the server PC.
Why doesn't my Valheim server appear in the list?
It may be started with -public 0, take a few minutes to show up, or not have its ports open (without crossplay). Join with the address and port, which works even if it doesn't show.
Can I run two Valheim servers on the same IP?
Yes, with ports spaced two apart (2456 and 2458, for example), because each one also uses the next port.
Shall we set it up for you?
Valheim servers from €8 a month, never oversold: your RAM is yours alone. And if you'd rather start without paying, there's a free Valheim server, no card needed.
Not sure whether your server is online? Check it in a second with the Valheim server status checker: players, version and password, free.
Free tool: Is my port open?. Check from the internet whether your home server's port is open (Minecraft, Valheim, Zomboid) and whether your ISP uses CG-NAT.
Keep reading
- Valheim Server Always Online: Keep the World Open Without the Host
How to keep your Valheim server on all day so your friends can join without the host: your PC, an old computer, the cloud or a host.
- Play Valheim with Friends Without Port Forwarding: Radmin VPN, Hamachi or the Join Code
How to play Valheim with friends without opening ports: the crossplay join code, Radmin VPN or Hamachi. When each fits, which IP to use and what if it fails.
- Valheim Mods for Playing with Friends on a Server (Updated for 1.0)
Valheim mods that make group play on a server better: shared chests, portals, a shared map and networking. Checked on Thunderstore for 1.0.