How to port forward a Minecraft server
Last checked:
To let friends outside your home join a Minecraft server on your PC, your router has to send incoming connections on the Minecraft port to that PC. That's port forwarding. Java Edition uses TCP port 25565, and Bedrock uses UDP 19132. Here's how to set it up, how to test it, and what to do when it still won't work.
Step 1: give your PC a fixed local IP
Find your PC's local IP (Windows: ipconfig, the IPv4 address, usually 192.168.x.x) and your router's address (the default gateway). In the router, reserve that IP for your PC (often called DHCP reservation) so the rule keeps pointing at the right machine.
Step 2: add the router rule
Open the router's page in your browser (the gateway address) and find Port Forwarding (sometimes called Virtual Server or NAT). Add a rule: external port 25565, internal port 25565, protocol TCP, internal IP = your PC. For Bedrock, use UDP 19132.
Step 3: allow it through your firewall
On Windows, allow Java (or add an inbound rule for TCP 25565) when the firewall asks, or in Windows Defender Firewall → Advanced settings → Inbound Rules.
Step 4: test it from outside
Start the server, find your public IP (search "what is my IP"), and test from outside your network: a friend joins your.public.ip:25565, or use a port-check tool. Testing from inside your own network can fool you.
Still not working? Check for CGNAT
If your router's WAN IP doesn't match your public IP, or starts with 100.64–100.127, your ISP puts you behind carrier-grade NAT (CGNAT). That's common on mobile, satellite and some fiber providers. Port forwarding can't work there. You'd have to ask your ISP for a public IP, or use a tunnel or a host.
Other things to know
- Your public IP can change, and your friends need the new one each time.
- An open port shows your home IP to everyone you share it with.
- Changing the port in
server.propertiesmeans forwarding that port instead.
Or skip port forwarding
A Packyard server doesn't need port forwarding at all. Your friends join a permanent address like my-server.play.packyard.ca. It doesn't change, and your home IP stays private. Minecraft from $5/month for 3 GB. Servers run in Seattle (US West). Java Edition only.
- Size: 3 GB for vanilla or Paper with a few friends ($5/month), 4 GB for a lightly modded server ($6). That's $1.50 per GB per month, $5 minimum, in USD plus applicable taxes.
- First-payment refund if something on our side doesn't work (see Refunds). Cancel any time in the panel. Available in the US and Canada (not Quebec).
How to make a Minecraft server · Why addresses change (and how we keep yours) · Test it with our server status tool
FAQ
Which port does Minecraft use?
Java: TCP 25565. Bedrock: UDP 19132.
Is port forwarding safe?
It opens one port to one program. The bigger trade-off is that everyone you share it with sees your home IP.
Why does my port checker say closed?
The server isn't running, the firewall blocks it, the rule points at the wrong local IP, or you're behind CGNAT.
Do I need to port forward for LAN?
No. Players on the same network can join with your local IP.
Also see: How to make a Minecraft server, How to make a modded Minecraft server, Minecraft hosting. Back to Packyard home.
Packyard is not an official Minecraft product and is not affiliated with Mojang.