hexlo / minecraft-bedrock-server

2 stars 1 forks source link

Buy me a coffee

 __  __     ______     __  __     __         ______    
/\ \_\ \   /\  ___\   /\_\_\_\   /\ \       /\  __ \   
\ \  __ \  \ \  __\   \/_/\_\/_  \ \ \____  \ \ \/\ \  
 \ \_\ \_\  \ \_____\   /\_\/\_\  \ \_____\  \ \_____\ 
  \/_/\/_/   \/_____/   \/_/\/_/   \/_____/   \/_____/ 

Minecraft Bedrock Server

Docker Hub mirror: https://hub.docker.com/r/hexlo/minecraft-bedrock-server

Initial Setup

You can easily import your world and config files. Here is an example docker-compose.yml: Change the path of the volumes approprietly.

version: '3'
services:

  minecraft-server:
    # Docker Hub mirror: hexlo/minecraft-bedrock-server:latest
    image: ghcr.io/iceoid/minecraft-bedrock-server:latest
    container_name: minecraft-server
    stdin_open: true # docker run -i
    tty: true        # docker run -t
    restart: unless-stopped
    ports:
      - 19132:19132/udp
    volumes:
      - ./path_to/config:/bedrock-server/config
      - ./path_to/worlds:/bedrock-server/worlds

If you want multiple servers running concurrently, you can have different ports for each one, and port forward accordingly. ie.:

    ports:
      - 20000:19132/udp

This server would run on port 20000.

In your config folder, have the following 3 files (don't include them if you would like new default ones):

Usage

Start the server

The server will start with the container

Stop the server without stopping the container

docker attach minecraft-server\ stop

You can use server side commands.

First, attach to the container with docker attach minecraft-server

Here is a list of useful commands Don't include the forward slash before the commands ie: instead of /say Hello! use say Hello!

To dettach without stopping the container Ctrl+p + Ctrl+q