Minecraft Server for the Raspberry Pi
18
Minecraft Server for Docker on the Raspberry Pi.
GitHub: https://github.com/frozenfoxx/rpi-minecraft-server
git clone [email protected]:frozenfoxx/rpi-minecraft-server.git
cd rpi-minecraft-server
docker build .
The following will set up, install, and run the latest Minecraft server. This is fine for testing but not ideal for long term.
docker run -d --name=minecraft_server \
-p 25565:25565 \
-v /srv \
-e EULA=true \
-e DEFAULT_OP=[name] \
frozenfoxx/rpi-minecraft-server
To persist your world data, plugins, and other information you're going to want to create a data container (or otherwise mount storage). The following will quickly create one:
docker create -v /srv --name minecraft_data frozenfoxx/rpi-minecraft-server /bin/true
You can then mount this container using --volumes-from:
docker run -d --name=minecraft_server \
-p 25565:25565 \
--volumes-from minecraft_data \
-e EULA=true \
-e DEFAULT_OP=[name] \
frozenfoxx/rpi-minecraft-server
You can also adjust and deploy the server via the docker-compose.yml as such:
docker-compose up -d minecraft
This image can be configured using environment variables. The following are the most common used.
EULA: required by Mojang.DEFAULT_OP: required when creating a new container. Any usernames specified will be added to the ops.json file.JAVA_OPS: JVM options.MINECRAFT_HOME: home of the Minecraft server (default: /srv)MOTD: message of the day.LEVEL_NAME: world to load.LEVEL_SEED: world seed.DIFFICULTY: difficulty of the world.GAMEMODE: game type to load.PVP: whether to allow Player vs Player combat.EULA you are signifying your agreement.No tags have been pushed to this repository yet.