{# bedrock-server-manager/bedrock_server_manager/web/templates/getting_started.html #} {% extends "base.html" %} {# --- Page Title --- #} {% block title %}Getting Started - {{ super() }}{% endblock %} {# --- Page Specific Styles --- #} {% block head_styles %} {{ super() }} {# Include styles from base if needed #} {# Include table styles if not already globally included/needed #} {% endblock %} {# --- Main Content --- #} {% block content %}
Bedrock Server Manager is a comprehensive python package designed for installing, managing, and maintaining Minecraft Bedrock Dedicated Servers with ease, and is Linux/Windows compatable.
{# --- CHANGELOG Link --- #}.mcworld
/.mcpack
files into your server.This app requires Python 3.10
or later, and you will need pip
installed.
On Linux, you'll also need:
screen
systemd
pip install bedrock-server-manager
bedrock-server-manager will use the Environment Variable BEDROCK_SERVER_MANAGER_DATA_DIR
for setting the default config/data location, if this variable does not exist it will default to $HOME/bedrock-server-manager
(Linux/macOS) or the user's home directory equivalent (Windows).
Follow your platform's documentation for setting Environment Variables.
The app will create its data folders in this location. This is where servers will be installed to and where the app will look when managing various server aspects.
Certain variables can can be changed directly in the
or with the manage-script-config
command.
BASE_DIR
: Directory where servers will be installedCONTENT_DIR
: Directory where the app will look for addons/worldsDOWNLOAD_DIR
: Directory where servers will downloadBACKUP_DIR
: Directory where server backups will goLOG_DIR
: Directory where app logs will be savedBACKUP_KEEP
: How many backups to keepDOWNLOAD_KEEP
: How many server downloads to keepLOGS_KEEP
: How many logs to keepLOG_LEVEL
: Level for logging.WEB_PORT
: Port used by the web server. 11325 by defaultTOKEN_EXPIRES_WEEKS
: How long JWT tokens are vaild for in weeks.For a complete list of commands, run bedrock-server-manager
from the Bedrock Server Manager host CLI
bedrock-server-manager [options]
Open Main Menu:
bedrock-server-manager main
Send Command:
bedrock-server-manager send-command --server server_name --command "tell @a hello"
Manage Script Config:
bedrock-server-manager manage-script-config --key BACKUP_KEEP --operation write --value 5
Start the Web Server:
bedrock-server-manager start-web-server --host 0.0.0.0 "::" --mode direct
Easily import addons and worlds into your servers. The app will look in the configured CONTENT_DIR
directories for addon files.
Place .mcworld
files in
or .mcpack
/.mcaddon
files in
Use the interactive menu to choose which file to install or use the command:
bedrock-server-manager install-world --server server_name --file '/path/to/WORLD.mcworld'
bedrock-server-manager install-addon --server server_name --file '/path/to/ADDON.mcpack'
Bedrock Server Manager 3.1.0 includes a Web server you can run to easily manage your bedrock servers in your web browser, and is also mobile friendly!
The web ui has full parity with the CLI. With the web server you can:
To get started using the web server you must first set these environment variables:
BEDROCK_SERVER_MANAGER_USERNAME
: Required. Plain text username for web UI and API login. The web server will not start if this is not setBEDROCK_SERVER_MANAGER_PASSWORD
: Required. Hashed password for web UI and API login. Use the generate-password utility. The web server will not start if this is not setBEDROCK_SERVER_MANAGER_SECRET
: Recommended. A long, random, secret string. If not set, a temporary key is generated, and web UI sessions will not persist across restarts, and will require reauthentication.BEDROCK_SERVER_MANAGER_TOKEN
: Recommended. A long, random, secret string (different from _SECRET). If not set, a temporary key is generated, and JWT tokens used for API authentication will become invalid across restarts. JWT tokens expire every 4 weeks by defaultFollow your platform's documentation for setting Environment Variables.
For the web server to start you must first set the BEDROCK_SERVER_MANAGER_PASSWORD
environment variable.
This must be set to the password hash and NOT the plain text password.
Use the following command to generate a password:
bedrock-server-manager generate-password
Follow the on-screen prompt to hash your password.
By Default Bedrock Server Manager will only listen to local host only interfaces 127.0.0.1
and [::1]
.
To change which host to listen to start the web server with the specified host.
Example: specify local host only ipv4 and ipv6:
bedrock-server-manager start-web-server --host 127.0.0.1 "::1"
Example: specify all ipv4 and ipv6 addresses:
bedrock-server-manager start-web-server --host 0.0.0.0 "::"
By default Bedrock Server Manager will use port 11325
. This can be changed in script_config.json
:
bedrock-server-manager manage-script-config --key WEB_PORT --operation write --value 11325
An HTTP API is provided allowing tools like curl
or Invoke-RestMethod
to interact with the server.
Before using the API, ensure the following environment variables are set on the system running the app:
BEDROCK_SERVER_MANAGER_TOKEN
: REQUIRED for token persistence across server restartsBEDROCK_SERVER_MANAGER_USERNAME
: The username for API login.BEDROCK_SERVER_MANAGER_PASSWORD
: The hashed password for API loginThe API endpoints require authentication using a JSON Web Token (JWT).
How: Obtain a token by sending a POST request to the /api/login
endpoint.
Request Body: Include a JSON payload with username
and password
keys, matching the values set in the environment variables.
{
"username": "username",
"password": "password"
}
Response: On success, the API returns a JSON object containing the access_token
:
{
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
Tokens expire after the configured duration (default: 4 weeks).
curl
Example (Bash):curl -X POST -H "Content-Type: application/json" \
-d '{"username": "your_username", "password": "your_password"}' \
http://:/api/login
$body = @{ username = 'your_username'; password = 'your_password' } | ConvertTo-Json
Invoke-RestMethod -Method Post -Uri "http://:/api/login" -Body $body -ContentType 'application/json'
Endpoints requiring authentication will need the obtained access_token
included in the Authorization
header of your requests:
Authorization: Bearer YOUR_JWT_TOKEN
For requests sending data (like POST or PUT), set the Content-Type
header to application/json
.
Start server:
curl
Example (Bash):curl -X POST -H "Authorization: Bearer YOUR_JWT_TOKEN" \
http://:/api/server//start
$headers = @{ Authorization = 'Bearer YOUR_JWT_TOKEN' }
Invoke-RestMethod -Method Post -Uri "http://:/api/server//start" -Headers $headers
Send Command:
curl
Example (Bash):curl -X POST -H "Authorization: Bearer YOUR_JWT_TOKEN" -H "Content-Type: application/json" \
-d '{"command": "say Hello from API!"}' \
http://:/api/server//send_command
$headers = @{ Authorization = 'Bearer YOUR_JWT_TOKEN'; 'Content-Type' = 'application/json' }
$body = @{ command = 'say Hello from API!' } | ConvertTo-Json
Invoke-RestMethod -Method Post -Uri "http://:/api/server//send_command" -Headers $headers -Body $body
{# --- HTTP API Link --- #}
send-command
requires seperate start method (no yet available)