The simplest way to auto-restart a Minecraft server is to schedule a clean stop followed by a start. On a managed hosting panel, open Schedules or Tasks, add a daily power action set to Restart the server, and send players a warning first. On a self-managed Linux machine, use a Bash script that announces the restart, issues the console stop command, waits for the server process to exit, and launches it again; run that script from cron.
Prefer not to run the server on your own PC? Godlike.Host offers hosted Minecraft Java servers with free DDoS protection and up to three free backups a day.
This approach works for both Java and Bedrock, but the launch command differs. A clean stop is essential because it saves the world before disconnecting players. Test the restart manually before enabling a recurring schedule.
| # | Preview | Product | Price | |
|---|---|---|---|---|
| 1 |
|
Minecraft | Java & Bedrock Deluxe Collection | Windows Digital Code | $39.99 | Buy on Amazon |
| 2 |
|
Minecraft | Java & Bedrock Ultimate Collection | Windows Digital Code | $49.99 | Buy on Amazon |
| 3 |
|
Minecraft | Standard Edition | XBOX Digital Code | $19.99 | Buy on Amazon |
| 4 |
|
Minecraft | $6.99 | Buy on Amazon |
| 5 |
|
Minecraft - Bedrock Edition PS4 | $42.98 | Buy on Amazon |
As an Amazon Associate I earn from qualifying purchases.
Choose the right automatic-restart method
Your setup determines the safest method. A hosting panel is quickest when your provider exposes scheduled tasks. Cron plus a script gives you more control on a Linux VPS or a machine you administer yourself.
| Method | Best for | Setup effort | Control | What you must supply |
|---|---|---|---|---|
| Hosting-panel schedule | Servers managed through a web control panel | Low | Usually limited to panel actions and delays | A schedule, a warning command, and a restart power action |
| Linux script plus cron | Self-managed Java or Bedrock servers | Moderate | Exact warning text, delay, logging, checks, and launch flags | A tested script, executable permissions, full paths, and a cron entry |
| Service manager | Administrators already running the server as a system service | Moderate to high | Process supervision and automatic recovery | A correctly configured service and a controlled restart command |
Do not schedule a hard process kill as your normal restart. Killing Java or Bedrock can interrupt world saves and leave files in an unsafe state. The routine should always be announce, stop cleanly, confirm exit, then start.
#1 Best Overall
- DELUXE COLLECTION — Includes Minecraft: Java & Bedrock Edition, three Bedrock add-ons, three exclusive Character Creator items, and 700 Minecoins.
- CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
- EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
- SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
- PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).
Why a clean stop matters
The dedicated server keeps world changes in memory and writes them to disk during normal operation and shutdown. The console stop command saves changes, shuts down the server, and disconnects players. The Minecraft Wiki documents /stop as a permission-level-4 command on Java servers.
Bedrock has an important distinction: Microsoft’s Bedrock command reference describes /stop as dedicated-server-only and associates it with the Owner permission level and enabled cheats. Treat those requirements as version-sensitive and verify them against the Bedrock documentation for your release. If the command is rejected, use the server console rather than assuming an in-game command will work.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallSchedule an automatic restart in a hosting panel
Panel names vary, but the workflow is consistent. Look for Schedules, Scheduled Tasks, or Tasks in the server controls.
1. Create the recurring schedule
- Open the Minecraft server in your hosting dashboard.
- Open Schedules or Tasks and choose Create schedule or the equivalent button.
- Choose a recurrence. For a daily restart at 4:00 a.m., use minute
0, hour4, and*for day-of-month, month, and day-of-week when the panel exposes cron-style fields:0 4 * * *. - Confirm the panel’s timezone. A 4:00 a.m. schedule may use the host’s timezone rather than your local timezone. If the panel displays UTC, convert the desired local time before saving.
- Save the schedule and check its next-run timestamp.
2. Add a player warning before the restart
Add a console or command action that broadcasts a message such as say Server restarting in 60 seconds. Please log out safely. Set the action to run before the power action and add a delay of about 60 seconds. Some panels call this a command, console command, or send command task.
3. Add the restart power action
Add a second action whose power operation is Restart the server. Do not select Stop unless you also add a later start action. A restart action normally performs the stop-and-start sequence for you.
Rank #2
- ULTIMATE COLLECTION — Includes Minecraft: Java & Bedrock Edition, five Bedrock add-ons, five exclusive Character Creator items, and 1000 Minecoins.
- CREATE YOUR WORLD — Build whatever you imagine in an infinite world that’s unique in every playthrough.
- EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world filled with surprises.
- SURVIVE THE ADVENTURE — Face mysterious foes, travel across exciting landscapes, and venture into perilous dimensions.
- PLAY TOGETHER — Play cross-platform with friends in Bedrock Edition on console, mobile, and PC, or join community servers in Java Edition on PC, Mac, and Linux. Online console multiplayer requires a platform-specific subscription (sold separately).
4. Save and observe the first run
Keep the panel’s console and server log open when the schedule runs for the first time. Confirm that the warning appears, players are disconnected, the process stops without errors, and a new process starts. If the panel reports success but the server remains offline, inspect whether the start command, Java version, memory setting, or working directory changed.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Build a restart script on a self-managed Linux server
Use this method when you control the machine over SSH or through a terminal. The examples assume the server runs inside GNU screen, so it continues running after you disconnect from SSH.
Prerequisites
- A Linux account that owns the server files and can run the server normally.
- GNU
screeninstalled and a known screen session name, such asmc. - The absolute server directory, for example
/home/mc/server. - A Java executable and server JAR for Java Edition, or the Bedrock executable and its required libraries for Bedrock.
- A manual start and stop procedure that already works before automation is added.
A simple Java restart script
Create /home/mc/restart_mc.sh with a text editor:
#!/bin/bash
SESSION=mc
DIR=/home/mc/server
screen -S $SESSION -X stuff "say Restarting in 60 seconds$(printf 'r')"
sleep 60
screen -S $SESSION -X stuff "stop$(printf 'r')"
sleep 20
cd "$DIR"
screen -dmS $SESSION java -Xmx4G -Xms4G -jar server.jar nogui
This is the conventional pattern: send a warning to the existing console, wait, send stop, wait for shutdown, then start Java in a detached screen session. The fixed 20-second wait is only a starting example; shutdown time depends on world size, storage speed, plugins, and mods.
A safer version that waits for the old session to exit
A fixed delay can be too short on a busy server. This variant polls the screen session for up to 60 seconds and refuses to launch a second copy if the old session has not disappeared:
#!/bin/bash
set -euo pipefail
SESSION=mc
DIR=/home/mc/server
JAR=server.jar
screen -S "$SESSION" -X stuff $'say Restarting in 60 secondsr'
sleep 60
screen -S "$SESSION" -X stuff $'stopr'
for attempt in {1..60}; do
if ! screen -list | grep -q ".$SESSION"; then
break
fi
sleep 1
done
if screen -list | grep -q ".$SESSION"; then
echo "Minecraft did not stop within 60 seconds" >&2
exit 1
fi
cd "$DIR"
screen -dmS "$SESSION" java -Xmx4G -Xms4G -jar "$JAR" nogui
The script assumes the server’s screen session ends when Java exits. If your wrapper deliberately keeps the screen session alive, replace the screen check with a process or service check appropriate to your installation. The important safety rule is that the script must not start a second server while the first one is still writing the world.
Rank #3
- CREATE YOUR WORLD — Build whatever you imagine in an infinite world that is unique in every playthrough.
- EXPLORE AND CRAFT — Discover biomes, resources, and mobs, then craft your way through a sandbox world full of surprises.
- SURVIVAL ADVENTURES — Face mysterious foes, travel across varied landscapes, and venture into perilous dimensions.
- PLAY TOGETHER — Play solo or join friends in local split-screen and cross-platform play across console, mobile, and PC. Online multiplayer supports up to 8 players.
- COMMUNITY PLAY — Connect with players on community servers, or subscribe to Realms Plus (sold separately) to play with up to 10 friends on a private server.
Make the script executable
- Save the file.
- Run
chmod +x /home/mc/restart_mc.sh. - Execute it manually as the same Linux user that normally runs the server:
/home/mc/restart_mc.sh. - Watch the console and logs through the entire stop and start cycle.
Use absolute paths in the script. Cron starts with a minimal environment and may not use the same working directory, PATH, Java selection, or shell profile as an interactive SSH session.
Run the script automatically with cron
Daily restart at 4:00 a.m.
Edit the crontab for the server account with crontab -e and add:
0 4 * * * /home/mc/restart_mc.sh
The five fields mean minute, hour, day of month, month, and day of week. This entry runs every day at minute 0 of hour 4 according to the machine’s cron timezone.
Make cron failures visible
Redirect output to a log while you validate the schedule:
Recommended Free Tools
0 4 * * * /home/mc/restart_mc.sh >> /home/mc/restart_mc.log 2>&1
After the first scheduled run, inspect both the script log and the Minecraft server log. Remove or rotate the extra log redirection after you establish that the job is reliable, or configure normal log rotation so it cannot grow without limit.
Rank #4
- Skins! We have biome settlers, city folk, town folk, and more!
- The Nether and all its inhabitants. Fight Ghasts and make friends with Pigmen
- Cross platform play for up to five players between Pocket Edition and Windows 10
- Revamped touch controls, controller support, and a controller mapping screen
- Enhanced Weather effects! Accumulating snow and more
Check the cron environment
- Use full paths for
screen, Java, the server directory, and the JAR when your distribution requires them. - Ensure the cron user owns the server directory and can write world, log, and crash-report files.
- Confirm the host timezone with the system administrator or timezone tools; do not assume it matches the timezone shown on your phone.
- Do not put two different cron entries or panel schedules in place for the same server. They can overlap and launch competing processes.
Java Edition versus Bedrock Edition
| Concern | Java Edition | Bedrock Dedicated Server |
|---|---|---|
| Clean-stop command | stop in the server console; the Minecraft Wiki assigns the command permission level 4. |
stop is documented by Microsoft as dedicated-server-only, with Owner permission and cheats enabled; verify the requirement for your version. |
| Typical Linux launch | java -Xmx4G -Xms4G -jar server.jar nogui |
LD_LIBRARY_PATH=. ./bedrock_server from the Bedrock server directory is a third-party example. |
| Automation pattern | Send the console command through screen, wait for Java to exit, then start the JAR. |
Send the console command through the running console, wait for the executable to exit, then launch it from the correct directory. |
| Common wrapper | screen, a shell script, or a system service. |
A start.sh script, screen, or a systemctl service. |
Bedrock command and launch cautions
Some Bedrock administration guides state that allow-cheats=true in server.properties is required before server commands work. If you change that setting, restart the server before testing commands. Enabling cheats changes the world’s command permissions, so make the decision deliberately rather than treating it as a harmless automation toggle.
The Bedrock executable name and launch requirements are not interchangeable with Java’s JAR command. A commonly documented Linux pattern is:
cd /home/mc/bedrock
screen -dmS mc-bedrock env LD_LIBRARY_PATH=. ./bedrock_server
Use the exact directory and executable supplied with your Bedrock download. The LD_LIBRARY_PATH=. prefix tells Linux to look in the current directory for libraries that accompany the executable; launching from another directory can fail even when the file itself exists.
Free tools Windows power users keep installed
One-click scans. No signup required.
How often should a Minecraft server restart?
There is no universal interval that applies to every world. Hosting-provider guidance commonly suggests restarting busy or heavily modded servers every 6 to 12 hours, while a small vanilla server may run longer between restarts. Those are operational recommendations, not a measured standard or a guarantee that restarting will fix lag.
Choose an interval based on symptoms and player activity:
Best Value
- Play and share with friends on console, mobile and Windows 10
- discover community creations in the new in-game store
- access new mini games and game modes through servers
- Busy or modded server: consider a maintenance window every 6 to 12 hours if memory growth, plugin instability, or accumulated errors make it necessary.
- Small vanilla server: a daily restart may be sufficient, and a longer interval may be reasonable when logs and performance remain healthy.
- Active public community: schedule during the quietest local period and give at least one warning so players can stop building, fighting, or travelling safely.
- Event or tournament: avoid an automatic restart during the event unless the restart is part of the published schedule.
Frequent restarts should not hide a faulty plugin, mod, memory limit, disk problem, or network issue. Use logs and performance symptoms to identify the underlying cause.
Test before you trust the schedule
- Back up the world or verify that your existing backup process has completed.
- Join as a player and place a block, open a container, and make another small change that should be saved.
- Run the script manually, or trigger the panel task once instead of waiting for the recurring time.
- Confirm that the warning reaches players before disconnection.
- Wait until the old process has exited before checking that the new one starts.
- Reconnect and verify that the test changes survived the restart.
- Review the server log for save errors, Java exceptions, missing libraries, permission failures, or a port-binding error.
- Only after a successful manual run should you enable the daily or 6-to-12-hour recurrence.
Troubleshoot common failures
The warning appears, but the server never restarts
Check that the task includes a restart power action rather than only a command action. On Linux, inspect the script log and run the script interactively. A failed cd, incorrect JAR name, missing executable permission, or a screen session owned by another user can stop the start phase.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteThe job starts a second server
Do not use a blind sleep 20 as proof that shutdown completed. Increase the wait or use a loop that confirms the old screen session or process has exited. Also search for duplicate panel schedules and duplicate cron entries.
stop is rejected
Send the command to the server console rather than chat. On Java, check that the command is entered without an extra slash when sent directly to the console. On Bedrock, verify the dedicated-server context, Owner permission, and the allow-cheats setting described by the applicable documentation.
The cron job works manually but not at 4:00 a.m.
Compare the cron user with the account used for manual testing, confirm the machine timezone, and replace relative paths with absolute paths. Cron may not load your shell profile, so Java or screen may not be found unless their locations are explicit.
Bedrock exits immediately
Run the executable from its server directory and preserve the required library environment, such as LD_LIBRARY_PATH=.. Check execute permissions and read the terminal output for missing libraries. Do not substitute the Java launch line for the Bedrock executable.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Players report lost progress
Extend the warning period, make sure the console receives stop, and verify that the old process has fully exited before starting a new one. Inspect the log for save errors and storage problems. A forced kill or overlapping start can interrupt a save.
Quick Recap
Operational checklist
- Choose a time that is quiet for your players and confirm the schedule timezone.
- Announce the restart with a clear countdown.
- Use a clean console
stopcommand. - Wait for the old process to exit; do not rely blindly on a short fixed delay.
- Start Java with the intended memory and JAR flags, or launch Bedrock with its required executable and library path.
- Use full paths and the correct Linux user in cron.
- Keep one scheduler only.
- Test manually, inspect logs, and verify that world changes persist.
- Adjust the interval based on actual player activity and server behavior rather than treating frequent restarts as a cure-all.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




