Managed MQTT Cloud

BYOC MQTT Broker: Bring Your Own Cloud Explained

A BYOC MQTT broker runs in your cloud account but is operated by a provider. Learn how the model works, the responsibility split, and how to prepare your account for it.

BYOC MQTT broker illustration showing a broker running inside a customer's cloud account with a provider managing it from outside
Run this on your own MQTT brokerGet a private, managed MQTT broker on the Free plan and start from ready-made code samples.
Try it free Code samples No card required

A BYOC MQTT broker runs inside your own cloud account while a specialist provider handles the operational work. This article explains how the bring-your-own-cloud model works, where responsibilities sit, when it is the right choice over shared or dedicated hosting, and how to prepare your account before rollout.

What Is a BYOC MQTT Broker?

"Bring your own cloud" describes a deployment model in which the software runs on infrastructure you own and pay for, typically in a cloud account or subscription under your organization's control, while the vendor manages it. The broker's virtual machines or containers, network, disks and load balancers live in your account. The provider's engineers or automation deploy, configure, upgrade and monitor the broker through access you grant.

Compare that with the two more familiar hosting options:

  • Shared (serverless) hosting. Many customers share a cluster run in the provider's account. You get endpoints and credentials in minutes and pay nothing for idle capacity, but you do not choose the underlying infrastructure.
  • Dedicated hosting. You get your own isolated cluster, still in the provider's account. Performance is not shared with anyone, but the infrastructure is still owned by the vendor.
  • BYOC. Your own isolated broker, in your own account. Message traffic flows through infrastructure you control, under your cloud security policies and billing.

If you are new to how brokers fit into an IoT system, what an MQTT broker does covers the basics.

Why Teams Choose Bring Your Own Cloud

Data Control and Compliance

The most common reason is data control. Some organizations have a policy that production data, including device telemetry, must stay inside accounts they own, where their own logging, encryption keys, network controls and audits apply. A BYOC deployment lets the MQTT layer meet that policy without the team having to become broker operators. Our guide to MQTT data residency goes deeper on location and regulatory concerns.

Network Proximity

When your consumers, such as stream processors, databases and analytics services, already run in a particular cloud account and region, placing the broker next to them keeps traffic on private networking. Subscribers inside your virtual network can connect without crossing the public internet, while devices still reach a public endpoint.

Using Existing Cloud Commitments

Many companies have negotiated commitments with a cloud provider. Running the broker's infrastructure in your account means that compute and network spend counts toward those commitments and appears in your existing cost reports.

Security Review Is Simpler

Security teams often find it easier to approve infrastructure that sits in an account they already monitor, under policies they already enforce, than to assess a new third-party environment from scratch.

Who Owns What in a BYOC Deployment

The exact split is set by your agreement with the provider, but the typical pattern looks like this:

Area You (account owner) Provider (operator)
Cloud account, billing, organization policies Yes No
Network design, IP ranges, peering, firewall policy Approves and owns Proposes and implements broker-specific parts
Broker installation and configuration Reviews Yes
Upgrades and security patches for the broker Approves maintenance windows Yes
TLS certificates for broker endpoints Domain decisions Issuance and renewal
Broker health monitoring and incident response Escalation contact Yes
Device firmware and client applications Yes No
Data consumers and downstream integrations Yes No

The key idea: you keep ownership and visibility of the infrastructure, and the provider keeps the operational burden. You should agree in writing on access scope, maintenance windows, escalation paths and how access is revoked.

BYOC vs Shared, Dedicated and Self-Hosted

Criterion Shared serverless Dedicated BYOC Self-hosted
Where infrastructure runs Provider account Provider account Your account Your account or data center
Who operates the broker Provider Provider Provider Your team
Isolation from other customers Logical Physical cluster Physical, in your account Full
Time to first connection Minutes Short Longer (account setup) Depends on your team
Infrastructure bill Included in plan Included in plan Your cloud bill plus service Your cloud or hardware bill
Your operational effort Very low Very low Low High

BYOC sits between dedicated hosting and self-hosting. If you are not sure you need it, a dedicated MQTT broker often gives enough isolation with less setup. If you want full control and have the people to run it, compare the effort in self-hosted vs managed MQTT broker.

How ConnectMQ BYOC Works

ConnectMQ offers BYOC as one of its plans: the broker runs in your cloud account and is managed for you. It behaves the same way as on the other plans. Clients connect using MQTT 3.1.1 or MQTT 5.0 on the standard ports, TCP 1883, TLS 8883, WebSocket 8083 and Secure WebSocket 8084 with path /mqtt, so device firmware and applications written for a Serverless or Dedicated broker do not need code changes, only new connection details.

The platform features stay available: generated credentials with client IDs bound to them, multi-tenant isolation and per-plan quotas, flood protection, IP blocking after repeated failed logins, MQTT 5 features such as shared subscriptions, session expiry and message expiry, and Sparkplug B decoding with republishing into ISA-95 topics for industrial projects.

Because BYOC depends on your cloud environment, confirm the supported cloud providers, regions and access model directly with the team before you plan the rollout.

Preparing Your Cloud Account

Whichever provider you use, the same preparation shortens BYOC onboarding:

  1. Create a dedicated account or subscription for the broker, so its permissions, billing and audit logs are separated from other workloads.
  2. Pick the region based on where devices connect from, where consumers run, and any residency requirements.
  3. Reserve network ranges that will not collide with your existing VPCs or on-premises networks if you plan peering or VPN connectivity.
  4. Check service quotas for compute instances, load balancers and public IP addresses in that region.
  5. Define the access model: a scoped role the provider can assume, with logging enabled, and a documented way to revoke it.
  6. Decide on DNS for broker endpoints and who manages the records.
  7. Agree on maintenance windows and on how you are notified before upgrades.
  8. Set up cost tags so broker infrastructure is visible in your reports.

Validate Your Clients Before Migration

While the BYOC environment is being prepared, you can test client behavior against the public MQTT test broker and then against a free private broker. This Python example uses paho-mqtt 2.x and connects over TLS. Replace the host and credentials with your BYOC endpoint later; nothing else changes.

import ssl
import paho.mqtt.client as mqtt

HOST = "broker.connectmq.com"   # replace with your BYOC endpoint
PORT = 8883
CLIENT_ID = "YOUR_CLIENT_ID"

def on_connect(client, userdata, flags, reason_code, properties):
    print("Connected:", reason_code)
    client.subscribe("connectmq/demo/byoc-7c21/#", qos=1)
    client.publish("connectmq/demo/byoc-7c21/status", "online", qos=1, retain=True)

def on_message(client, userdata, msg):
    print(msg.topic, msg.payload.decode())

client = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2, client_id=CLIENT_ID,
                     protocol=mqtt.MQTTv5)
# For a private broker, uncomment:
# client.username_pw_set("YOUR_USERNAME", "YOUR_PASSWORD")
client.tls_set(cert_reqs=ssl.CERT_REQUIRED)
client.on_connect = on_connect
client.on_message = on_message
client.connect(HOST, PORT, keepalive=60)
client.loop_forever()

Run the same script against each environment and keep the topic structure identical. When the BYOC broker is live, switching is a configuration change.

Common Pitfalls

  • Over-broad access for the operator. Grant only what the broker needs and log every action.
  • Forgetting egress costs. If devices or consumers sit in other regions or clouds, data transfer fees appear on your bill.
  • Blocking upgrades. Policies that prevent the operator from patching create the same risk as an unmaintained self-hosted broker.
  • No staging environment. Keep a small non-production broker, for example on the free Serverless plan, for firmware and integration testing.

Get Started with ConnectMQ

You can explore the platform today on the free Serverless plan, with no credit card, at app.connectmq.com. Build and test your devices there, then talk to the team about moving to BYOC when your data-control requirements call for it. For a broader view of hosting options, read the cloud MQTT broker guide or compare plans on the fully managed MQTT service overview.

Frequently Asked Questions

Is a BYOC MQTT broker the same as self-hosting?

No. The infrastructure is in your account, but the provider installs, upgrades and monitors the broker. With self-hosting, your own team does all of that.

Do my devices need different firmware for BYOC?

Not if the broker speaks standard MQTT. On ConnectMQ, BYOC uses the same protocols and ports as the other plans, so you only change hostname and credentials.

Who pays for the cloud infrastructure in BYOC?

The infrastructure appears on your own cloud bill, and the management service is billed separately by the provider. Confirm the exact arrangement with your provider.

When is BYOC overkill?

If you have no policy requiring data to stay in your own account, a shared or dedicated managed broker is faster to start and simpler to run.

Related articles

All articles →

Your private MQTT broker is a few clicks away

Create an account, get your broker credentials and connect your first device — no servers to install, patch or scale.