Symptoms: Connection timed out, Can't reach server, Connection refused
Possible Causes
- The firewall port is closed
- The server process isn't running
- Wrong IP address or port number
- The server-port setting in server.properties is wrong
- The server hasn't finished starting yet (still loading)
Step-by-Step Fix
Step 1
Check whether the server process is running — look in the panel if you use one, or in the process list if you are connected over SSH
ps aux | grep javaStep 2
Check the server logs — if you can see 'Done', the server is ready
tail -20 logs/latest.logStep 3
Make sure the Minecraft port (25565 by default) is open in the firewall
sudo ufw allow 25565/tcp && sudo ufw statusStep 4
Check the server-port and server-ip settings in server.properties — server-ip should be left empty
grep -E 'server-port|server-ip' server.propertiesStep 5
Make sure you are entering the right IP and port when you connect in game — verify your VPS IP
curl -s ifconfig.me