itzg / docker-minecraft-bedrock-server

Containerized Minecraft Bedrock Dedicated Server with selectable version
MIT License
1.12k stars 210 forks source link

RCON Replacement #191

Open macchie opened 2 years ago

macchie commented 2 years ago

Hello everyone, this is not an issue but i saw that many of you asked how to remotely control your server.

I'm currently building a sort of bridge that integrates seamlessly with this server:

Minecraft BDS Bridge

Hope you will like it! Send suggestions and issues on the bridge repository.

And of course A HUGE THANK YOU to @itzg (and the community) for their work so far! :)

macchie commented 2 years ago

Minecraft Bedrock Server Bridge

Setup

Create a Telegram Bot and obtain the Token

Extend your itzg/docker-minecraft-bedrock-server docker-compose.yml file to produce something similar:

version: '3.4'

services:
  bds:
    image: itzg/minecraft-bedrock-server
    environment:
      EULA: "TRUE"
      GAMEMODE: creative
      SERVER_NAME: Your Server Name
    ports:
      - 19132:19132/udp
#      - 39133:39133/udp
    volumes:
      - /path/to/your/data:/data
    labels:
      minecraft_bedrock_server: "true"
    stdin_open: true
    tty: true
    sysctls:
      net.ipv4.ip_local_port_range: 39132 39133

  bds_bridge:
    image: macchie/minecraft-bedrock-server-bridge
    environment:
      - TELEGRAM_BOT_TOKEN=12345
      - TELEGRAM_BOT_ADMINS=username1,username2
    volume:
      - /var/run/docker.sock:/var/run/docker.sock

Make sure you set your Server with:

stdin_open: true
tty: true
labels:
  minecraft_bedrock_server: "true"

Remeber to set stdin_open and tty, these two properties allows you attach to the Docker container to run commands through the console.

Add a minecraft_bedrock_server label under the labels list (value is not important) to flag this container so that the bridge can succesfully discover it.

Also, add a new bds_bridge service and set TELEGRAM_BOT_TOKEN and TELEGRAM_BOT_ADMINS:

bds_bridge:
  image: macchie/minecraft-bedrock-server-bridge
  environment:
    - TELEGRAM_BOT_TOKEN=12345
    - TELEGRAM_BOT_ADMINS=username1,username2
  volume:
    - /var/run/docker.sock:/var/run/docker.sock

Configuration

See repo.

How To Use

See Repo.