All configuration is driven by environment variables. Use a .env file in development (Bun loads it automatically) or set variables directly in your shell / container environment.
An annotated .env.example is included in the repository.
The HTTP server serves health probes, the debug API, webhook endpoints, and optionally the web UI. Set HTTP_PORT=0 to disable it entirely (also disables webhooks and the web UI).
Variable
Default
Description
HTTP_PORT
8080
Port for the HTTP server. Set to 0 to disable.
HTTP_TOKEN
(empty)
Bearer token for debug/webhook endpoints. Empty = no authentication.
Automatically discovers all Zigbee2MQTT devices and tracks their live state. Required for device_state, device_joined, and device_left trigger types, as well as the Devices tab in the CLI dashboard and web UI.
Variable
Default
Description
DEVICE_REGISTRY_ENABLED
false
Enable automatic Zigbee2MQTT device discovery and state tracking
DEVICE_REGISTRY_PERSIST
false
Persist the device list and last-known device states to disk on shutdown and restore them on startup
DEVICE_REGISTRY_FILE_PATH
./device-registry.json
Path to the device registry JSON persistence file
See Device Registry for full details including nice names, device triggers, and persistence.