MQTT Broker with Docker
Install, update and uninstall MQTT Broker in one place.
Community Edition runs locally without an account or licence.
Install
Before you start, install Docker and make sure it is running. These commands work in PowerShell, macOS Terminal or a Linux shell.
Start the broker
Check that it is running (look for “Up”)
Once it is running, connect Hub or your MQTT client to localhost:1883. For another computer, use its address and MQTT port. Use your broker credentials when prompted.
Update
Back up your configuration and saved data before updating. Plan for a brief interruption while the broker restarts.
Pull the latest MQTT Broker image
Remove the old container, keeping its named data volume. Then run the start command in the Install section again. If you customized ports, environment variables or volumes, reuse those settings.
Stop and remove the old container (keeps saved data)
Uninstall
Back up any data you want to keep before removing the application.
Stop and remove the container. These commands keep its named data volume so you can reinstall later. Use your own container name if you changed it.
Remove the MQTT Broker container
Optional: after removing the container, permanently delete its saved data. Back up the volume first. Only run the command for data you want to erase.
Permanently delete MQTT Broker data
Uninstalling locally does not remove a broker from Fleet or cancel a licence. Manage those separately in the portal.