bedrock-server-manager

A comprehensive CLI for managing Minecraft Bedrock servers.

This tool provides a full suite of commands to install, configure, manage, and monitor Bedrock dedicated server instances.

If run without any arguments, it launches a user-friendly interactive menu to guide you through all available actions.

bedrock-server-manager [OPTIONS] COMMAND [ARGS]...

Options

-v, --version

Show the version and exit.

cleanup

Cleans up generated application files, such as logs and Python bytecode cache.

This maintenance command helps keep the project directory and application data areas tidy by removing temporary or accumulated files. At least one of the cleanup flags (–cache or –logs) must be provided for the command to perform an action.

Log Cleanup Behavior:

When –logs is specified, this command will delete .log files from the configured log directory. Crucially, it preserves the single most recent log file, ensuring that the latest operational logs are not accidentally deleted.

Raises:
click.Abort: If log cleaning (–logs) is requested but no valid log

directory can be determined (neither specified via –log-dir nor found in settings).

bedrock-server-manager cleanup [OPTIONS]

Options

-c, --cache

Clean up Python bytecode cache files (__pycache__).

-l, --logs

Clean up application log files (.log).

--log-dir <log_dir_override>

Override the default log directory from settings.

generate-password

Generates a bcrypt hash for a given password, for Web UI authentication.

This interactive command securely prompts the user to enter a new password and then confirm it. Upon successful confirmation, it generates a bcrypt hash of the password using the application’s configured passlib.context.CryptContext.

The output is the generated hash, which is intended to be used as the value for the BSM_PASSWORD (or equivalent, based on env_name) environment variable. This variable, along with BSM_USERNAME, secures access to the web interface.

The command provides clear instructions on how to use the generated hash. Input is hidden during password entry for security.

bedrock-server-manager generate-password [OPTIONS]

migrate

Database and settings migration tools.

bedrock-server-manager migrate [OPTIONS] COMMAND [ARGS]...

database

Upgrades the database to the latest version.

bedrock-server-manager migrate database [OPTIONS]

old-config

Migrates settings from environment variables and old formats to the database.

bedrock-server-manager migrate old-config [OPTIONS]

service

Manages the Bedrock Server Manager Web UI application’s service.

This group of commands allows you to manage its integration as an OS-level system service for features like automatic startup.

bedrock-server-manager service [OPTIONS] COMMAND [ARGS]...

configure

Configures the OS-level system service for the Web UI application.

This command allows setting up the Web UI to run as a system service, enabling features like automatic startup on boot/login.

If run without any specific configuration flags (–setup-service, –enable-autostart), it launches an interactive wizard (interactive_web_service_workflow()) to guide the user.

If flags are provided, it applies those settings directly. The command respects system capabilities (e.g., won’t attempt service setup if a service manager isn’t available or pywin32 is missing on Windows).

Calls internal helpers:

  • interactive_web_service_workflow() (if no flags)

  • _perform_web_service_configuration() (if flags are present)

bedrock-server-manager service configure [OPTIONS]

Options

--setup-service

Create or update the system service file for the Web UI.

--enable-autostart, --no-enable-autostart

Enable or disable Web UI service autostart.

-s, --system

Configure as a system-wide service (Linux only, requires sudo).

Default:

False

--username <username>

Username to run the Windows service as.

--password <password>

Password for the user.

disable

Disables the Web UI system service from starting automatically.

Configures the OS service for the Web UI to not start automatically.

Requires a supported service manager (checked by decorator).

Calls API: disable_web_ui_service().

bedrock-server-manager service disable [OPTIONS]

Options

-s, --system

Disable a system-wide service (Linux only, requires sudo).

Default:

False

enable

Enables the Web UI system service for automatic startup.

Configures the OS service for the Web UI (systemd on Linux, Windows Service on Windows) to start automatically when the system boots or user logs in.

Requires a supported service manager (checked by decorator).

Calls API: enable_web_ui_service().

bedrock-server-manager service enable [OPTIONS]

Options

-s, --system

Enable a system-wide service (Linux only, requires sudo).

Default:

False

remove

Removes the Web UI system service definition from the OS.

Danger

This is a destructive operation. The service definition will be deleted from the system.

Prompts for confirmation before proceeding. Requires a supported service manager (checked by decorator).

Calls API: remove_web_ui_service().

bedrock-server-manager service remove [OPTIONS]

Options

-s, --system

Remove a system-wide service (Linux only, requires sudo).

Default:

False

status

Checks and displays the status of the Web UI system service.

Reports whether the service definition exists, if it’s currently active (running), and if it’s enabled for autostart.

Requires a supported service manager (checked by decorator).

Calls API: get_web_ui_service_status().

bedrock-server-manager service status [OPTIONS]

Options

-s, --system

Check status of a system-wide service (Linux only, requires sudo).

Default:

False

setup

Run an interactive setup to configure the manager.

bedrock-server-manager setup [OPTIONS]

web

Manages the Bedrock Server Manager Web UI application.

This group of commands allows you to start and stop the web server, and to manage its integration as an OS-level system service for features like automatic startup.

bedrock-server-manager web [OPTIONS] COMMAND [ARGS]...

start

Starts the Bedrock Server Manager web UI.

This command launches the Uvicorn server that hosts the FastAPI web application. It can run in ‘direct’ mode (blocking the terminal, useful for development or when managed by an external process manager) or ‘detached’ mode (running in the background as a new process).

The web server’s listening host(s) and debug mode can be configured via options.

Calls API: start_web_server_api().

bedrock-server-manager web start [OPTIONS]

Options

-H, --host <hosts>

Host address to bind to. Use multiple times for multiple hosts.

-d, --debug

Run in Flask’s debug mode (NOT for production).

-m, --mode <mode>

Run mode: ‘direct’ blocks the terminal, ‘detached’ runs in the background.

Default:

'direct'

Options:

direct | detached

stop

Stops a detached Bedrock Server Manager web UI process.

This command attempts to find and terminate a web server process that was previously started in ‘detached’ mode. It typically relies on a PID file to identify the correct process.

This command does not affect web servers started in ‘direct’ mode or those managed by system services.

Calls API: stop_web_server_api().

bedrock-server-manager web stop [OPTIONS]