Minecraft is a sandbox video game developed by Mojang Studios. The game allows players to build with a variety of different blocks in a 3D procedurally generated world, requiring creativity from players. Other activities in the game include exploration, resource gathering, crafting, and combat.
This Docker image contains the dedicated server for Minecraft Java Edition.
Run the server using a bind mount for data persistence:
$ mkdir -p $(pwd)/minecraft-data
$ chmod 777 $(pwd)/minecraft-data
$ docker run -d -p 25565:25565 \
-v $(pwd)/minecraft-data:/app \
-e EULA=TRUE \
--name minecraft-server jcivitell/minecraft-server
The container will automatically download and start the Minecraft server on startup.
Feel free to overwrite these environment variables using -e (--env):
EULA=FALSE (Set to TRUE to accept the Minecraft EULA)
MAX_PLAYERS=2 (Maximum number of players)
DIFFICULTY=easy (World difficulty: easy, normal, hard)
GAMEMODE=survival (Game mode: survival, creative, adventure, spectator)
MOTD="A Minecraft Server" (Message of the Day)
ALLOW_FLIGHT=false (Allow players to fly)
ALLOW_NETHER=true (Allow access to the Nether)
RCON_PW="" (RCON password, if empty RCON is disabled)
- The server runs on Java 21 (OpenJDK).
- The server.jar is downloaded from the official Mojang server.
- The server listens on port 25565 (TCP/UDP).
- Server data is stored in the /app directory within the container.
This Docker image is maintained by jcivitel.