Guide · Getting started

How to port forward a Minecraft server

Port forwarding tells your router to send incoming Minecraft connections to the computer running the server. Without it, friends outside your home network cannot join. It only takes a few minutes, but there are a few traps worth knowing about first.

Step 1: give the server PC a fixed local IP

Routers hand out local addresses that can change after a restart, and a forward pointing at the old address silently stops working. In the router settings, look for DHCP reservation or static lease and reserve the current local IP for the server PC. You can find that IP by running ipconfig on Windows.

Step 2: create the forwarding rule

Open the router admin page, which is usually at 192.168.1.1 or 192.168.0.1, or printed on a sticker on the router. Find the section called Port Forwarding, Virtual Server or NAT, and add a rule.

  • External and internal port: 25565
  • Protocol: TCP for Java Edition (for Bedrock or Geyser, forward the Geyser port, default 19132, over both TCP and UDP)
  • Destination: the local IP you reserved in step 1
  • Save, and restart the router if it asks you to

Step 3: allow Java through the firewall

Windows Defender Firewall usually asks the first time the server starts; allow access on private networks. If you missed that prompt, add an inbound rule for TCP port 25565 in Windows Defender Firewall with Advanced Security. Third-party antivirus suites sometimes have their own firewall that needs the same rule.

Step 4: test it from outside

Start the server and ask a friend on a different network to connect to your public IP, or use an online port checker while the server is running. Testing from inside your own network with the public IP can fail even when everything is right, because many routers do not support connecting to themselves that way.

When port forwarding cannot work

If the WAN address shown in your router does not match the public IP that websites report, your provider uses carrier-grade NAT. Your connection shares a public address with other customers, and forwarding on your router cannot help. Some providers will give you a public IP on request; otherwise you need a tunnel service or a hosted server.

Also consider what you are exposing. Port forwarding publishes your home IP address to everyone who joins, and the server only runs while your PC is on. A hosted server such as StormNodes needs no forwarding at all, keeps your home IP private and stays online when your computer is off.

StormNodes Minecraft hosting

Run it on a StormNodes server

Skip the port forwarding and the PC that has to stay on. A StormNodes Minecraft server is online in minutes, and everything in this guide can be done from the panel.

  • Hosted in Portugal, close to players across Western Europe
  • NVMe storage, monthly billing and no setup fee
  • Paper, Purpur, Fabric and vanilla, switchable from the panel
  • Live console, file manager, SFTP, backups and schedules
  • Support in English and Portuguese

FAQ

Frequently asked questions

Is port forwarding for Minecraft safe?
Forwarding a single port to a server that is kept up to date is a reasonable risk, but it does reveal your home IP address to every player. Keep online-mode enabled, use a whitelist for private servers, and only install plugins from trusted sources.
Can I host a Minecraft server without port forwarding?
Yes, by renting a hosted server, which already has a public address, or by using a tunnelling service. For Bedrock friends on the same network, LAN play also works without any forwarding.
Which protocol do I forward for Minecraft Java?
TCP on port 25565, or whichever port you set in server-port. For Bedrock or Geyser, forward the Geyser port (default 19132) over both TCP and UDP.