3.5 KiB
Quickstart
The following starts a Bedrock Dedicated Server running a default version and exposing the default UDP port:
docker run -d -e EULA=TRUE -p 19132:19132/udp itzg/minecraft-bedrock-server
Looking for a Java Edition Server
For Minecraft Java Edition you'll need to use this image instead:
Environment Variables
Container Specific
EULA(no default) : must be set toTRUEto accept the Minecraft End User License AgreementVERSION(1.12) : can be set to a specific server version or just 1.11 or 1.12 to pick the latest known version of eachUID(default derived from/dataowner) : can be set to a specific user ID to run the bedrock server processGID(default derived from/dataowner) : can be set to a specific group ID to run the bedrock server process
Server Properties
The following environment variables will set the equivalent property in server.properties, where each is described here.
SERVER_NAMEGAMEMODEDIFFICULTYLEVEL_TYPEALLOW_CHEATSMAX_PLAYERSONLINE_MODEWHITE_LISTVIEW_DISTANCETICK_DISTANCEPLAYER_IDLE_TIMEOUTMAX_THREADSLEVEL_NAMELEVEL_SEEDDEFAULT_PLAYER_PERMISSION_LEVELTEXTUREPACK_REQUIRED
For example, to configure a flat, creative server instead of the default use:
docker run -d --name bds-flat-creative \
-e EULA=TRUE -e LEVEL_TYPE=flat -e GAMEMODE=creative \
-p 19132:19132/udp itzg/minecraft-bedrock-server
Exposed Ports
- UDP 19132 : the Bedrock server port.
NOTE that you must append
/udpwhen exposing the port, such as-p 19132:19132/udp
Volumes
/data: the location where the downloaded server is expanded and ran. Also contains the configuration properties fileserver.properties
Connecting
When running the container on your LAN, you can find and connect to the dedicated server in the "LAN Games" part of the "Friends" tab, such as:
Deploying with Kubernetes
The examples directory contains an example Kubernetes manifest file that declares:
- a peristent volume claim (using default storage class)
- a pod deployment that uses the declared PVC
- a service of type LoadBalancer
The pod deployment includes some examples of configuring the server properties via environment variables:
env:
- name: EULA
value: "TRUE"
- name: GAMEMODE
value: survival
- name: DIFFICULTY
value: normal
The file is deploy-able as-is on most clusters, but has been confirmed on Docker for Desktop and Google Kubernetes Engine:
kubectl apply -f examples/kubernetes.yml
You can follow the logs of the deployment using:
kubectl logs -f deployment/bds
