Minecraft Server Start, Stop, and Auto Save Scripts

If you’re running a Minecraft server on Linux and you want a simple way to automate starting, stopping, and backing up the server with a single command-line option this might be for you.

These scripts are something I cracked out for the Minecraft server we run here. Feel free to grab a copy and modify them for your own use.

You’ll need basic unix utilities and “screen”, which may not be installed by default. If you’ve got all that, the only thing that it’s necessary to change should be the startup directory setting in the main file.

If you’d like the backups to be run automatically, put the backup script in your crontab file. If you need help doing that, look up “edit vixie crontab how-to” on google. If you’re not using Vixie Cron.. well.. you probably know what you’re doing.

Also note that this was created to be the absolute bare-bones of what you’d need to effectively run and back-up the server. There certainly could be more options, wrappers, MOTD on entry daemons, etc. But they won’t be in these scripts.

If you need to pop into the Minecraft server command line once it’s up and running, type “screen -r” as long as you’ve only got the single screen session running. When you want to leave the server, and exit back to your prompt without closing it down, press CTRL-A CTRL-D.

Hopefully they help, and good luck!

Minecraft Start/Stop/Backup Scripts