---
title: How to connect an MQTT broker to the HiveMQ Platform
description: "Learn how to connect an MQTT broker to the HiveMQ Platform, deploy it with Docker and test the MQTT connection with simulated data before real devices go live."
date: 2026-12-01
published: 2026-12-01
author: Kudzai Manditereza
tags:
  - HiveMQ Platform
  - MQTT
source: https://www.hivemq.com/blog/connect-mqtt-broker-to-hivemq-platform
---

# How to connect an MQTT broker to the HiveMQ Platform

Before a single machine on your line publishes data, you need to know that the path it will travel works. A failed connection found in a test costs a few minutes, but that same failure found during a production run costs output.

This post, the second in our HiveMQ Platform series, shows how to connect an MQTT broker to the HiveMQ Platform. We deploy a self-managed broker locally with Docker, then push simulated traffic through it to confirm the platform can see the data.

First, a reminder: An [MQTT broker](/blog/mqtt-brokers-beginners-guide/) is the server that receives messages from publishing devices and routes them to every system subscribed to that data. If you're new to MQTT and want to understand how brokers, publishers and subscribers work together, explore our [MQTT Essentials series](/mqtt/). Connecting it to the HiveMQ Platform makes the data flowing through it visible and ready to contextualize.

## Why connect your MQTT broker before you connect your devices?

Connecting the MQTT broker first proves the data path works before production equipment depends on it. In a plant, that order matters. Teams can't afford to troubleshoot connectivity while a line is waiting for data or a shift is relying on a dashboard.

A tested connection gives you a known-good baseline. When real PLCs and sensors start publishing later, any problem points to the device side rather than the broker or platform.

This is the groundwork behind the outcomes manufacturers care about. [Mercedes-Benz](/case-studies/daimler/) keeps critical vehicle testing running across 24 factories on a reliable MQTT foundation.

## How do you deploy a new MQTT broker from the HiveMQ Platform?

You deploy a new broker from Connect, the area of the platform where you manage the brokers and edge instances in your workspace. The platform walks you through each choice and generates everything the broker needs to reach your workspace.

- Open **Connect** and select **Get broker or edge**.
- Choose **Deploy a new broker** rather than connecting an existing deployment.
- Select **HiveMQ Software** to run a self-managed broker in your own environment. The other options are HiveMQ Edge and HiveMQ Cloud.
- Pick a deployment target. The platform supports Docker, Kubernetes, a local install, AWS and Azure. This tutorial uses Docker.
- Under the license section, select **Get a free license**. The platform creates a license for this broker and associates it with your workspace.

![HiveMQ Platform broker deployment page showing Docker, Kubernetes, local install, AWS and Azure options with license details and the generated Docker command](https://a.storyblok.com/f/243938/1d3e237cd2/hivemq-platform-broker-deployment.png)

### What does the HiveMQ platform generate for you?

Once the license is in place, the page shows your license information alongside deployment instructions. These include the Docker command to run the broker and the configuration it needs to connect back to the platform.

There's no manual configuration to write. That matters when you repeat the process at a second plant, because the connection settings come from the same source every time.

## How do you run the MQTT broker and confirm it's connected?

You run the broker by pasting the generated Docker command into a terminal, and the platform confirms the connection on its own. The command already carries everything the broker needs to reach your workspace.

- Copy the Docker command from the deployment page.
- Run it in your terminal. Docker downloads the image and starts the broker.
- When the download finishes, the broker provisions itself in your workspace automatically.
- Back in the platform, the deployment page shows the broker running with the license you selected. Select **View broker**.

The broker page shows a **Connected** status, which confirms the broker is communicating with the platform. The overview also lists the broker details and connection status alongside the license information.

At this point you have a broker running locally that is connected to your HiveMQ Platform workspace.

![HiveMQ Platform broker overview showing a Connected status, broker details and license information for a locally deployed broker](https://a.storyblok.com/f/243938/41dd0dfb15/hivemq-platform-broker-overview.png)

## How can you test the connection with simulated MQTT data?

You can test the connection with the platform's simulated data option, which runs the MQTT CLI in a Docker container to publish test messages to your broker. No real devices are needed, so nothing on the plant floor is affected.

- On the broker page, go to **Connect your devices**. You'll see client options for several programming languages and a **Simulated data** option.
- Select **Simulated data**. The platform shows a command that runs the MQTT CLI in Docker, along with the topic the simulator publishes to.
- Copy the command and run it in your terminal.

The simulator starts publishing MQTT messages to your broker straight away. You now have a running broker with data flowing through it, and you can see how the platform handles that data before connecting a single machine.

## Where does the simulated data show up in the HiveMQ platform?

The simulated data shows up in **Discovery**, under [Contextualize](/platform/contextualize), as ungoverned MQTT traffic. Because the broker is connected and publishing, the platform detects the traffic without any extra setup.

This view tells you what is flowing through your broker right now. For a team bringing a new line or site online, that visibility is the starting point. You can check topics and payloads against what you expect before anyone builds a dashboard or a KPI on top of them.

From Discovery, you can choose which traffic to bring into a governed namespace, where it gets consistent structure and meaning. That's the subject of the next post in this series.

![Discovery view in the Contextualize area of the HiveMQ Platform listing ungoverned MQTT topics detected from simulated traffic](https://a.storyblok.com/f/243938/6d2ab4e629/hivemq-platform-discovery-view.png)

## What comes next in the HiveMQ Platform tour?

You now have a self-managed broker connected to the HiveMQ Platform, with simulated traffic flowing through it and visible in Discovery. That gives you a tested data path you can rely on when real equipment comes online.

In the next post, we'll take the ungoverned traffic found in Discovery and bring it into a governed namespace. If you missed the start of the series, [read part 1 for a tour of the full platform](/blog/hivemq-platform-tour-industrial-data/). Before that if you’d like to understand how raw MQTT data becomes structured, governed operational information, read our blog, [Contextualize: Turning Data Into Understandable Operational Information](/blog/efficient-contextual-modeling-manufacturing-data/).

[Try HiveMQ](/platform/): Connect your first broker to the HiveMQ Platform and see your data in Discovery.

## FAQs

Can I connect an existing MQTT broker instead of deploying a new one?

Yes. When you select Get broker or edge in Connect, the platform offers two paths. You can connect an existing deployment or deploy a new broker. This tutorial follows the second path, but teams already running HiveMQ brokers in their plants can link those deployments to their workspace instead.

Which deployment options does the HiveMQ Platform support for a self-managed broker?

The broker deployment page supports Docker, Kubernetes, a local install, AWS and Azure. For each option, the platform generates the instructions you need once a license is associated with your workspace. Docker is a practical choice for a local test, while Kubernetes suits teams that run brokers as part of a wider containerized estate.

Do I need to configure the broker manually to connect it to the platform?

No. After you generate a license, the platform produces a Docker command that already includes the configuration the broker needs to reach your workspace. Running that command downloads the image and starts the broker, which then provisions itself in the platform automatically. You can confirm the connection on the broker page, which shows a Connected status.

How can I test an MQTT broker connection without real devices?

Use the Simulated data option under Connect your devices. It gives you a command that runs the MQTT CLI in a Docker container and publishes test messages to a set topic on your broker. This lets you confirm the full data path, from broker to platform, without touching equipment on the plant floor.

What is ungoverned MQTT traffic in the HiveMQ Platform?

Ungoverned MQTT traffic is data the platform detects flowing through a connected broker that hasn't yet been brought into a governed namespace. It appears in Discovery, under Contextualize. Reviewing it shows you what your broker is actually carrying, so you can decide which data to give consistent structure and meaning before teams build on it.
