Run a bedrock server in a Docker container.
This Docker image will download the Bedrock Server app and set it up, along with its dependencies.
- Prepare the persistent volumes:
- Create a volume for the configuration:
 docker volume create --name "bedrock-config"
- Create a volume for the worlds:
 docker volume create --name "bedrock-worlds"
 
- Create a volume for the configuration:
- Create the Docker container:
docker create --name=minecraft -it\ -v "bedrock-config:/bedrock-server/config"\ -v "bedrock-worlds:/bedrock-server/worlds"\ -p 19132:19132/udp\ --restart=unless-stopped\ roemer/bedrock-server
- Prepare the config files
- Either start the server once and stop it
- or copy the files from the original archives
 
- Configure the default files in the configvolume:- Configure the server.propertiesto your likings.
- Configure the whitelist.jsonin case you have setwhite-list=truein the above step. Note: Thexuidis optional and will automatically be added as soon as a matching player connects. Here's an example of awhitelist.jsonfile:[ { "ignoresPlayerLimit": false, "name": "MyPlayer" }, { "ignoresPlayerLimit": false, "name": "AnotherPlayer", "xuid": "274817248" } ]
- Configure the permissions.jsonand add the operators. This file consists of a list ofpermissionsandxuids. Thepermissionscan bemember,visitororoperator. Thexuidcan be copied from thewhitelist.jsonas soon as the user connected once. An example could look like:[ { "permission": "operator", "xuid": "274817248" } ]
 
- Configure the 
- Start the server:
 docker start minecraft
- Stop the server
 docker attach minecraft stop
- Re-create the server with the new image and the same settings (either manuallyor withportaineror Synologysclean).
 NOTE: When updating from 1.7, you need to use the new installation guide and put yourworldsandconfigfiles into the newly created volumes or use appropriate volume mappings when creating the container. You also need to renameops.jsontopermissions.json.
- Start the server
docker start minecraft
There are various commands that can be used in the console. To access the console, you need to attach to the container with the following command:
docker attach <container-id>
To leave the console without exiting the container, use Ctrl+p + Ctrl+q.
Here are the commands:
| Command syntax | Description | 
|---|---|
| kick { player nameorxuid} {reason} | Immediately kicks a player. The reason will be shown on the kicked players screen. | 
| stop | Shuts down the server gracefully. | 
| save { holdorresumeorquery} | Used to make atomic backups while the server is running. See the backup section for more information. | 
| whitelist { onorofforlistorreload} | onandoffturns the whitelist on and off. Note that this does not change the value in theserver.propertiesfile!listprints the current whitelist used by the serverreloadmakes the server reload the whitelist from the file. | 
| whitelist { addorremove} {name} | Adds or removes a player from the whitelist file. The name parameter should be the Xbox Gamertag of the player you want to add or remove. You don't need to specify a XUID here, it will be resolved the first time the player connects. | 
| permission { listorreload} | listprints the current used permissions list.reloadmakes the server reload the operator list from the permissions file. | 
| op { player name} | Promote a player to operator. This will also persist inpermissions.jsonif the player is authenticated to XBL. Ifpermissions.jsonis missing it will be created. If the player is not connected to XBL, the player is promoted for the current server session and it will not be persisted on disk. Default server permission level will be assigned to the player after a server restart. | 
| deop { player name} | Demote a player to member. This will also persist inpermissions.jsonif the player is authenticated to XBL. Ifpermissions.jsonis missing it will be created. | 
| changesetting { setting} {value} | Changes a server setting without having to restart the server. Currently only two settings are supported to be changed, allow-cheats(trueorfalse) anddifficulty(0,peaceful, 1,easy, 2,normal, 3 orhard). They do not modify the value that's specified inserver.properties. | 
The server supports taking backups of the world files while the server is running. It's not particularly friendly for taking manual backups, but works better when automated. The backup (from the servers perspective) consists of three commands:
| Command | Description | 
|---|---|
| save hold | This will ask the server to prepare for a backup. It’s asynchronous and will return immediately. | 
| save query | After calling save holdyou should call this command repeatedly to see if the preparation has finished. When it returns a success it will return a file list (with lengths for each file) of the files you need to copy. The server will not pause while this is happening, so some files can be modified while the backup is taking place. As long as you only copy the files in the given file list and truncate the copied files to the specified lengths, then the backup should be valid. | 
| save resume | When you’re finished with copying the files you should call this to tell the server that it’s okay to remove old files again. |