Project Zomboid Port Forwarding: UDP 16261 / 16262 (Build 42.19)
Build 42.19 · Host and dedicated servers · Direct connect, Steam Relay, and the default UDP port pair
DefaultPort 16261 and UDPPort 16262 (or the values you set in the server INI). Optional: RCONPort TCP only if you use remote console. Do not open legacy Steam query ports or a long “one port per player” range as a routine step.
When port forwarding is needed
Project Zomboid can reach players in more than one way. Manual port forwarding is for direct UDP to your host. It is not the only way friends can join.
Often works without router rules
- Same LAN (join by local IP or LAN list)
- In-game Host + Steam invite
- Client option Use Steam Relay on the Join screen
- Rented VPS or game panel that already exposes 16261/16262
Usually needs open UDP ports
- Friends on the public internet joining by public IP
- You want to clear the “port closed / performance may be severely affected” direct-connect warning
- Dedicated server on home broadband with direct connections preferred
- UPnP failed or is disabled on the gateway
Current ports (Build 42.19)
Server settings use two UDP ports for player data. Defaults in the Host / server options UI (and matching INI keys):
| Setting / INI key | Default | Protocol | Purpose | Open on router? |
|---|---|---|---|---|
DefaultPort |
16261 |
UDP | Primary player-data / connection port | Yes for internet direct connect |
UDPPort |
16262 |
UDP | Second UDP port used with the primary port | Yes for internet direct connect |
RCONPort |
27015 |
TCP | Remote console only when RCON is configured | Only if you need remote RCON; pair with a strong RCONPassword |
UPnP |
(server option) | — | Ask a UPnP-capable gateway to create mappings automatically; falls back to the default ports if mapping fails | Not a port; enable or disable in server settings |
- UDP 8766 / 8767 as routine Steam query ports for every B42 host
- Per-player ranges such as 16263, 16264, … or “open 16262–16272 for 10 players” as the normal model
- Assuming Build 42 multiplayer is unavailable — current 42.19 includes Host / Join multiplayer
DefaultPort or UDPPort in the server INI, forward those numbers, not someone else’s defaults.
Related hosting capacity and MaxPlayers notes: Hosting Build 42: ports and capacity. Admin option keys: Server administrator tips.
Quick-start: direct connect
- Confirm the host is running. Use in-game Host or the dedicated server tool. Wait until the console shows the server is ready before testing joins.
-
Note the two ports from your config.
Defaults are UDP
16261and16262. CheckZomboid/Server/<name>.iniif you customized them. - Give the host a stable LAN IP. DHCP reservation on the router (preferred) or a static address on the PC, so forwarding rules do not point at the wrong machine after a reboot.
- Create two UDP forward rules (or one range 16261–16262 UDP) to that LAN IP. Protocol must be UDP, not TCP-only.
- Allow the same ports on the host firewall (Windows Defender, ufw, security group, etc.).
- Have a remote friend join with your public IP and primary port (default 16261), or use Steam invite. If direct fails, retry with Use Steam Relay while you finish router work.
UPnP vs manual rules
The server UPnP option tries to configure a UPnP-enabled internet gateway for automatic port forwarding. If that fails, the server continues with its configured default ports — it does not switch to a different connection mode by itself.
- UPnP on, gateway supports it: often enough for small co-op; still verify with a real remote client.
- UPnP off or blocked by ISP/router: use manual port forwarding for direct connect.
- Cloud / game panel: open 16261/16262 UDP in the provider firewall; home-router UPnP does not apply there.
Router and local IP
1. Find the host LAN address
- Windows:
ipconfig→ IPv4 Address on the active adapter. - macOS / Linux: System Settings network panel, or
ip addr/ifconfig.
2. Open the gateway admin UI
Common LAN gateways are 192.168.1.1 or 192.168.0.1 (check the default gateway from the host). Log in with the router admin account (not your Wi‑Fi password unless they are the same).
3. Add port forwarding
Labels differ by brand (Port Forwarding, Virtual Server, NAT, Gaming). Create rules that send external UDP 16261 and 16262 to the host’s LAN IP, same internal ports. Prefer UDP-only over opening “Both” for every port if the UI allows it.
4. Double NAT and CGNAT
- Double NAT: ISP modem-router plus your own Wi‑Fi router. Either bridge the ISP device, or forward on both layers (outer → inner WAN IP, inner → host).
- CGNAT / many mobile home internet plans: you may not get a public IPv4 address you control. Port forwarding cannot work until the ISP provides a public IP, or you use a tunnel/VPN/host elsewhere. Steam Relay may still allow some joins.
Host firewall
Router rules do nothing if the host OS drops inbound UDP.
- Windows: Allow Project Zomboid / Java when prompted, or add inbound UDP rules for 16261–16262 (Private profile at minimum).
- Linux (ufw example):
sudo ufw allow 16261/udp comment 'PZ DefaultPort'
sudo ufw allow 16262/udp comment 'PZ UDPPort'
sudo ufw reload
Prefer two explicit UDP rules over wide ranges such as 16261:16270/udp unless you intentionally run multiple servers with shifted ports.
How to verify
Generic web “port checkers” often probe TCP or expect a service that answers a fixed handshake. Project Zomboid’s game ports are UDP and do not behave like a simple open TCP web port. A “closed” result from such a site is not a reliable diagnosis by itself.
- Confirm the server process is running and listening before any external test.
- Join from another machine on the same LAN using the host’s LAN IP and primary port.
- Join from a remote network (phone hotspot is fine) with public IP + 16261, with and without Steam Relay.
- Watch the server console / host log for an incoming attempt when the client connects.
- If you see the UI warning about a closed port (direct connection), open the second UDP port and retest without forcing Relay.
In-game Host vs dedicated server
In-game Host
Good for small friend groups. Steam invite and Relay are convenient. The same DefaultPort / UDPPort pair applies. The host machine must stay on; the world stops when you leave.
Dedicated server
Steam Library → Tools → Project Zomboid Dedicated Server, or SteamCMD. Same two UDP ports. Better for always-on worlds; you own firewall, backups, and updates yourself.
Connection stuck after the server is up? See Getting Server Info troubleshooting. Broader admin practice: Admin survival guide.
Troubleshooting
| Symptom | Likely causes | What to try |
|---|---|---|
| Friend cannot connect; LAN join works | Missing UDP forwards, wrong LAN IP, OS firewall, CGNAT | Re-check both UDP ports, static/reserved IP, firewall; try Steam Relay; check public IP vs CGNAT |
| Warning that a server port is closed / performance may be affected | Second UDP port not reachable; or client using Relay | Forward UDPPort (default 16262); retest without Relay if you want a direct path |
| Long hang then fail | Packets never reach the host | Wrong public IP/port, double NAT, server not running, UDP vs TCP rule error |
| Instant fail / auth or version errors | Often not port forwarding | Match Build/branch, mods, password, and whitelist — then revisit network |
| Public IP changes often | Dynamic ISP address | Dynamic DNS hostname, or re-share IP after reconnect; ports rules stay on the LAN side |
FAQ
Must I port-forward for every multiplayer session?
No. Same-LAN play and many Steam invite / Relay sessions work without manual rules. Forward when you need reliable direct internet connections or to clear direct-port warnings.
Do I need TCP 16261?
Game traffic uses the two UDP ports. Do not open large TCP ranges “just in case.” RCON is a separate optional TCP port.
Should I open 8766 and 8767?
Not as a standard B42.19 requirement. Stick to DefaultPort and UDPPort unless your host provider’s docs say otherwise for that stack.
Is Build 42 multiplayer offline?
No for current 42.19. Host / Join multiplayer is available; older “host only on Build 41” advice does not apply to this version.
Can an online port checker prove my server is ready?
Not reliably for these UDP game ports. Prefer a real client join plus server-side logs over a website TCP probe.