Docker Install
This project includes a Dockerfile that allows you to build and run the Bedrock Server Manager in a containerized environment. This allows for easy deployment and management of the application.
Image Location
The official Docker image is hosted on both the GitHub Container Registry and Docker Hub.
Docker Hub:
dmedina559/bedrock-server-manager:stableGitHub Container Registry:
ghcr.io/dmedina559/bedrock-server-manager:stable
You can pull it using the following command:
docker pull dmedina559/bedrock-server-manager:stable
Running the Container
The Docker image is configured to run the web server by default. To run the container, you need to map the port and, most importantly, provide volumes for persistent data storage.
Data Persistence
The application uses two main directories to store its data. To prevent data loss when the container is removed, you must mount volumes for both of these locations.
Configuration Directory: This directory stores the main
bedrock_server_manager.jsonfile, which contains the path to the data directory and the database URL.Container Path:
/root/.config/bedrock-server-manager
Data Directory: This directory stores everything else, including server files, plugins, backups, and the application’s database.
Default Container Path:
/root/bedrock-server-manager
Using a Named Volume (Recommended)
This is the easiest and most recommended way to manage the data. Docker will manage the volumes for you.
docker run -d \
-p 11325:11325 \
-p 19132:19132/udp \
-p 19133:19133/udp \
--name bsm-container \
-v bsm_config:/root/.config/bedrock-server-manager \
-v bsm_data:/root/bedrock-server-manager \
dmedina559/bedrock-server-manager:stable
This command creates two named volumes, bsm_config and bsm_data, and mounts them to the correct locations.
Using Bind Mounts
Alternatively, you can mount directories from your host machine.
docker run -d \
-p 11325:11325 \
-p 19132:19132/udp \
-p 19133:19133/udp \
--name bsm-container \
-v /path/on/host/bsm_config:/root/.config/bedrock-server-manager \
-v /path/on/host/bsm_data:/root/bedrock-server-manager \
dmedina559/bedrock-server-manager:stable
Overriding Environment Variables
You can configure the application by passing environment variables to the container.
HOST: The host for the web server (default:0.0.0.0).PORT: The port for the web server (default:11325).BSM_DATA_DIR: The path to the data directory within the container (default:/root/bedrock-server-manager). Note: If you change this, make sure to update your volume mounts accordingly.BSM_DB_URL: The database connection URL. Setting this overrides the value in the configuration file.
For example, to change the web server port to 8080 and use a custom database:
docker run -d \
-p 8080:8080 \
-p 19132:19132/udp \
-p 19133:19133/udp \
--name bsm-container \
-e PORT=8080 \
-e HOST=0.0.0.0 \
-e BSM_DB_URL="mysql://user:pass@host/db" \
-v bsm_config:/root/.config/bedrock-server-manager \
-v bsm_data:/root/bedrock-server-manager \
dmedina559/bedrock-server-manager:stable
Exposing Minecraft Server Ports
For players to be able to connect to your Minecraft servers, you must expose the corresponding UDP ports from the container. The default Minecraft Bedrock ports are 19132/udp (IPv4) and 19133/udp (IPv6).
If you run multiple servers, you will need to map a port for each one. See the example above for how to add more -p flags.
Note on LAN Discovery (Broadcast): By default, Docker containers run in a bridge network which isolates broadcast traffic. This means servers running in Docker will not appear in the “Worlds” tab (LAN games) of Minecraft clients on the same network, even if the ports are mapped correctly. Players will need to add the server manually using the “Servers” tab -> “Add Server” button and entering the host’s IP address and port.
Alternative: Host Networking (Required for LAN Discovery)
To enable automatic LAN discovery (so the server appears in the Worlds list), you must use Host Networking. This bypasses Docker’s network isolation and allows broadcast packets to reach the LAN.
A simpler, but less isolated, approach is to use host networking by adding --network host to your docker run command. Note that when using host networking, you do not need to map individual ports.
Using Docker Compose
For an even easier setup, you can use Docker Compose. Create a docker-compose.yml file and add the following content:
version: '3.8'
services:
bedrock-server-manager:
image: dmedina559/bedrock-server-manager:stable # Use desired tag here (e.g., stable, latest, 3.7.0)
container_name: bsm-container # Name of the container
restart: unless-stopped # Restart policy
# network_mode: "host" # Use host networking for LAN discovery
ports:
- "11325:11325" # Web server port
- "19132:19132/udp" # Default Minecraft Bedrock server port (IPv4)
- "19133:19133/udp" # Default Minecraft Bedrock server port (IPv6)
# - "19100:19100/udp" # Add more ports as needed for additional servers
environment: # Optional
- HOST=0.0.0.0 # Which host to bind the web server to
- PORT=11325 # Port for the web server
# - BSM_DB_URL=mysql://user:pass@host/db # Custom database URL
volumes:
- bsm_config:/root/.config/bedrock-server-manager
- bsm_data:/root/bedrock-server-manager
volumes:
bsm_config:
bsm_data:
You can then start the application with a single command: docker-compose up -d.
Advanced Usage
Accessing the CLI
You can access the bedrock-server-manager CLI using docker exec.
To run a single command:
docker exec bsm-container bedrock-server-manager <command>
To get an interactive shell:
docker exec -it bsm-container /bin/bash
Changing the Database URL
The easiest way to change the database URL is to set the BSM_DB_URL environment variable as described in the Overriding Environment Variables section.
Alternatively, you can edit the configuration file stored in the bsm_config volume:
Stop the container:
docker stop bsm-containerLocate and edit the
bedrock_server_manager.jsonfile inside thebsm_configvolume. The exact location on your host will depend on your Docker setup. You can usedocker volume inspect bsm_configto find the mountpoint.Change the
db_urlvalue in the JSON file.Start the container again:
docker start bsm-container