How to Set Up Automatic Minecraft Server Restarts (and Why You Should)
If your server feels snappy in the morning but laggy by night, a scheduled restart usually fixes it. Minecraft servers slowly leak memory and accumulate loaded chunks over hours of play, and a clean daily restart wipes that slate. This guide covers why restarts help, how to schedule them automatically, and how to warn players so nobody gets yanked mid-build.
/say Server restarting in 5 minutes. A restart clears memory leaks and stale chunks, so TPS and memory stay healthy - no plugins needed.Why daily restarts help
A long-running Minecraft server gradually gets slower for a few reasons:
- Memory creep. The Java garbage collector can't always reclaim everything. Over many hours, RAM usage climbs and pauses get longer, which shows up as lag spikes.
- Loaded chunks pile up. Chunks that were loaded during play don't always fully unload, so the server holds more in memory than it needs.
- Plugin and mod state. Some plugins accumulate tasks, cached data, or entities that a restart clears out.
A restart resets all of it. The server comes back fresh with low memory use and full TPS. For most servers, once every 24 hours is plenty. A busy modded server with heavy packs might benefit from every 12 hours.
Don't over-do it - restarting every hour just annoys players and gains nothing. Start with once daily and only add more if you actually see performance degrade before the next restart.
Restart vs reboot - what's the difference?
- Restart means stopping and starting the Minecraft server process (the Java jar). The machine keeps running; only your server software cycles. This is what you want on a schedule, and it takes seconds to a minute or two.
- Reboot means restarting the whole physical or virtual machine (the operating system). You rarely need this, and on a managed host you never do it yourself.
When people say "auto-restart" they almost always mean the first one. That's what the scheduler below does.
Step 1 - Open the scheduler
On FreaksMC, the panel has a built-in scheduler, so you don't touch cron or a command line. Open your server, go to Settings, then Schedules, and click New schedule.
You'll set:
- Name - something like
Daily restart. - What should happen - pick Restart the server.
- How often - every day, once a week, or every few hours.
- Time - in US Eastern time.
For a daily 5 AM restart, pick Every day and set the time to 5:00 AM.
On a host that runs the stock Pterodactyl panel, the same thing lives in the Schedules tab and the time is set with cron fields (minute, hour, day, month, day-of-week). A daily 5 AM restart there is:
minute: 0
hour: 5
day-of-month: *
month: *
day-of-week: *
Pick an off-peak hour when few players are on. Early morning in your main player timezone is ideal.
Step 2 - Add the warning task
Nobody likes being disconnected mid-fight, so warn players first. On FreaksMC, tick Warn players 5 minutes before on the schedule. The panel posts the heads-up in chat at the time you set and restarts 5 minutes later.
On a stock Pterodactyl panel you build the warning yourself. Inside your schedule, create a task before the restart:
- Task 1 - Send command:
say Server is restarting in 60 seconds. Get to a safe spot! - Task 2 - Wait: set a delay (for example 60 seconds) before the next task runs.
- Task 3 - Power action: choose Restart.
The tasks chain with time offsets, so the warning fires, players get a heads-up, then the restart happens. You can add multiple warnings (5 minutes, 1 minute, 10 seconds) if you like.
Step 3 - Save and test
Save the schedule. Most panels, ours included, let you Run now to test it once without waiting for the scheduled time. Do that and watch the live console: you should see the warning message, the wait, then the server cleanly stop and start back up.
Tips for a smooth auto-restart
- Restart during off-peak hours. 4-6 AM in your player base's timezone hits the fewest people.
- Give real warning. At least 60 seconds, ideally a couple of minutes for bigger communities.
- Pair it with a backup. Schedule a daily backup shortly before or after the restart so you always have a recent save. On FreaksMC, backups are built in and can be scheduled the same way.
- Watch the first few cycles. Confirm the server actually comes back up. A crashed startup that doesn't recover is worse than no restart, so verify it works before you rely on it.
- Don't stack it with startup-heavy tasks. If you pre-generate chunks or run world tasks, don't let them overlap the restart window.
What about crashes?
A scheduled restart is for healthy maintenance. For a server that crashes unexpectedly, you want auto-recovery instead - the host detecting the process died and starting it again. FreaksMC handles that automatically so a crash at 3 AM doesn't leave you offline until morning. The scheduler is for planned restarts; crash recovery is separate and always on.
Quick recap
- Create a schedule in the panel.
- Set it for a daily off-peak time.
- Add a warning command, a short wait, then the Restart action.
- Test with Run now and watch the console.
- Pair it with a scheduled backup.
FreaksMC gives you a built-in scheduler, backup slots, and automatic crash recovery on every plan, so your server stays fast and online without you babysitting it. See plans from $3/mo - backed by a 24-hour money-back guarantee.
Want a server that just runs fast?
FreaksMC runs on NVMe hardware with performance-tuned defaults baked in - pre-optimized Paper, sane view distances, and one-click world pre-generation. Set up in 60 seconds.
See plans from $3/mo