Code Monkey home page Code Monkey logo

docker-minecraft-bedrock-server's Introduction

Docker Pulls GitHub Issues Discord

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:

itzg/minecraft-server

Environment Variables

Container Specific

  • EULA (no default) : must be set to TRUE to accept the Minecraft End User License Agreement
  • VERSION (LATEST) : can be set to a specific server version or the following special values can be used:
    • LATEST : determines the latest version and can be used to auto-upgrade on container start
    • PREVIOUS : uses the previously maintained major version. Useful when the mobile app is gradually being upgraded across devices
    • 1.11 : the latest version of 1.11
    • 1.12 : the latest version of 1.12
    • 1.13 : the latest version of 1.13
    • 1.14 : the latest version of 1.14
  • UID (default derived from /data owner) : can be set to a specific user ID to run the bedrock server process
  • GID (default derived from /data owner) : 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_NAME
  • SERVER_PORT
  • GAMEMODE
  • DIFFICULTY
  • LEVEL_TYPE
  • ALLOW_CHEATS
  • MAX_PLAYERS
  • ONLINE_MODE
  • WHITE_LIST
  • VIEW_DISTANCE
  • TICK_DISTANCE
  • PLAYER_IDLE_TIMEOUT
  • MAX_THREADS
  • LEVEL_NAME
  • LEVEL_SEED
  • DEFAULT_PLAYER_PERMISSION_LEVEL
  • TEXTUREPACK_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 /udp when 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 file server.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 Docker Compose

The examples directory contains an example Docker compose file that declares:

  • a service running the bedrock server container and exposing UDP port 19132
  • a volume to be attached to the service

The service configuration includes some examples of configuring the server properties via environment variables:

environment:
  EULA: "TRUE"
  GAMEMODE: survival
  DIFFICULTY: normal

From with in the examples directory, you can deploy the composition by using:

docker-compose up -d

You can follow the logs using:

docker-compose logs -f bds

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

docker-minecraft-bedrock-server's People

Contributors

itzg avatar achton avatar aesy avatar mcjon3z avatar michaelpetik avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.