Minecraft Java help guide · Updated 2026-10-17

Friends can't join your Minecraft server? Here's the fix.

Minecraft Java friends getting 'Connection timed out' or 'Connection refused'? Forward TCP 25565, allow Java through the firewall, check CGNAT and versions.

Quick answer

Minecraft Java Edition uses TCP port 25565. When friends outside your home can't join, the cause is almost always one of these: the port isn't forwarded (or points at the wrong PC), the firewall is blocking Java, your internet provider uses CGNAT so forwarding can't work, server-ip is filled in in server.properties, friends typed the wrong address, or the game versions don't match.

Ports

  • 25565 TCP: Game port (server-port in server.properties)
  • 19132 UDP: Only if you run Geyser so Bedrock players can join

How to fix it, step by step

  1. Make sure the server has finished starting. Wait for Done (x.xxxs)! For help, type "help" in the console. The server won't start at all without eula=true in eula.txt.
  2. Test in the right order. Join localhost on the server PC, then the server's LAN IP (for example 192.168.1.50) from another device at home, then the public IP from a phone on mobile data. Joining your own public IP from inside your home often fails even when everything works, because many routers don't support hairpin NAT (NAT loopback).
  3. Leave server-ip blank. In server.properties, server-ip= should be empty. A value there makes the server listen only on that address, which causes "Failed to bind" or "Connection refused".
  4. Forward TCP 25565 to a reserved local IP. Reserve the server PC's local IP in your router (DHCP reservation), then forward TCP 25565 to it. If you changed server-port, forward that port instead and have friends type IP:port.
  5. Allow Java through the firewall. Allow java.exe / javaw.exe ("OpenJDK Platform binary") in Windows Firewall on both Private and Public networks.
  6. Check for CGNAT. Compare the WAN/Internet IP on your router's status page with the IP a "what is my IP" site shows. If they differ, or the WAN IP starts with 100.64 to 100.127, port forwarding can't work. See the CGNAT guide.
  7. Share the public IP and match versions. Friends join with your public IP (plus :port if it isn't 25565). Client and server must be on the same Minecraft version. ViaVersion/ViaBackwards (Paper/Spigot only) let other versions join; modded servers need the same loader and mods on both sides.

What the error message means

  • Connection timed out: no further information: traffic is being dropped. No port forward, a firewall, a wrong address or CGNAT.
  • Connection refused: nothing is listening. The server is off or still loading, the port is wrong, server-ip is set, or the forward points at the wrong PC.
  • java.net.UnknownHostException: the domain doesn't resolve. Check the spelling, the DNS record, and wait for DNS to update. A custom port on a domain needs an SRV record (_minecraft._tcp.<name>).
  • You are not white-listed on this server!: run whitelist add <name> in the console, or turn the whitelist off.
  • Outdated server! / Outdated client!: versions don't match. Pick the server's version in the launcher, or update the server (back up first).
  • Failed to verify username! / Invalid session: restart the launcher and log out and back in. Behind Velocity/BungeeCord, set the backend server to online-mode=false.
  • FAILED TO BIND TO PORT (in the server console): another copy of the server is already running, or server-ip isn't an address on this machine.

Bedrock players on a Java server

Bedrock players can join a Java server through GeyserMC. Forward Geyser's port as UDP (19132 by default). Bedrock players enter the Java server's IP and the Geyser port in the separate port field; Bedrock can't read SRV records. Realms can't do Java and Bedrock crossplay.

Modded servers

Everyone needs the same Minecraft version, the same loader (Fabric, Forge or NeoForge) and the same required mods. Client-only mods (Sodium, Iris, OptiFine, minimaps, shaders) crash the server and must be removed from it.

Test it from the outside

Your own Wi-Fi can't tell you whether friends can reach the server. The free Server Doctor check contacts your server once from the internet, the way the game does, and tells you the most likely cause. The same check runs in Discord with /fix.

No PC to host 24/7?

Your PC has to stay on whenever friends want to play, and behind CGNAT port forwarding can't work at all. A hosted server avoids both: Aternos is free (with queues and auto-stop), and paid Minecraft hosts give you an address that works without touching your router.

Related guides

Sources: hythost.com/guides/minecraft-server-port-forwarding · coalstack.net/docs/errors · tarohosting.com/en/blog/minecraft-server-connection-errors-explained · geysermc.org/wiki/geyser/fixing-unable-to-connect-to-world/ · playit.gg/ · minecraft.wiki/w/Tutorial:Setting_up_a_Bedrock_Edition_server

FAQ

Minecraft Java questions, answered

What port does a Minecraft Java server use?

TCP 25565 by default. It's set by server-port in server.properties. If you change it, forward the new port and have friends type IP:port.

Do I forward TCP or UDP for Minecraft Java?

TCP. The only UDP port is 19132, and only if you run Geyser for Bedrock players.

Why can I join my Minecraft server but my friends can't?

You're joining over your home network, so the router and internet path aren't involved. For friends, check the port forward (TCP 25565 to the right local IP), the firewall, and CGNAT, and test from mobile data rather than your own Wi-Fi.

Can I host a Minecraft server without port forwarding?

Yes. playit.gg tunnels Minecraft Java on its free tier, VPN overlays (Tailscale, ZeroTier, Radmin VPN, Hamachi) work if every player installs them, or use Aternos, Realms or a paid host.

Why do friends get "Connection timed out"?

Their connection never reaches the server: the port isn't forwarded, the firewall blocks Java, they have the wrong address, or you're behind CGNAT. Run a check from outside to see which.

Server Doctor logo

Still stuck? Test it from the outside.

Enter the address your friends type. Server Doctor checks it from the internet and explains what's wrong. Free, no login.

Some hosting recommendations may use affiliate links, always disclosed. Learn more