Port Forwarding for Zombies: Get Your PZ Server Online Pain-Free
In short: Yes โ if you want friends to join your Project Zomboid game, you'll need to open UDP port 16261 on your router (and a couple of others). Without proper port forwarding, external players cannot connect to your server. The good news? It's easier than it sounds. Below is a survivalist's guide to getting your server online. Jump to Quick-Start for a quick rundown of steps. ๐
1. Fast Source Sweep (past 18 months)
Before diving in, let's quickly review recent and highly relevant sources that shed light on port forwarding in Project Zomboid. These include official updates, community discussions, and guides:
Source Type | Title/Summary | Date | Usability Notes |
---|---|---|---|
Official Support (Steam Forum) | "16262 port closed" warning thread โ A dev explains the need to forward UDP 16261 & 16262, and notes Steam Relay usage. | Feb 3, 2024 | Clear official guidance; confirms which ports to open and when the warning can be ignored. |
Official Patch Notes (Blog) | Build 42 Unstable Announcement โ Multiplayer initially disabled in B42 unstable. | Dec 17, 2024 | Alerts that hosting in B42 isn't possible yet (no port forwarding needed until MP is enabled). |
Hosting Guide (IonOS) | "Set up your own Project Zomboid server" โ Step-by-step including releasing ports UDP 8766 & 16261. | Feb 28, 2023 | Comprehensive beginner-friendly guide; outlines port rules for default Steam and game ports. |
YouTube Tutorial | How To Setup Dedicated Server (2023) โ Video tutorial covering server install and port forwarding. | 2023 | Visual walk-through; great for those who prefer a demonstration of router setup and config edits. |
Community Workaround (playit.gg) | Tunnel Hosting Guide โ Using playit.gg to host without port forwarding (no-Steam mode). | Jan 6, 2022 (updated Sep 26, 2023) | Useful for cases where port forwarding isn't possible; reveals limitations (requires multiple tunnels for all ports). |
๐ Quick-Start: Five Steps to Multiplayer
If you're eager to jump in, follow these quick steps to get a Project Zomboid server reachable by friends:
-
Find Your Server's Local IP: On the PC hosting the game, find its LAN IP address.
- On Windows, press Win+R, type
cmd
, then runipconfig
. - Look for the IPv4 address (e.g. 192.168.1.100). This is the address your router will forward ports to.
- On Windows, press Win+R, type
- Log Into Your Router: Open a web browser and enter your router's gateway IP (common ones are 192.168.1.1 or 192.168.0.1). Sign in with admin credentials. (If unsure, check your router's label or manual for the login URL, username, and password.)
-
Create Port Forward Rules: In your router's settings, locate Port Forwarding (sometimes under "Advanced" or "NAT/PAT"). Add a new rule forwarding the following:
- Port
16261 UDP
to your PC's IPv4 address (found in step 1). This is Project Zomboid's main game port. - Port
16262 UDP
to the same IP. This is used for direct player connections. - (Optional) Forward UDP
8766
(Steam master server query) for visibility on the public server list. - Set Protocol to UDP (you do not need TCP for game data).
- Port
-
Open Firewall & Launch Server: Ensure your PC's firewall isn't blocking the game.
- The first time you host, Windows may prompt "Allow access" โ choose Allow on private/home networks.
- On Linux or cloud servers, open the ports via ufw or security group (e.g.
sudo ufw allow 16261:16262/udp
). - Start your Project Zomboid server (either "Host" in-game or launch the dedicated server).
- Test the Connection: Have a friend try to Join using your public IP + port (find your public IP on icanhazip.com or similar). Alternatively, use the Steam "Invite Friend" feature if you hosted via the game's Host button. If set up correctly, they should connect successfully.
That's it! In many cases, the above is all you need. Keep reading for a deeper dive into how it all works, plus detailed guidance and fixes for common snags.
๐ A Note on Build 42 Unstable (B42)
At the time of writing, Build 42's multiplayer is disabled during testing. If you're on the B42 unstable branch, you cannot host or join MP games yet. Stick to Build 41 for multiplayer. Once B42 MP is enabled (likely with similar port requirements as B41), you'll use the same port forwarding steps described here. We'll update this guide when that happens โ until then, B42 players can ignore port forwarding.
Understanding Project Zomboid Networking (B41 Basics)
Before messing with router settings, it helps to know which ports Project Zomboid uses and why. Here's a quick breakdown:
- โถ 16261/UDP โ Game Server Port: This is the primary port for Project Zomboid's server. Clients (players) handshake on UDP 16261 to connect. If you open only one port, make it this one.
- โถ 16262/UDP โ Direct Connect Port: Project Zomboid uses an additional UDP port for gameplay data (often one per player). By default, the first additional port is 16262. If this isn't open, players may still connect via Steam's relay, but the game will warn "Server has port 16262 closed. Performance may be severely limited."
- โถ 8766/UDP โ Steam Query Port: This port is used to list your server on Steam's server list and for initial handshake via Steam. In older PZ versions (pre-41.77), UDP 8766 and UDP 8767 were required to be open.
- โถ Additional Ports for More Players: Originally, PZ documentation suggested opening a range (16262โ16272 UDP for a 10-player server). Recent testing shows only 16261 is needed for most cases (Steam-based connections).
- โถ 27015/TCP โ RCON (Optional): By default, the server's RCON (Remote Console) listens on TCP 27015. If you need to use RCON tools to administrate the server remotely, forward this TCP port as well. Otherwise, you can skip it.
Quick Reference: Default Ports
Port | Protocol | Purpose | Required? |
---|---|---|---|
16261 | UDP | Main server listener (game data) | Yes (primary port) |
16262 | UDP | Direct connect (first player slot) | Recommended (prevents Steam relay fallback) |
16263+ | UDP | Additional player slots (if many) | Optional (for >2-3 players) |
8766 | UDP | Steam server browser query | Optionalยน (for public listing) |
8767 | UDP | Steam matchmaking (deprecated use) | Optional (legacy) |
27015 | TCP | Remote console (RCON) | No (unless using RCON) |
ยน Note: Even if you don't open UDP 8766, friends can usually join via the Join menu or Steam invites as long as 16261 is open. Forwarding 8766 can help your server appear on the public list or for very old clients.
Did You Know?
Project Zomboid's multiplayer uses UDP for game traffic (via the RakNet library). Unlike TCP, UDP is connectionless and faster for real-time action, but it means any lost packets (e.g. world chunk data) rely on the game's protocol to resend. That's why having the direct UDP ports open improves performance โ the game can manage reliable delivery itself rather than tunneling through Steam's network.
Steam Relay vs. Direct Connection
Project Zomboid devs integrated Steam Networking to simplify co-op. If you host via the in-game Host button, by default the game will attempt NAT traversal โ essentially using Steam as a middleman if direct connections fail. This is the Steam Relay system that can often let friends join without manual port forwarding. Sounds great, right? However, there's a catch: the relay can introduce higher latency and bandwidth limits. It's essentially a backup path.
โ Direct Connection (Port Forwarded)
- Lower latency
- More stable connection
- Better for multiple players
- No warnings in-game
- Full bandwidth available
! Steam Relay (Fallback)
- Higher latency
- Potential connection issues
- Shows "port 16262 closed" warning
- Bandwidth limitations
- Convenient but less optimal
The game prefers direct UDP to your machine if available. If it can't reach you directly (no port forwarded), it will often still connect via Steam, but you'll see that "port 16262 closed" warning on the client side. The developers themselves noted that port forwarding isn't necessary for small co-op (Steam will handle it) but also that it's "as easy as it can get" to host by just clicking Host.
Summary: If you're hosting a quick game for one friend and can't be bothered with router settings, try inviting via Steam first โ it might work thanks to relays. For anything more serious (or if the Steam invite fails), do the proper forwarding.
๐ Setting Up Port Forwarding on Your Router
Now to the main event: configuring your router to allow external connections. Every router's interface is a bit different, but the core steps are similar. We'll walk through the general process and then cover tips for popular router brands.
1. Reserve or Set a Static Local IP
Before creating forwarding rules, ensure your host computer's local IP stays constant. By default, your router's DHCP may change your PC's IP over time (e.g. your PC might be 192.168.0.100 one day, 192.168.0.101 the next). If that happens, the port rule would point to the wrong device.
๐ก Tip: Use an IP outside the typical DHCP range if setting it on your PC. For example, if your router hands out 192.168.1.100โ150, choose .160 for static. This avoids potential conflicts.
2. Access the Router's Port Forwarding Menu
Log in to your router's web interface (usually by navigating to its local IP in a browser, as described in the Quick-Start). Once you're in, find the section for Port Forwarding. This might be under:
- Advanced Settings > Port Forwarding/Port Triggering (common on Netgear).
- Firewall > Virtual Servers (on some TP-Link and D-Link models, "Virtual Server" = port forward rule).
- NAT > Port Forwarding (on some ASUS, often under WAN settings).
- A dedicated Port Forwarding tab or menu.
Add a new port forward rule and you'll typically need to input:
- Service Name (description โ e.g. "Project Zomboid Server").
- Port Range (External/Internal) โ e.g. start 16261, end 16261 (if a single port).
- Protocol โ choose UDP (or "UDP/TCP" or "Both" if UDP-only isn't an option).
- Internal IP / Device โ the local IP of your server PC (e.g. 192.168.1.100).
Figure: Port forwarding settings on a typical router (TP-Link interface). Here, we forward UDP ports 16261โ16262 to the host's local IP.
After adding, save/apply the changes. Your router may require a reboot for rules to take effect (most apply instantly, but if in doubt, reboot the router).
3. Verify the Ports Are Open
With rules in place and your server running, it's time to check from the outside world. Use an online port checker tool to see if your port is reachable. For example, you can use CanYouSeeMe.org or YouGetSignal's Open Port Check. Enter 16261 (and your IP) and scan for UDP.
If the tool says Open/Success ๐
Your port forwarding is working!
If it says Closed/Timed out
Don't panic. Many port-check websites only check TCP by default, or your server might not have been running during the test.
โ ๏ธ Heads up: Some ISPs block inbound ports by policy (common for mobile/hotspot connections or certain broadband ISPs). If you suspect this, you may need to contact your ISP or use a VPN/relay service. More on this in Troubleshooting.
Brand-Specific Port Forwarding Tips
Every router brand has its quirks. Here are a few quick pointers for popular ones, since "find the Port Forward page" is easier said than done sometimes:
๐น Netgear
Go to Advanced > Advanced Setup > Port Forwarding/Port Triggering. Ensure "Port Forwarding" is selected (not triggering), then Add Custom Service. Input name, choose UDP, and set the ports. Netgear lets you specify an external port range and an internal start port โ keep them the same for simplicity. Hit Apply and the rule will appear in the list.
๐น TP-Link
Look under Forwarding > Virtual Servers in the web interface. Click "Add New". Enter the external port (or range), internal port (often can be same or left blank = same), and your device's IP. Choose UDP. TP-Link routers often have a dropdown to select your PC if it's currently connected (makes it easier). Save the rule; it should show up in the table of virtual servers.
๐น ASUS
Go to Advanced Settings > WAN > Virtual Server/Port Forwarding. Enable port forwarding if there's a master switch. Then add a new line: description, local IP, protocol (UDP), internal port = 16261, external port = 16261. ASUS interfaces are pretty straightforward. Don't forget to hit Apply.
๐น ISP Gateway (AT&T, Arris, etc.)
These might label it as "NAT/Gaming". You'd select your computer from a device list and then either pick Project Zomboid from an application list or create a custom service with the ports. For example, on AT&T's BGW210, you go to Firewall > NAT/Gaming, add a custom service for UDP 16261โ16262, and assign it to your PC.
๐ก๏ธ Security Note: Only forward the ports you need, and avoid using DMZ on your gaming PC if possible. While putting your PC in the DMZ (all ports open) is a quick fix, it exposes you to unnecessary risk. Forwarding just 16261/16262 UDP greatly limits exposure.
๐ฅ Configuring Firewalls & Antivirus
Even after you've convinced your router to let players in, local firewalls on the host PC can slam the door shut. You need to allow Project Zomboid server traffic through your computer's firewall (Windows Defender Firewall on Windows, or iptables/ufw on Linux, etc.). Here's how:
Windows Firewall (Defender)
When you first run a Project Zomboid server (either via the dedicated server tool or using Host in-game), Windows should pop up a dialog: "Windows Defender Firewall has blocked some features of this app." It will list Project Zomboid or Java (since the server runs on Java). Click "Allow Access" and ensure at least the Private network box is checked.
If you hit Cancel or it never appeared, you may have to set rules manually:
- Open Windows Firewall with Advanced Security (you can find it in Control Panel or simply search "Firewall" in start menu).
- Go to Inbound Rules, and click "New Ruleโฆ".
- Choose Port. Select UDP and enter 16261-16262 as Specific Ports (you can comma-separate or specify a range).
- Allow the connection. Select the network profiles (Private/Home is most important; you can include Public if you want).
- Give it a name like "PZ Server UDP Ports" and finish.
๐ก Pro Tip: To verify Windows Firewall isn't the culprit, you can temporarily turn it off (not recommended for long, but as a quick test). If players can suddenly connect with firewall off, you missed a rule. Turn it back on and adjust the settings properly.
Linux Firewall (ufw/iptables)
On Linux, if you're running a dedicated server (perhaps on a VPS or a spare machine), you'll need to allow the ports via your iptables or ufw settings:
For ufw (Ubuntu's uncomplicated firewall):
sudo ufw allow 16261/udp comment "Project Zomboid main port" sudo ufw allow 16262/udp comment "Project Zomboid second port" sudo ufw reload
For iptables (raw):
iptables -A INPUT -p udp --dport 16261 -j ACCEPT iptables -A INPUT -p udp --dport 16262 -j ACCEPT
For firewalld (CentOS/Fedora):
firewall-cmd --add-port=16261/udp --permanent firewall-cmd --add-port=16262/udp --permanent firewall-cmd --reload
๐ฅ๏ธ Running Co-op vs. Dedicated Servers
Project Zomboid offers two multiplayer hosting methods, and it's useful to understand how port forwarding applies to each:
In-Game Co-op (Host menu)
This is the casual way to play with friends. You launch Project Zomboid, click Host, configure a server (or use the default "servertest"), and start. The game will launch a server in the background and your world will be live for others to join.
- Steam Integration: Co-op games use Steam invites and can leverage Steam's networking.
- Port Forwarding: As discussed, the Host game will still use port 16261. If you did not port forward, Steam's relay might kick in.
- Inviting Friends: Hit Esc to open the pause menu and click Invite Friends. This uses Steam's invite system.
- UPnP: The co-op server tries to use UPnP to automatically open ports on UPnP-enabled routers.
- Stopping Co-op: Simply exit to the main menu and the server shuts down.
Dedicated Server (separate server application)
For those looking to host a server that runs even when you're not playing (or to host more players, mods, etc.), the dedicated server is the way to go. It's essentially a headless version of the game that runs in console mode.
- Setup: Install via Steam (Tools > Project Zomboid Dedicated Server) or via SteamCMD on a machine.
- Port Forwarding: All the port rules discussed apply equally here. The dedicated server uses the same default ports.
- Public vs. Private: If Public=true and your server is successfully reaching Steam, it will show up on the server list.
- Multiple Servers: If you want to run two PZ servers on one machine, you must assign different ports for the second server.
In summary, dedicated servers give you more control (and responsibility). They rely on proper network setup since there's no GUI prompting you to allow firewall access. The benefit is your world persists and can host more players reliably. Just remember: forward the ports on the router, and allow them on the host firewall, and you're golden.
๐ง Troubleshooting Common Issues
So you've done everything "right" but players still can't join? Don't worry โ this is the section where we debug the apocalypse. Below are common problems and their solutions, in Q&A format:
๐งฐ Advanced Tips & Tools
By now you should have a functioning server open to the world. Here are some additional tips and tools for power-users and curious survivors:
Dynamic DNS
Services like No-IP can give your server a memorable name. Instead of "join 123.45.67.89:16261", you can say "join myserver.ddns.net:16261". No-IP has a free tier (requires periodic renewal) and your router might support updating it automatically.
Logging & Console
Keep an eye on the server console (the text window) while players connect. It provides useful info: who connected, any errors, etc. If someone fails to connect, the console might at least show an attempt (or nothing, which itself is telling).
RCON Administration
If you forward TCP 27015 and set an RCON password in ServerOptions.ini, you can use an RCON tool to remotely issue server commands (like kicking players, broadcasting messages, etc.) without being in-game. This is useful for dedicated servers.
Backups
If you're hosting a long-term server, back up your save! Port forwarding won't protect you from a buggy mod ruining the map or a power outage corrupting a save. Regularly copy the Zomboid/Saves/Multiplayer/<servername> folder somewhere safe.
Patch-History: Networking Changes
Let's review some changes over time that impacted hosting, so you're aware of historical and future adjustments.
Date (Build) | Change Note | Impact on hosting |
---|---|---|
Dec 20, 2021 (Build 41.60) | Official Multiplayer release on stable branch. PZ now uses UDP 16261 for direct play; older Steam beta ports deprecated. | Players had to forward 16261 UDP (and Steam 8766 UDP) to host for the first time on B41. |
Oct 4, 2022 (Build 41.77) | Introduced additional direct connect port usage. "The additional port (UDP 16262 by default) is used to handle the direct connection." | Hosts now need to forward an extra UDP port (16262) per server for smooth direct connections. |
Dec 12, 2022 (Hotfix 41.78.16) | Added "Use Steam Relay" option in server browser (client) and fixed related connectivity bugs. | Made joining servers more user-friendly when ports aren't open. |
Dec 17, 2024 (Build 42 Unstable) | MP disabled in initial Unstable release. B42 launches without multiplayer to focus on testing new features. | Temporarily no need to forward ports on B42 โ players had to stay on B41 for co-op. |
Upcoming | (Planned Build 42 Stable) Re-enable MP with potential networking optimizations. | Expected similar port forwarding needs (16261+), but stay tuned to official patch notes for any new port info. |
Conclusion ๐
Setting up a Project Zomboid server for friends is a bit like fortifying your safehouse: it takes some effort to get all the barricades (or rather, gateways) in place, but once done, you've created a secure space to survive together. I remember the first time I hosted a game โ my friends were stuck "outside", metaphorically banging on the windows while I fiddled with router settings. It felt eerily similar to a Zomboid night where the zombies are at the door because I forgot to hammer some planks. After finally forwarding the right ports, their characters popped into my server lobby, and it was as satisfying as clearing a horde with a well-timed Molotov.
In the end, port forwarding is simply opening a door. The internet (and perhaps the undead) are kept out of your network by default โ you're just choosing which door to unlock so your buddies can come in and slay zombies by your side. Once it's done, you rarely have to think about it again.
Action Step
Now that your ports are forwarded and your firewall's tamed, grab your weapon of choice and launch Project Zomboid. Invite your friends, and enjoy the apocalypse together lag-free! One little network tweak, a whole lot of co-op fun. Good luck, and happy zombie hunting!
Further Resources ๐
For more information and help, check out these resources:
- ๐ Official PZ Wiki โ Dedicated Server Guide: Project Zomboid Wiki's page on setting up dedicated servers and networking.
- ๐จ๏ธ Indie Stone Forums โ Multiplayer FAQ: Common MP questions answered by devs and community (including port specifics and troubleshooting tips).
- ๐ฎ Steam Community Guide โ Ultimate Multiplayer Guide [B41]: A detailed Steam guide covering hosting, port configs, and even mods setup.
- ๐ No-IP Port Forwarding How-To: General port forwarding tutorial โ useful if you need a refresher on router steps or to diagnose tricky setups.
- ๐ Portforward.com's PZ Entry: Step-by-step router-specific instructions for Project Zomboid.
- ๐ playit.gg Tunnel Guide: If you absolutely cannot port forward normally, this guide shows how to use a tunneling service as a workaround.
(When all else fails, remember the community โ there are countless forum threads and Reddit posts from fellow survivors who've encounteredโand overcomeโevery networking hiccup imaginable. Don't hesitate to reach out!)