Skip to content

Instantly share code, notes, and snippets.

@jdan
Last active December 19, 2020 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jdan/478bf7951b78dbfe335526a12d8c44e7 to your computer and use it in GitHub Desktop.
Save jdan/478bf7951b78dbfe335526a12d8c44e7 to your computer and use it in GitHub Desktop.

docker-compose for minecraft

This docker compose file spins up two Minecraft (Bedrock Edition - phones, ipads, consoles, windows 10) servers. One creative (port 19132, the default one) and one survival (port 29132).

I was surprised how easy it was because I've fiddled with Minecraft servers in the past a few times to varying degrees of success.

Now my niece, nephew, and I can bury ourselves in our iPads on christmas while we social distance. (And for those not traveling for the holidays - thank you! - hopefully this makes you feel a little more connected)

More documentation on itzg/minecraft-bedrock-server here

Running

docker-compose up -d

version: "3"
services:
creative:
image: itzg/minecraft-bedrock-server
restart: always
volumes:
- ./data/minecraft-creative:/data
ports:
- "19132:19132/udp"
environment:
# https://minecraft.gamepedia.com/Server.properties#Bedrock_Edition_3
EULA: "TRUE"
GAMEMODE: creative
LEVEL_NAME: "myworld-creative"
SERVER_NAME: "MC Server (Creative)"
survival:
image: itzg/minecraft-bedrock-server
restart: always
volumes:
- ./data/minecraft-survival:/data
ports:
- "29132:19132/udp"
environment:
# https://minecraft.gamepedia.com/Server.properties#Bedrock_Edition_3
EULA: "TRUE"
GAMEMODE: survival
LEVEL_NAME: "myworld-creative"
SERVER_NAME: "MC Server (Survival)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment