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

bash
ps aux | grep java

Step 2

Check the server logs — if you can see 'Done', the server is ready

bash
tail -20 logs/latest.log

Step 3

Make sure the Minecraft port (25565 by default) is open in the firewall

bash
sudo ufw allow 25565/tcp && sudo ufw status

Step 4

Check the server-port and server-ip settings in server.properties — server-ip should be left empty

bash
grep -E 'server-port|server-ip' server.properties

Step 5

Make sure you are entering the right IP and port when you connect in game — verify your VPS IP

bash
curl -s ifconfig.me