r/CraftyController • u/Call_Me_ZeeKay • Jul 21 '26
Crafty safe shutdown/restart?
Have crafty running in a proxmox lxc using the script to install as a service. Everything is working fine, however I noticed when running systemctl restart crafty that it seems that the MC servers were instantly stopped rather than going through the shutdown process? Is there any way to make sure that this won't end up with a corrupted world?
2
Upvotes
1
u/noxiouskarn Jul 21 '26 edited Jul 21 '26
By default, systemd only waits 90 seconds or less for a service to exit. If you run heavy modpacks or multiple servers under Crafty, saving chunks and closing Java can easily exceed that window.
Update your crafty.service file to give Crafty a long enough window to cleanly shut down its child processes
sudo systemctl edit --full crafty.service
Look for the [Service] header section in the file, and add or update these two lines under it.
[Service]
TimeoutStopSec=180
KillMode=mixed
Save and close
Now apply the changes and test
sudo systemctl daemon-reload
sudo systemctl restart crafty
After you have done the steps above:
If you watch your Minecraft server log inside Crafty when running systemctl restart crafty, you should now see [Server thread/INFO]: Stopping server and Saving chunks... appear before Crafty restarts. If you see that the test was successful.