Direct answer

If localhost works, the Minecraft server process is running. If another device on the same LAN can also join, stop reinstalling Java or the server JAR and troubleshoot the path from the internet to the server: public IP, port forwarding, firewall, double NAT, or CGNAT.

Lock the server machine to a stable LAN address

Your router’s forwarding rule must point to the server machine. Use a DHCP reservation or another appropriate method so the server does not move from, for example, 192.168.1.50 to 192.168.1.73 after a reboot.

Forward the actual Minecraft port

The default Java Edition port is 25565, but server-port can be changed. The router’s destination port must match the port the server is actually listening on. Use TCP for normal Java server connections.

Check for double NAT or CGNAT

If your router’s WAN/Internet address is private or does not match the public address reported by the internet, you may be behind another NAT layer or CGNAT. Normal port forwarding on your own router cannot make a CGNAT address publicly reachable; you need a public/static address from the ISP, a suitable tunnel/VPN solution, or external hosting.

Test from outside your home network

Use a friend’s connection or a phone hotspot. Some routers cannot connect back to their own public IP from inside the LAN, so an internal public-IP test can fail even when external access works.

Prove which network boundary is failing
  1. localhost confirms only that the service works on the same computer. First test the LAN IPv4 address from a second device.
  2. If LAN works, test from a genuinely external connection while checking the router port-forward target and host firewall. Java Edition generally uses TCP on its configured server-port.
  3. If the router WAN address belongs to CGNAT, ordinary home port forwarding cannot provide a reachable public IPv4 endpoint; consider a public IP or trusted tunnel.

Official references

These references were checked while preparing this fix. Version-specific behavior can change, so use the project documentation for your exact release when a detail differs.

Was this article helpful?
Help us improve this article

Tell us what is missing, unclear, outdated, or incorrect. You can also suggest something we should add.

What could we improve?
Do not include passwords, server IPs, or other private information.0 / 1000