automate automation for minecraft servers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ida schmidt 87facda911 bump java versioning for 1.18 8 months ago
systemd try to make this user agnostic 2 years ago
LICENSE Initial commit 2 years ago
README.md update readme 1 year ago
automate.sh bump java versioning for 1.18 8 months ago

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) 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