Skip to content
Back to Guides
8 min read

Scheduled Server Restarts

Keep your Minecraft server fast with automatic, scheduled restarts.

By Lodgichost Team · Last updated: August 19, 2026

A Minecraft server that stays up for weeks gradually gets slower. The Java heap fragments, garbage collection takes longer, chunks stay resident in memory after players leave, and plugins leak memory with every repeated action — the classic symptom is a server that ran fine on day one and stutters by week three. The standard fix is not more RAM, it is a regular restart. A planned restart every 6 to 24 hours, timed for a quiet community, restores full tick speed within seconds. This guide covers why restarts matter, how to schedule them in the Lodgichost panel, how to announce them safely, and the ordering that never corrupts a world.

Why Restarts Matter

Java servers accumulate memory even when nobody is playing. Loaded chunks, entity caches, plugin maps and network buffers pile up, and garbage collection eventually spends more time cleaning than ticking. Chunk retention is the biggest factor on long-running worlds — chunks stay resident after unloading, so the footprint grows with the explored map. Plugin leaks make it worse: a plugin that forgets to clear its maps grows until ticks stutter. A restart resets all of this — after it, TPS holds at 20 where it was dropping before.

  • Heap fragmentation and GC pressure build up over days.
  • Chunks stay resident in memory after players leave the area.
  • Plugin leaks grow with every repeated player action.
  • A restart flushes this state and restores full 20 TPS within seconds.

Choosing the Interval

Most communities pick a daily or twice-daily restart. The right interval depends on how long your server survives: if TPS drops after 18 hours, schedule at 12 hours to leave margin. Restart when the community is quiet — mid-morning for a school-age server, very early morning for an evening community. Announce the schedule so players log out in advance; nobody wants a forced disconnect mid-build. Heavy automation such as farms causes a brief TPS spike right after restart while systems re-check, so keep the restart in off-peak hours.

Configuring the Schedule

In the Lodgichost panel you can set an automatic restart schedule without touching the server. Find the restart scheduling section, pick the interval and time of day in UTC, and enable the restart warning. The panel stops the server gracefully, waits, and starts it again — like /stop followed by a start. On your own infrastructure the equivalent is a cron job or systemd timer that sends /stop then starts the server, plus a watchdog for crashes. A graceful stop matters: /stop flushes chunks and saves the world, where a hard kill can corrupt chunks.

55 3,15 * * * screen -S mcserver -X stuff "say Server restarting in 5 minutes^M"
59 3,15 * * * screen -S mcserver -X stuff "say Server restarting in 1 minute^M"
0 4,16 * * * screen -S mcserver -X stuff "stop^M"

Announcing and Warning Players

A restart with no warning turns into angry players. The cleanest pattern is a broadcast at 5 minutes and again at 1 minute before the restart, plus the schedule published where players read it. Some panels show a countdown; in-game announcements via a broadcast plugin or /say are the universal fallback. For whole-server restarts, consider ejecting players at the 1-minute mark so nobody is mid-action. Combine with a Discord or forum post listing times and timezone, and your community simply plans around it.

  • Warn at 5 minutes and at 1 minute before the restart.
  • Publish restart times and timezone on Discord or your forum.
  • Use a broadcast plugin or /say to announce in-game.
  • Eject players at the 1-minute mark if the panel supports forced logoff.

The Safe Restart Procedure

Order matters. The safe sequence is announce, warn, save, stop, start. Vanilla auto-saves every 5 seconds, so normal restarts lose almost nothing, but /save-all before /stop removes even that risk — it flushes all worlds to disk immediately and replies Saved the game. Then issue /stop and wait for the process to exit before starting again. Never kill the process while the world is still being written; if the panel shows the server stuck during shutdown, give it time instead of force-stopping. A clean shutdown also writes its final lines to the log for later diagnosis.

[10:58:00] [Server thread/INFO]: [Admin] issued server command: /save-all
[10:58:00] [Server thread/INFO]: Saved the game
[10:58:01] [Server thread/INFO]: [Admin] issued server command: /stop
[10:58:03] [Server thread/INFO]: Saving chunks for level 'world'
[10:58:04] [Server thread/INFO]: ThreadedAnvilChunkStorage: All dimensions are saved
[10:58:04] [Server thread/INFO]: Stopping server

Troubleshooting

  • Players get disconnected mid-session: the warning never reached them. Enable the 5-minute and 1-minute broadcasts and publish the schedule where players read it.
  • Server feels slower right after restart: first-boot chunk loading and plugin initialisation spike CPU and disk. This settles within minutes, so schedule the restart so the spike lands in quiet hours.
  • The restart never happened: check that the panel schedule is saved, the server is not stuck stopping, and the times are in UTC. A server that hangs on shutdown can skip the scheduled start.
  • World corrupted after a restart: almost always a hard kill. Use /save-all before /stop, wait for the process to exit, and confirm the shutdown finished before starting again.

FAQ

How often should I restart my server?

Usually every 6 to 24 hours. Pick the shortest interval that does not disturb your community, and shorten it if you see TPS drops before the scheduled time.

Will a restart delete anything?

No. A restart only closes and reopens the server process; worlds, plugins and configs are untouched. Just make sure the server reached a clean stop so nothing is half-written.

What is the difference between /stop and killing the process?

/stop saves the world, flushes buffers and shuts down cleanly. Killing the process skips that and can leave chunks unsaved or corrupted. Always stop gracefully.

Do restarts help with lag?

Yes, for lag that creeps up over time — memory leaks, chunk retention and GC pressure. They do not fix a redstone machine or a plugin bug; those need different fixes.

Can restarts happen during an event?

They can, but it is risky. Pause or reschedule the automatic restart around planned events, or at least announce the time so players can log out first.

Related Guides

This site uses cookies to improve your experience. Learn more.