ida schmidt 0f16466a9e | ||
---|---|---|
systemd | ||
LICENSE | ||
README.md | ||
automate.sh |
README.md
auto-mc
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, or >=21 for 1.21+) should work fine.
installation
to install, do:
sudo apt install git
git clone https://git.skeh.site/ida/auto-mc ~/auto-mc
cd ~/auto-mc && sudo bash automate.sh
usage notes
by default the server tries to allocate 3G of ram, to change this, just edit mc-server.service's ExecStart
structure
/srv/minecraft/server
: server files
/srv/minecraft/backups
: backups of ../server
(taken daily, retained for 14 days)
/etc/systemd/system/mc-*
: services and timers
commands
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