Skip to content
Minecraft Server for the Raspberry Pi in Docker
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Minecraft Server for Docker on the Raspberry Pi.

Docker Hub:

How to Build

git clone
cd rpi-minecraft-server
docker build .

How to Use this Image


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] \

Data Container

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] \

Docker Compose

You can also adjust and deploy the server via the docker-compose.yml as such:

docker-compose up -d minecraft


Environment Variables

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.


  • Accepting the Mojang EULA is absolutely required to use this image. By setting the environment variable EULA you are signifying your agreement.
You can’t perform that action at this time.