__ __ ______ __ __ __ ______
/\ \_\ \ /\ ___\ /\_\_\_\ /\ \ /\ __ \
\ \ __ \ \ \ __\ \/_/\_\/_ \ \ \____ \ \ \/\ \
\ \_\ \_\ \ \_____\ /\_\/\_\ \ \_____\ \ \_____\
\/_/\/_/ \/_____/ \/_/\/_/ \/_____/ \/_____/
Docker Hub mirror: https://hub.docker.com/r/hexlo/minecraft-bedrock-server
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):
- server.properties (edit as you wish)
- allowlist.json (if whitelist=true is set in the server.properties, you need to add players in this file as follow. The xuid will be generated automatically)
[
{
"ignoresPlayerLimit": false,
"name": "Player1"
},
{
"ignoresPlayerLimit": false,
"name": "Player2",
"xuid": "12346764585"
}
]
- permissions.json (give players permissions. You need the xuid of the players. Either look a the allowlist.json file after adding players or use an online xuid grabber)
[
{
"permission": "operator",
"xuid": "12346764585"
}
]
The structure of the worlds folder is as follow:
bedrock-server
|__worlds
|__level
|__db
level.dat
level.dat_old
levelname.txt
The server will start with the container
docker attach minecraft-server
stop
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