automate automation for minecraft servers
Go to file
ida schmidt 178235c59d limit backup cpu usage 2023-07-08 20:45:49 -07:00
systemd limit backup cpu usage 2023-07-08 20:45:49 -07:00
LICENSE Initial commit 2020-04-01 03:49:15 +00:00 update readme 2021-05-31 09:23:53 -07:00 bump java versioning for 1.18 2021-12-30 15:13:57 -07:00


automate automation for minecraft servers.

this is an installer for the minecraft server (paper), with a few systemd units and a backup script. the server runs inside a gnu screen session controlled by the user mc. it works best on ubuntu 20.04+ because of java versioning, but any distro with apt (and a version of openjdk >=16 for 1.17+ installs) should work fine.


to install, do:

sudo apt install git
git clone ~/auto-mc 
cd ~/auto-mc && sudo bash

usage notes

by default the server tries to allocate 3G of ram, to change this, just edit mc-server.service's ExecStart


/srv/minecraft/server: server files

/srv/minecraft/backups: backups of ../server (taken daily, retained for 14 days)

/etc/systemd/system/mc-*: services and timers


ran as root*:

systemctl start mc-server: starts the minecraft server

systemctl stop mc-server: stops the minecraft server

systemctl restart mc-server: restarts the minecraft server

(* = either by logging into root, or prefixing any command with sudo)

ran as mc

screen -r mc-server: connects to the server console

mc-backup: manually runs a backup