It is the most common Minecraft server problem: it works for you, but your friends get "Can't connect". Almost always it is the address you gave them, a closed port, or a version or whitelist mismatch. Here is every cause, in the order to check them.
Quick answer
Most of the time it is one of three things: your friends are using a local address (192.168.x.x or 127.0.0.1) instead of your public IP or domain, TCP port 25565 is not forwarded on your router (or your ISP uses CGNAT), or they are on a different Minecraft version or edition. Fix those first, then check the firewall, the whitelist and online-mode.
If the server works on your own PC but not for friends, the problem is how outside players reach it: the IP, the port or the firewall. A hosted Minecraft server skips all of this — you just share the address from your panel.
First: are you sharing the right address?
You must give friends your public IP and port — not the 127.0.0.1 or 192.168.x.x address you see locally. Find your public IP by searching "what is my IP". If the server uses a non-default port, they must type it as IP:PORT. On a hosted server, use the exact address and port shown in your panel.
Cause 1: the port is not forwarded (home servers)
If you run the server on your own PC, your router blocks incoming connections by default — you have to port forward Minecraft's port to your PC:
- Forward TCP port 25565 (or your custom port) to your PC's local IP.
- Some ISPs use CGNAT, which makes port forwarding impossible — a hosted server or a tunnel is then the only option.
- This is the single most common reason friends cannot join a home server.
Hosted servers already have the port open, so there is nothing to forward.
Cause 2: a firewall is blocking it
Windows Firewall or your antivirus can stop Java from accepting connections. Allow Java through the firewall, or on Linux open the port (for example with UFW).
Cause 3: version mismatch
A 1.21 client cannot join a 1.20 server. Everyone must run the same Minecraft version as the server. This shows as "Outdated client" or "Outdated server" — see that fix.
Cause 4: online-mode / account mismatch
By default a server is in online-mode and only allows genuine, logged-in accounts. A friend on a cracked/offline client is rejected. Keep online-mode on for security; if you deliberately run a cracked server, everyone must use offline mode. Related: failed to verify username.
Cause 5: the whitelist is on
If the whitelist is enabled, only listed players can join and everyone else is kicked. Add your friends with /whitelist add Name or turn it off — see how to whitelist a server.
Cause 6: Java vs Bedrock
Java and Bedrock players cannot join each other by default. A Bedrock player cannot connect to a Java server unless you run a bridge like Geyser and Floodgate. Make sure everyone is on the same edition.
Can't join a friend's Minecraft server?
If you are the one trying to join, start on your side of the connection before asking your friend to change anything:
- The right address and port. Ask for the public IP or domain, not a
192.168.x.xaddress, and type it exactly — asaddress:portif the port is not 25565. In Java Edition, try Multiplayer → Direct Connection to rule out an old saved entry. - The same version and edition. Launch the exact version the server runs (choose it in the launcher's Installations). A Java client cannot join a Bedrock server, and a Bedrock player cannot join a Java server unless it runs Geyser.
- A signed-in account. A server in online-mode only accepts genuine, logged-in accounts. If you see "Failed to login: Invalid session", restart the launcher and sign in again.
- The whitelist. If you are kicked with a message saying you are not whitelisted, your friend has to add you with
/whitelist add YourName. - Your own network. School, work and some public networks block game ports, and so can a VPN. Try another connection, such as a phone hotspot.
"Connection timed out" means your game never reached the server: the address is wrong, or your friend has not forwarded the port or opened the firewall — that part is on their side (Causes 1 and 2 above). "Connection refused" usually means the machine answered but no server is listening on that port, because it is offline or the port is wrong. See the fixes for timed out and connection refused.
The quick checklist
- You gave them the right public IP and port.
- The port is forwarded (or the server is hosted).
- The firewall allows Java.
- Everyone is on the same version.
- Online-mode matches everyone's account type.
- The whitelist is off, or your friend is added.
- Everyone is on the same edition (Java or Bedrock).
Nine times out of ten it is the IP, the port or the version. A hosted server removes the first two entirely — you just hand out the address.
Minecraft is a trademark of Mojang Synergies AB / Microsoft. ESAGAMES is an independent hosting provider, not affiliated with or endorsed by Mojang or Microsoft.