在Docker容器中运行的Minecraft基岩版服务器,支持世界和配置文件导入,便于部署和管理多实例。
__ __ ______ __ __ __ ______ /\ \_\ \ /\ ___\ /\_\_\_\ /\ \ /\ __ \ \ \ __ \ \ \ __\ \/_/\_\/_ \ \ \____ \ \ \/\ \ \ \_\ \_\ \ \_____\ /\_\/\_\ \ \_____\ \ \_____\ \/_/\/_/ \/_____/ \/_/\/_/ \/_____/ \/_____/
Minecraft Bedrock Server
Github mirror: https://github.com/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: 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 whitelist.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
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
hexlo 命名空间的其他可用镜像:
更多相关 Docker 镜像与资源
以下是 hexlo/minecraft-bedrock-server 相关的常用 Docker 镜像,适用于 不同场景 等不同场景:
镜像拉取方式
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
轩辕镜像加速拉取命令点我查看更多 minecraft-bedrock-server 镜像标签
DockerHub 原生拉取命令
用户好评
来自真实用户的反馈,见证轩辕镜像的优质服务