~solomon/minecraft-server

scripts to build a cross-play Minecraft server on an Ubuntu box (assumes apt, systemd, ufw, and a Java 19 distro package)

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~solomon/minecraft-server
read/write
git@git.sr.ht:~solomon/minecraft-server

You can also use your local clone with git send-email.

Last tested with 22.10.

#Installation

#New user

Copies SSH authorized_keys from root account:

adduser mc || true
adduser mc sudo

cd /home/mc/
mkdir --parents .ssh
cd .ssh
touch authorized_keys
chown --recursive mc:mc .
chmod 700 .
chmod 600 authorized_keys
cp ~/.ssh/* .

#Everything else

Log in as that new user, clone this repo, and run the following:

./setup.sh
agree-mc-eula
sudo systemctl enable --now mc
  • Service logs: journalctl -u mc
  • Server console: mcrcon -p password
    • (the rcon port isn't opened so the default config is safe, but I plan to make its password configurable soon)