Install a Minecraft Java Server and Watchtower for automatic updates using Docker within seconds. Both will start automatically after a reboot.
In-depth article about the installation (German): https://marc.tv/minecraft-java-raspberry-pi-docker/
curl -fsSL https://raw.githubusercontent.com/mtoensing/RaspberryPiMinecraftDocker/main/getPiMinecraftDocker.sh -o install-pi-docker-minecraft.sh
chmod +x install-pi-docker-minecraft.sh
./install-pi-docker-minecraft.sh
Select Mutliplayer, Add Server, Server Address and put in the hostname that is displayed at the end of the installation.
If this does not work, please check with the following command, if the containers are running:
sudo docker ps
This should list two containers: mcserver and watchtower. If this is not the case, please lock at the output of the script for errors.
sudo docker logs mcserver
Press Ctrl-C to exit the docker log.
sudo docker attach mcserver
Here you can use Minecraft commands like
op [username]
whitelist add [username]
Press Ctrl-P, followed by Ctrl-Q to exit.
Before you report a problem, check with the following command if the containers are running.
sudo docker ps
To start the container manually:
sudo docker start mcserver