Skip to content

bunkeriot/BunkerM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

113 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

BunkerM Logo

BunkerM - Mosquitto MQTT Management Platform

The world's first all-in-one, self-hosted MQTT broker manager with built-in AI assistant, smart anomaly detection, and local automation agents.

Documentation

Docker Pulls GitHub Stars License Latest Release

Reddit Community LinkedIn X (Twitter)

Donate via PayPal


πŸ“‹ Table of Contents


πŸ” What is BunkerM?

BunkerM is a free, open-source, containerized MQTT management platform. It bundles Eclipse Mosquitto with a full-featured web dashboard, packaging everything into a single Docker container β€” one command to get a production-ready MQTT broker with a management UI.

On top of the core broker management, BunkerM includes a local statistical engine (smart anomaly detection), a local automation engine (schedulers and watchers), and a local AI engine (LM Studio integration) β€” all running entirely inside your container. BunkerAI is the optional cloud AI layer that adds a more powerful natural-language assistant reachable via Telegram, Slack, or the built-in web chat.

What you get out of the box:

  • Pre-configured Eclipse Mosquitto broker (MQTT 3.1.1 + 5)
  • Web-based ACL management β€” clients, roles, groups, topic permissions
  • Real-time monitoring dashboard, connected clients, and event logs
  • MQTT Explorer β€” live topic tree with publish-from-browser
  • Message History & Replay β€” every MQTT message stored locally in SQLite, searchable and replayable
  • Statistical anomaly detection (Z-score, EWMA, spike, silence detectors)
  • Local automation agents β€” cron schedulers and condition-based watchers
  • Local LLM AI assistant via LM Studio β€” fully private, no cloud required
  • AWS IoT Core and Azure IoT Hub bridge configuration
  • Optional BunkerAI subscription β€” cloud AI assistant with Telegram, Slack, and unlimited interactions

πŸš€ Quick Start

Prerequisites

Minimal β€” one command

docker run -d -p 1900:1900 -p 2000:2000 bunkeriot/bunkerm:latest

Open http://localhost:2000 and set up your first Admin account.

Port Service
1900 MQTT broker
2000 Web UI

Default MQTT credentials: username bunker / password bunker


Persistent deployment (recommended)

docker run -d \
  -p 1900:1900 \
  -p 2000:2000 \
  -v mosquitto_data:/var/lib/mosquitto \
  -v mosquitto_conf:/etc/mosquitto \
  -v auth_data:/data \
  bunkeriot/bunkerm:latest

Remote access

docker run -d \
  -p 1900:1900 \
  -p 2000:2000 \
  -e HOST_ADDRESS=<YOUR_IP_OR_DOMAIN> \
  bunkeriot/bunkerm:latest

Docker Compose

services:
  bunkerm:
    image: bunkeriot/bunkerm:latest
    ports:
      - "1900:1900"
      - "2000:2000"
    volumes:
      - mosquitto_data:/var/lib/mosquitto
      - mosquitto_conf:/etc/mosquitto
      - auth_data:/data
    environment:
      - HOST_ADDRESS=localhost          # change to your IP/domain for remote access
      # - BUNKERAI_API_KEY=bkai_...     # optional: connect to BunkerAI
    restart: unless-stopped

volumes:
  mosquitto_data:
  mosquitto_conf:
  auth_data:

First steps after launch

  1. Open http://localhost:2000 and create your Admin account (first-time setup wizard)
  2. Go to ACL β†’ Clients and create an MQTT client with a username and password
  3. Connect your MQTT device or client to localhost:1900 using those credentials
  4. Explore the Dashboard to see live broker stats

⭐ Core Features

Broker Dashboard

Real-time overview of your broker health:

  • Connected clients count and history
  • Message publish/receive rates
  • Byte throughput (in/out)
  • Subscription and retained message counts
  • Recent MQTT connection events (connect, disconnect, subscribe, publish)

πŸ”’ ACL & Client Management

Full dynamic security management powered by Mosquitto's Dynamic Security plugin:

Client Management

  • Create, update, and delete MQTT clients
  • Set credentials (username + password hash)
  • Enable / disable clients individually
  • Assign clients to groups

Role Management

  • Create roles with fine-grained topic ACL rules
  • Define allow / deny permissions per topic
  • Wildcard topic support (#, +)
  • ACL types: publishClientSend, subscribeLiteral, and more

Group Management

  • Create groups and assign roles to them
  • Add / remove clients from groups
  • Set role priorities within groups

ACL Import / Export

Back up and restore your complete security configuration in one click:

  • Export β€” downloads a JSON snapshot of all clients (including password hashes), roles, and groups
  • Import β€” upload a previously exported JSON to fully restore your configuration; the broker reloads automatically
  • Available in ACL β†’ Clients next to the Create Client button

πŸ”­ MQTT Explorer

Inspect and interact with live broker traffic directly from the browser:

  • Live topic tree β€” full hierarchy of all active topics, refreshed every 3 seconds
  • Per-topic metadata β€” latest value, message count, QoS, retain flag, last-updated timestamp
  • Search & filter β€” instantly narrow the tree by typing a topic path fragment
  • Publish panel β€” send messages from the browser: pick a client, enter a topic, choose payload type (RAW / JSON / XML with built-in validation), set QoS and retain flag

πŸ“Ό Message History & Replay

Every MQTT message published through your broker is automatically captured and stored in a local SQLite database β€” no configuration required. History starts accumulating from the moment BunkerM starts, and it keeps running silently in the background.

What gets stored

All messages published to the broker are captured, excluding internal $SYS/ diagnostics. Each record stores:

Field Description
Timestamp Millisecond-precision UTC time of receipt
Topic Full topic path
Payload Message content (binary payloads stored as base64)
QoS Quality of service level (0 / 1 / 2)
Retain flag Whether the message was retained
Size Payload size in bytes

Querying history

Navigate to Logs β†’ Message History in the sidebar to access:

  • Stats overview β€” total stored messages, unique topic count, database size on disk, and retention window
  • Topic filter β€” dropdown populated from all topics seen by the broker, with message counts
  • Free-text search β€” matches against topic path or payload content
  • Paginated table β€” 100 messages per page, newest-first, with full metadata

Replay

Every message row has a Replay button. Click it to open a dialog pre-filled with the original topic and payload. You can edit the payload, choose QoS and retain flag, then publish directly back to the broker β€” useful for retesting device logic or simulating conditions.

Retention limits

By default, BunkerM keeps up to 50,000 messages and 7 days of history. Older messages are pruned automatically. These limits are configurable via environment variables:

-e HISTORY_MAX_MESSAGES=50000   # max records in the database
-e HISTORY_MAX_AGE_DAYS=7       # max age of any stored message

Storage

History is stored in a SQLite file at /var/lib/history/history.db inside the container. To persist history across container restarts, mount a Docker volume:

docker run -d \
  -p 1900:1900 -p 2000:2000 \
  -v history_data:/var/lib/history \
  bunkeriot/bunkerm:latest

The Docker Compose file already includes this volume by default.


πŸ€– Smart Anomaly Detection

A fully local statistical engine that continuously monitors your MQTT traffic and raises alerts when behavior deviates from the baseline. No cloud dependency β€” everything runs inside the container.

How it works

The engine polls the broker every 10 seconds, builds statistical baselines over 1-hour and 24-hour sliding windows, and runs four independent detectors every 60 seconds:

Detector What it catches
Z-score Values that deviate more than 3Οƒ from the rolling mean
EWMA Gradual drift via exponentially weighted moving average
Spike Sudden burst in message rate (>3Γ— the 30-minute baseline)
Silence Topics that stop publishing for longer than 2Γ— their normal interval

Alerts are generated with severity levels: low / medium / high / critical.

Monitoring pages (Monitoring sidebar section)

Page Description
Metrics Per-topic baselines β€” mean, std dev, message count for 1h and 24h windows
Anomalies All detected anomalies with entity, type, severity, and raw detection context
Alerts Actionable alert feed with severity badges and one-click Acknowledge

βš™οΈ Agents β€” Schedulers & Watchers

A local automation engine built into every BunkerM instance. Agents run entirely on your infrastructure β€” no cloud connectivity required after creation.

Schedulers

Publish MQTT messages on a recurring cron schedule:

  • Full cron expression support with built-in presets (every minute, hourly, daily, weekly, etc.)
  • Live cron preview showing next 5 run times
  • Tracks last fired time and total execution count
  • Examples: "turn on pump every day at 06:00", "send heartbeat every 5 minutes"

Watchers

Monitor MQTT topics and trigger actions when conditions are met:

  • Condition operators: > < >= <= == != contains starts_with any_change
  • JSON field extraction using dot-path notation (sensors.temperature)
  • Response message templates with {{value}}, {{topic}}, {{timestamp}}
  • Cooldown enforcement (minimum time between triggers)
  • One-shot mode (auto-delete after first trigger)
  • Real-time notification bell in the dashboard (Server-Sent Events, sub-2s delivery)

Limits

Community BunkerAI Starter BunkerAI Pro / Team
Agents (schedulers + watchers combined) Up to 2 Up to 2 Unlimited
Local execution (no cloud required) βœ“ βœ“ βœ“
Agents kept after downgrade / offline βœ“ βœ“ βœ“
AI-created agents via natural language βœ— βœ“ βœ“
Telegram / Slack watcher notifications βœ— βœ— βœ“

Activation: A one-time free activation is required to unlock agent creation. BunkerM attempts this automatically on first start. For air-gapped deployments, create a free account at bunkerai.dev and paste your Community key into the dashboard β€” no ongoing internet connection required after that.


πŸ–₯️ Local LLM β€” Private AI via LM Studio

BunkerM Community includes a built-in Local LLM integration. Connect any model running in LM Studio to get a fully private, offline-capable AI assistant that understands your live broker state and can take actions on your behalf β€” no cloud account or subscription required.

How it works

On every chat message, BunkerM injects a live snapshot of your broker (connected clients, active topics with their latest payloads, broker stats, registered ACL clients) directly into the model's context. The model can then respond accurately to questions about your live MQTT environment and execute actions through BunkerM's internal APIs.

Capabilities

  • Plain-English device control β€” say "turn off my room light" and the AI figures out the right topic and payload from your annotations and context, then publishes it
  • ACL management β€” create, enable, disable, delete MQTT clients and batch-create multiple clients at once
  • Live topic queries β€” "What is the current value of the door sensor?" returns the actual retained payload
  • Broker awareness β€” ask about connected clients, message rates, subscriptions, and uptime

Setup

  1. Install LM Studio and load a model (Qwen2.5-7B-Instruct or Llama-3-Instruct recommended)
  2. Start the LM Studio local server (default port: 1234)
  3. In BunkerM go to Settings β†’ Integrations β†’ Local LLM, enter http://host.docker.internal:1234, fetch models, and save
  4. Switch to Local LLM mode in AI β†’ Chat

Full guide: bunkerai.dev/docs/local-llm


🧠 BunkerAI β€” Cloud AI Assistant

BunkerAI is the optional cloud AI layer for BunkerM. Subscribe at bunkerai.dev to unlock a more powerful natural-language assistant with cross-channel memory, Telegram and Slack integrations, and higher interaction limits.

BunkerM handles your local broker. BunkerAI handles the cloud intelligence.

Capabilities

  • READ β€” query live broker stats, topic payloads, connected clients, anomaly alerts, and topic annotations
  • WRITE β€” publish MQTT messages by describing the intent ("turn on light 1", "set thermostat to 22Β°C")
  • CREATE β€” build schedulers and watchers through natural conversation ("alert me if temperature exceeds 80")
  • MANAGE β€” full ACL management, broker configuration, and agent control through plain English

Channels

Channel Starter Pro / Team
Web Chat (built-in at AI β†’ Chat) βœ“ βœ“
Telegram (message your dedicated bot) βœ— βœ“
Slack (OAuth workspace connection) βœ— βœ“

Configure connectors at Settings β†’ Cloud in the dashboard.

Plans

Plan Monthly Interactions / month Channels Agents
Starter $5 100 Web Chat only Up to 2
Pro $15 500 Web Chat + Telegram + Slack Unlimited
Team $49 2,000 Web Chat + Telegram + Slack Unlimited
Business Custom Custom All channels Unlimited

One interaction = one complete AI request/response cycle (may involve multiple internal tool calls). Manage your subscription and credit balance at Settings β†’ Credits in the BunkerM dashboard.


☁️ Cloud Bridge Integrations

Forward MQTT traffic to major cloud providers:

AWS IoT Core Bridge

  • Configure AWS IoT endpoint and region
  • Upload device certificates directly from the UI
  • Define topic mapping rules (local ↔ cloud)
  • Secure TLS mutual authentication

Azure IoT Hub Bridge

  • Configure IoT Hub connection string
  • SAS token management and rotation
  • Device-to-cloud and cloud-to-device topic routing

πŸ“Š Feature Comparison

Infrastructure & Scaling

Feature Community Pro Enterprise
Max MQTT Clients Unlimited Unlimited Unlimited
High Availability & Clustering βœ— βœ— βœ“
Cluster Management UI βœ— βœ— βœ“
Load Balancer βœ— βœ— βœ“
Enhanced HA Monitoring βœ— βœ— βœ“

Security

Feature Community Pro Enterprise
Client Authentication (Username + Password) βœ“ βœ“ βœ“
Dynamic Security Plugin βœ“ βœ“ βœ“
ACLs (Client, Role, Group levels) βœ“ βœ“ βœ“
ACL Import / Export (JSON backup & restore) βœ“ βœ“ βœ“
Self-Signed SSL βœ“ βœ“ βœ“
OAuth 2.0 / JWT Authentication βœ“ βœ“ βœ“
Offline Authentication βœ— βœ“ βœ“
Anonymous Client Access βœ— βœ“ βœ“
Client Certificate Authentication βœ— βœ— βœ“
LDAP Authentication βœ— βœ— βœ“
HTTPS/TLS Termination βœ— βœ— βœ“
Audit Trail βœ— βœ— On-demand
Custom CAs βœ— βœ— On-demand
PSK Authentication βœ— βœ— On-demand

Monitoring & AI

Feature Community Pro Enterprise
Broker Dashboard & Stats βœ“ βœ“ βœ“
Connected Clients Listing βœ“ βœ“ βœ“
Real-time MQTT Event Logs βœ“ βœ“ βœ“
Message History & Replay (50K messages, 7d) βœ“ βœ“ βœ“
Statistical Anomaly Detection βœ“ βœ“ βœ“
AI Metrics Engine (1h / 24h baselines) βœ“ βœ“ βœ“
Smart Alert Feed with Severity Levels βœ“ βœ“ βœ“
BunkerAI natural-language assistant βœ— BunkerAI plan BunkerAI plan
Anomaly alert forwarding (Telegram / Slack) βœ— BunkerAI plan BunkerAI plan
Behavioral Security Analysis βœ— βœ— βœ“
AI-generated ACL Recommendations βœ— βœ— βœ“

Agents & Automation

Feature Community / Starter Pro / Team Enterprise
MQTT Scheduler (cron-based publishes) Up to 2 Unlimited Unlimited
MQTT Watcher (condition-based alerts) Up to 2 Unlimited Unlimited
Local agent execution (no cloud required) βœ“ βœ“ βœ“
Agents kept after downgrade / offline βœ“ βœ“ βœ“
Real-time notification bell (SSE) βœ“ βœ“ βœ“
AI-created agents via natural language βœ— βœ“ βœ“
Telegram / Slack watcher notifications βœ— βœ“ βœ“

Protocol Support

Feature Community Pro Enterprise
MQTT 3.1.1 βœ“ βœ“ βœ“
MQTT 5 βœ“ βœ“ βœ“
MQTT over TLS (MQTTS) βœ“ βœ“ βœ“
WebSockets (WS) βœ“ βœ“ βœ“
WebSockets over TLS (WSS) βœ“ βœ“ βœ“
QoS 0 / 1 / 2 βœ“ βœ“ βœ“
Retained Messages βœ“ βœ“ βœ“
Last Will Messages βœ“ βœ“ βœ“
Persistent Sessions βœ“ βœ“ βœ“
Sparkplug βœ— βœ— βœ“

Platform Support

Feature Community Pro Enterprise
Docker (Linux, Windows, macOS, Raspberry Pi) βœ“ βœ“ βœ“
Kubernetes βœ“ βœ“ βœ“
OpenShift βœ“ βœ“ βœ“
ARM / RPi native βœ“ βœ“ βœ“
White Labeling βœ— βœ— βœ“

πŸ’° BunkerM Community vs BunkerAI

BunkerM Community is the free, self-hosted MQTT management platform. It is open-source and always will be.

BunkerAI is a separate, optional subscription service that adds AI intelligence to your BunkerM instance. You do not need BunkerAI to run BunkerM β€” it simply adds a natural-language assistant and cross-channel notifications on top.

Pricing philosophy

Pay for AI intelligence. Agents are yours to keep.

  • Agents (schedulers + watchers) are a local BunkerM feature. They run on your infrastructure regardless of any subscription status. Once created, agents keep executing even if you cancel BunkerAI or run out of interactions.
  • BunkerAI is billed monthly by interaction quota. When your quota runs out, the AI assistant pauses β€” your broker, agents, and all local features continue unaffected.
  • Subscribing to Pro or Team removes the 2-agent ceiling and unlocks Telegram/Slack channels in addition to the larger interaction quota.

This model is designed for self-hosted, industrial, and air-gapped environments where production automations cannot be held hostage by a billing event.

Activation

BunkerM Community requires a one-time free activation to enforce the 2-agent limit:

  1. BunkerM silently attempts auto-activation on first start.
  2. For air-gapped deployments, create a free account at bunkerai.dev, copy your Community key, and paste it into the dashboard.
  3. The license key is stored locally and verified offline using cryptographic signatures β€” BunkerAI does not need to be reachable again after activation.

πŸ› οΈ Troubleshooting

Problem Solution
Can't reach the web UI Check that port 2000 is not in use: docker ps and lsof -i :2000
MQTT clients can't connect Verify port 1900 is mapped; check client credentials in ACL β†’ Clients
Container won't start Run docker logs <container_id> to inspect errors
Agents not firing Confirm the container has internet access for one-time activation; check agent status in AI β†’ Agents
BunkerAI not connecting Verify BUNKERAI_API_KEY env var is set correctly; check Settings β†’ Cloud status card
SSL/TLS errors Ensure certificates are valid and paths are correctly mounted

❀️ Support the Project

BunkerM is built and maintained by a solo developer. If it saves you time or powers your IoT projects, consider supporting its development:

PayPal

Your support funds:

  • New feature development
  • Bug fixes and security patches
  • Documentation and guides
  • Community support

πŸ”— Contact & Links

🌐 Website bunkerai.dev
πŸ“§ Support support@bunkerai.dev
πŸ’Ό LinkedIn mehdi-idrissi
πŸ™ GitHub bunkeriot/BunkerM
πŸ’¬ Discussions GitHub Discussions
🐦 X / Twitter @BunkerIoT
🟠 Reddit r/BunkerM

πŸ“œ License

This project is licensed under the Apache License 2.0 β€” free to use, modify, and distribute, including for commercial purposes.

Full license text β†’


Made with ❀️ for the IoT community · bunkerai.dev

About

πŸš€ BunkerM: Eclipse Mosquitto MQTT management platform, featuring dynamic security, MQTT ACL management, monitoring,and AI integrations

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

 
 
 

Contributors