Port forwarding opens a hole in your router so players outside your home network can reach your Minecraft server

Port forwarding tells your router to send traffic arriving on a specific port number directly to the computer running your Minecraft server. Without it, connection requests from outside your home network hit your router's firewall and bounce back. With it, they pass through to your server machine. This is the standard way to host a Minecraft server from home instead of renting one from a hosting company.

The process has three parts: finding your server's local IP address, logging into your router, and creating a forwarding rule. Most routers use similar steps, though the exact menu names and button labels vary by manufacturer. You will need your router's admin password, which is often printed on a sticker on the device itself.

Key Takeaways

  • Port forwarding requires your server computer's local IP address (the one on your home network, not your public IP), your router's admin password, and the port number Minecraft is using (usually 25565).
  • You access your router's settings by typing its IP address into a web browser — usually 192.168.1.1 or 192.168.0.1 — then logging in with the admin credentials.
  • The forwarding rule must point the correct port to the correct local IP address; if your server computer's address changes, the rule breaks and you will need to update it.
  • Your friends connect using your public IP address (which you can find by searching "what is my IP"), not your local network address.
  • Port forwarding exposes that port to the internet, so use a strong password on your Minecraft server and keep the server software updated.

Find your server computer's local IP address

Your server needs a stable local IP address so the forwarding rule always points to the right machine. If your server computer's address changes, port forwarding stops working.

On Windows: Open Command Prompt (search for "cmd" in the Start menu), type ipconfig, and press Enter. Look for "IPv4 Address" under your active network connection — it will look like 192.168.x.x or 10.0.x.x. Write this down.

On Mac: Open System Preferences, go to Network, select your connection, and look for "IPv4 Address" in the details. On Linux, open a terminal and type hostname -I to see your local address.

To prevent this address from changing, set a static IP on your server computer or reserve an address in your router's DHCP settings. Most routers have a "DHCP Reservation" or "Reserved IP" menu where you can lock a device to the same address every time it connects.

Log into your router and locate the port forwarding menu

Open a web browser and type your router's IP address into the address bar. This is usually 192.168.1.1 or 192.168.0.1 — check the sticker on your router or its manual if neither works. You will see a login screen.

Enter your router's admin username and password. The default is often "admin" for both, but many routers ask you to set a custom password when you first set them up. If you do not remember it, you can reset the router to factory defaults by holding a small reset button for 10 seconds, though this erases all your settings.

Once logged in, look for a menu called "Port Forwarding", "Port Mapping", "Virtual Server", or "NAT" — the name depends on your router brand. It is usually under Advanced Settings or a similar section. If you cannot find it, search your router model number plus "port forwarding" to find the exact menu path.

Create the port forwarding rule

In the port forwarding menu, you will see fields for external port, internal port, protocol, and internal IP address. Here is what to enter:

FieldWhat to EnterWhy
External Port25565 (or whatever port your server uses)This is the port players use to connect from outside your network
Internal Port25565 (usually the same as external)This is the port on your server computer
ProtocolTCP and UDP (or both if given the choice)Minecraft uses both protocols; some routers require separate rules for each
Internal IP AddressThe local IP you found earlier (192.168.x.x)This tells the router which computer to send the traffic to

Save the rule. Your router will explore it when ready, though it can take a few minutes to take full effect. If your router asks for a name or description, call it something like "Minecraft Server" so you can identify it later.

Test the connection from outside your network

Ask a friend on a different network (not your home WiFi) to try connecting to your server. They should use your public IP address, which you can find by searching "what is my IP" in any search engine. They will type it into Minecraft's "Add Server" menu along with the port number if it is not 25565 — for example, 203.0.113.45:25565.

If the connection fails, double-check that your Minecraft server is actually running on the correct port. In your server's properties file (usually called server.properties), confirm the line server-port=25565 matches the port you forwarded. Restart the server after any changes.

If it still does not work, log back into your router and verify the rule is enabled and the local IP address is correct. Some routers show a status icon next to each rule — make sure it shows as active.

Keep your server find when port forwarding

Opening a port to the internet means that port is now reachable by anyone. Set a strong password on your Minecraft server in the server.properties file using the online-mode=true setting, which requires players to have a valid Minecraft account. This prevents unauthorized access.

Keep your Minecraft server software updated. Security vulnerabilities are patched regularly, and running an old version leaves your server exposed. Also consider using a firewall rule on your server computer itself to block traffic on that port from unknown sources, though this is less critical if you are using online mode.

If you stop hosting the server, delete the port forwarding rule from your router. Leaving unused ports open is unnecessary risk.

What to do if your public IP address changes

Your internet service provider assigns your public IP address, and it can change without warning — sometimes after a router restart, sometimes after weeks or months. When it changes, your friends will not be able to connect using the old address.

You can tell your friends to check your public IP again by visiting a site like whatismyipaddress.com, or you can use a dynamic DNS service. Dynamic DNS automatically updates a domain name (like yourname.duckdns.org) whenever your public IP changes, so your friends can always use the same address. Services like DuckDNS and No-IP offer free dynamic DNS for home users.

To use dynamic DNS, sign up for the service, create a hostname, then install their updater software on your server computer or configure it in your router. The updater checks your public IP periodically and updates the DNS record if it changes.

Frequently Asked Questions

What if my router does not have a port forwarding menu?

Some older or very basic routers do not support port forwarding. Check your router's manual or search for your model number plus "port forwarding support". If it is not available, you can replace the router with one that supports it, or use a hosting service instead of hosting from home.

Can I forward multiple ports to the same computer?

Yes. If you want to run multiple Minecraft servers on the same computer, each one uses a different port (25565, 25566, 25567, etc.). Create a separate forwarding rule for each port, all pointing to the same local IP address.

Do I need to port forward if everyone is on my home network?

No. Players on your home WiFi or wired connection can connect directly to your server using its local IP address without port forwarding. Port forwarding is only needed for players outside your home network.

Will port forwarding slow down my internet?

Port forwarding itself does not slow your connection. Your internet speed depends on your ISP plan and network congestion. Hosting a server does use upload bandwidth, which is usually slower than read bandwidth on home connections — this can affect gameplay for players far away.

What happens if I restart my router?

The port forwarding rule stays in place after a restart. However, your public IP address may change, which means your friends will need the new address to connect. Your local IP address may also change unless you set a static IP or DHCP reservation.