bambulab-metrics-exporter

bambulab-metrics-exporter

Docker app from BlackBush's Repository

Overview

Prometheus exporter for Bambu Lab printers on Unraid. Exposes /metrics, /health, and /ready. Quick setup: 1) Set required values: BAMBULAB_TRANSPORT, BAMBULAB_SERIAL, BAMBULAB_SECRET_KEY (example: openssl rand -base64 48). 2) cloud_mqtt: set BAMBULAB_CLOUD_EMAIL (code/token fields can be left empty for first run and may auto-populate). 3) local_mqtt: set BAMBULAB_HOST and BAMBULAB_ACCESS_CODE. Then start the container and open WebUI for status. Scrape /metrics from Prometheus.

Runtime arguments

Web UI
http://[IP]:[PORT:9109]/
Network
bridge
Shell
sh
Privileged
false

Template configuration

Web UI PortPorttcp

Exporter HTTP port

Target
9109
Default
9109
Value
9109
Config DirPathrw

Persistent config and encrypted credentials

Target
/config/bambulab-metrics-exporter
Default
/mnt/user/appdata/bambulab-metrics-exporter
Value
/mnt/user/appdata/bambulab-metrics-exporter
Listen HostVariable

HTTP bind host

Target
LISTEN_HOST
Default
0.0.0.0
Value
0.0.0.0
Listen PortVariable

HTTP bind port

Target
LISTEN_PORT
Default
9109
Value
9109
TransportVariable

Select transport mode

Target
BAMBULAB_TRANSPORT
Default
cloud_mqtt|local_mqtt
Value
cloud_mqtt
Printer SerialVariable

Printer device serial (required)

Target
BAMBULAB_SERIAL
Secret KeyVariable

Strong key for encrypted credentials. Generate example: openssl rand -base64 48

Target
BAMBULAB_SECRET_KEY
Cloud EmailVariable

Used only when Transport=cloud_mqtt. Recommended/required for automatic cloud auth flow.

Target
BAMBULAB_CLOUD_EMAIL
Cloud One-Time CodeVariable

Used only when Transport=cloud_mqtt. Optional verification code from email; if empty, startup can trigger code flow and ask for restart.

Target
BAMBULAB_CLOUD_CODE
Cloud User IDVariable

Used only when Transport=cloud_mqtt. Usually auto-filled by startup auth process; can stay empty on first run.

Target
BAMBULAB_CLOUD_USER_ID
Cloud Access TokenVariable

Used only when Transport=cloud_mqtt. Usually auto-filled by startup auth process; leave empty unless setting manually.

Target
BAMBULAB_CLOUD_ACCESS_TOKEN
Cloud Refresh TokenVariable

Used only when Transport=cloud_mqtt. Auto-filled when available by startup auth process; optional for manual setup.

Target
BAMBULAB_CLOUD_REFRESH_TOKEN
Cloud MQTT HostVariable

Cloud MQTT host

Target
BAMBULAB_CLOUD_MQTT_HOST
Default
us.mqtt.bambulab.com
Value
us.mqtt.bambulab.com
Cloud MQTT PortVariable

Cloud MQTT port

Target
BAMBULAB_CLOUD_MQTT_PORT
Default
8883
Value
8883
Local Host/IPVariable

Used only when Transport=local_mqtt. Required printer IP/hostname.

Target
BAMBULAB_HOST
Local Access CodeVariable

Used only when Transport=local_mqtt. Required LAN access code from printer settings.

Target
BAMBULAB_ACCESS_CODE
Local MQTT PortVariable

Used only when Transport=local_mqtt. Usually keep default 8883.

Target
BAMBULAB_PORT
Default
8883
Value
8883
Local MQTT UsernameVariable

Used only when Transport=local_mqtt. Usually keep default bblp.

Target
BAMBULAB_USERNAME
Default
bblp
Value
bblp
PUIDVariable

User ID to run container as (Unraid: usually 99)

Default
99
Value
99
PGIDVariable

Group ID to run container as (Unraid: usually 100)

Default
100
Value
100
UMASKVariable

File creation mask

Default
002
Value
002
Config Dir EnvVariable

Internal config path

Target
BAMBULAB_CONFIG_DIR
Default
/config/bambulab-metrics-exporter
Value
/config/bambulab-metrics-exporter
Credentials FileVariable

Encrypted credentials filename

Target
BAMBULAB_CREDENTIALS_FILE
Default
credentials.enc.json
Value
credentials.enc.json
Polling IntervalVariable

Polling interval in seconds

Target
POLLING_INTERVAL_SECONDS
Default
10
Value
10
Request TimeoutVariable

Request timeout in seconds

Target
REQUEST_TIMEOUT_SECONDS
Default
8
Value
8
Log LevelVariable

DEBUG/INFO/WARNING/ERROR

Target
LOG_LEVEL
Default
INFO
Value
INFO
Printer Name LabelVariable

Prometheus label value; leave empty to auto-fill from printer serial

Target
PRINTER_NAME

Details

Repository
ghcr.io/theblackbush/bambulab_metrics_exporter:latest
Last Updated2026-05-31
First Seen2026-03-30

Run bambulab-metrics-exporter on Unraid.

bambulab-metrics-exporter is listed in Community Apps for Unraid OS. Explore Unraid to build a flexible home server, NAS, or homelab.