Skip to content

Run the broker in your own cloud (BYOC) ​

With Bring Your Own Cloud (BYOC) you run a ConnectMQ MQTT broker node inside your own cloud account (AWS, Azure, Google Cloud or any container host), while ConnectMQ keeps managing authentication, access control, quotas and usage reporting. Your message traffic stays on infrastructure you control.

How BYOC works ​

text
 Your devices / apps                  Your cloud account                       ConnectMQ
 sensors, PLCs,      MQTT / TLS   ┌──────────────────────────┐   HTTPS   ┌──────────────────┐
 back ends, browsers ───────────► │  connectmqcom/broker     │ ────────► │  Central API     │
                     ◄─────────── │  (container)             │ ◄──────── │  auth, ACL,      │
                                  └──────────────────────────┘           │  quotas, billing │
                                   messages never leave here             └──────────────────┘
  1. On start-up the broker logs in to https://brokerapi.connectmq.com with its Broker ID and Broker Secret Key.
  2. When a client connects, the broker asks the Central API to check the username and password and to return the organization's ACLs and quotas.
  3. Publishes and subscriptions are handled locally. Payloads are not sent to ConnectMQ; only control-plane calls (broker login, client authentication, heartbeats, usage reports) are.

Your users, credentials, ACL policies and plan stay in the ConnectMQ console exactly as on the managed service.

Features ​

  • MQTT 3.1.1 and 5.0 over TCP, TLS, WebSocket and secure WebSocket.
  • MQTT 5 shared subscriptions, isolated per tenant.
  • Per-tenant topic isolation, quotas, rate limiting, flood protection and IP blacklisting.
  • Sparkplug B and ISA-95 / Unified Namespace detection, with automatic Sparkplug B to ISA-95 conversion.
  • Multi-arch image: linux/amd64 and linux/arm64 (AWS Graviton, Azure Ampere, Google Axion/Tau T2A).
  • Runs as a non-root user (UID 1654).

Image: connectmqcom/broker on Docker Hub, also ghcr.io/connectmq/broker. Source of these instructions: connectmq/connectmq-broker-docker.

Before you start ​

You needWhere to get it
Broker IDYour ConnectMQ BYOC subscription, or ConnectMQ support
Broker Secret KeyIssued together with the Broker ID. Keep it in a secret store.
Outbound HTTPS (443) to brokerapi.connectmq.comAllow it in your firewall, NAT and egress rules
Inbound ports for MQTT clientsSee Ports
(optional) a DNS name and TLS certificateFor example mqtt.example.com, from Let's Encrypt, ACM, Key Vault or Certificate Manager

BYOC is arranged per customer: contact sales for a Broker ID and pricing.

One container per Broker ID

A broker node keeps sessions, retained messages and subscriptions in memory. Run exactly one container per Broker ID, and request another Broker ID for each additional node. Configure deployments so the old container stops before the new one starts.

Ports ​

Container portProtocolNotes
1883MQTT over TCPPlain text. Expose only on private networks or behind a TLS-terminating load balancer.
8883MQTT over TLSActive only when a certificate is mounted.
8083MQTT over WebSocketPath /mqtt (or /).
8084MQTT over secure WebSocketActive only when a certificate is mounted.

Serve TLS in the container (mount a certificate) or at a layer-4 load balancer (forward 8883 → 1883 and 8084 → 8083). The load-balancer option lets your cloud renew certificates automatically.

Keep the client's source IP

Use layer-4 (TCP/TLS) load balancers that preserve the client IP. Quotas, flood protection and IP bans work on the client's IP: if every client arrives with the load balancer's IP, one misbehaving client can get everyone banned. HTTP/L7 load balancers (ALB, Application Gateway, Cloud Run, HTTP(S) LB) do not carry raw MQTT and are not supported.

Environment variables ​

VariableDefaultDescription
BROKER_IDrequiredBroker ID issued by ConnectMQ
BROKER_SECRET_KEYrequiredBroker secret issued by ConnectMQ
CENTRAL_API_URLhttps://brokerapi.connectmq.comChange only if ConnectMQ tells you to
PUBLIC_BROKER_ENABLEDtrueAllows anonymous clients under the public quota. Set false for BYOC.
MQTT_PORT / MQTTS_PORT1883 / 8883TCP and TLS ports inside the container
MQTT_WS_PORT / MQTT_WSS_PORT8083 / 8084WebSocket and secure WebSocket ports
SSL_CERTIFICATE_PATH/app/certs/broker.pemPEM (certificate chain + private key) or PFX
SSL_CERTIFICATE_PASSWORD(empty)Password for a PFX file

Volumes ​

PathContents
/app/logsHourly rolling logs per scope (broker, public, each tenant), kept 14 days, plus the persistent IP blacklist. Optional; logs also go to stdout.
/app/certsYour TLS certificate (mount read-only).
/app/broker.json(optional) Full configuration override: quotas, overload protection, flood protection, payload logging.

Sizing ​

WorkloadvCPUMemory
Up to ~1,000 connections, low traffic0.51 GB
Up to ~10,000 connections24 GB
Larger4+8 GB+ (contact ConnectMQ)

Choose where to run it ​

Fully managed MQTT broker for connected devices.