Join the AFK Minecraft Discord

Get unstuck, swap server tips, and hear what's new. Still a small crew, so your voice actually counts.

How Auto-Reconnect Works After a Restart

What a hosted Minecraft AFK bot does when a server restarts or the connection drops, and how post-spawn commands, Server Login and auto-rejoin put it back.

3 min readUpdated

Servers restart, connections drop, and networks shuffle players between backends. This guide explains what the bot does in each case, and how to make sure it ends up back where you want it.

What happens when the connection drops

  1. The status changes from Online to Reconnecting.
  2. The bot retries on its own.
  3. When it gets back in, the status returns to Online and your post-spawn commands run again.

This is controlled by Auto-Reconnect in the bot's Config page. It is on by default. Leave it on unless you want a drop to end the session.

If we restart our own servers for maintenance, bots that were online are started again automatically.

Run commands after every join

Reconnecting gets the bot onto the server. On many servers that is not the same as being back in place: you may need to log in, pick a game mode, or teleport home.

Post-Spawn Actions, on the bot's Plugins page, is a list of commands sent right after the bot joins.

  • Up to 20 commands, one per line
  • They are sent in order, about a second apart
  • They run on every join, including reconnects

A typical list:

/server survival
/home farm

Servers with a login dialog

Some servers ask for a password in a pop-up window before you spawn. Save it in the Server Login plugin on the bot's Plugins page and the bot answers the window for you. If the server asks for /login or /register in chat instead, the same plugin sends that command. A new account on a chat-login server has to be registered once by you with /register.

When the network sends you to a lobby

On networks made of several servers, a backend restart does not disconnect you. It moves you to a hub. The connection never dropped, so auto-reconnect has nothing to do.

Auto-Rejoin handles that. It watches chat for lobby messages and then sends your rejoin commands.

  • Rejoin Commands. What to send, for example /server survival.
  • Delay Between Attempts and Max Attempts. How patiently to retry while the backend is still starting.
  • Detection Patterns. Extra phrases to watch for. The built-in ones already cover common messages such as "sent to lobby" and "server is restarting".

What reconnecting cannot fix

Reason shownWhyWhat to do
Auth requiredThe Microsoft sign-in expiredRe-link the account
Version errorThe server is not on Minecraft 26.2Wait for the server, or pick another
Server unreachableWrong address, or the server is downCheck host and port
Server fullNo free slotStart again later
Daily limitFree AFK time is used upWait for midnight UTC, or see Plans
Stopped after failed reconnectsA free account could not get back online for 5 minutesStart the bot again when the server is back
Stopped after repeated disconnectsA free account kept joining and getting kicked for 5 minutesSet your login in the Server Login plugin, then start again

The reason for every disconnect is on the bot's Activity page. On paid plans, auto-reconnect keeps retrying with no time limit. See Plans.

Next

Try it on your server

The Free plan needs no card and nothing to download.

Start free