MQTT Broker
What is an MQTT Broker?
An MQTT broker is a central communication hub through which devices exchange data. A device sends its measurement values to the broker, and other devices can retrieve these values from there. This creates a simple and reliable data flow.
When Do You Need a Broker?
One Raspberry Pi: No external broker is required because all data can be processed locally.
Multiple Raspberry Pis in the network: A broker simplifies data exchange between devices within the local network.
Internet‑based applications (WWW): The broker can run on a VPS server so that data is accessible from outside.
Local MQTT Broker in the Home Network
An MQTT broker can be installed directly on a Raspberry Pi within the local home network. This allows multiple devices to exchange data easily without requiring an internet connection. The broker acts as a central distribution point: devices send their measurement values to it, and other devices retrieve them.
Server Installation
For server installations, Colmuspro uses Docker containers. This approach is reliable, clean, and quick to set up because Docker encapsulates all required components and provides them in a reproducible way.
Different Internal and External Ports in Standard Installations
In many standard Docker setups, the internal port of the service (e.g., 1883 for MQTT) is automatically mapped to a different external port. This means:
internal: the service runs on its normal port (e.g., 1883)
external: Docker assigns a different port, e.g., 11883
This can create the impression that “the ports must be different” — in reality, it is simply the default configuration of many ready‑made Docker images or Compose examples. Our applications always access the external port assigned by Docker.
Important:
The internal port is never changed.
Only the external port is remapped.
This ensures that multiple containers can run side by side without port conflicts.
Why a Broker Is Important for Future Extensions
As soon as you integrate features such as:
external databases
web dashboards
multiple data sources
distributed systems
a broker becomes essential for distributing data centrally.
Communication with the Broker
Node‑RED ↔ Broker: via the MQTT protocol
Server side (web): via the secure WSS protocol
Authentication can be enabled if required.
Testing Options
There are public MQTT brokers that can be tested without registration — simply search for public MQTT broker.
Contact
Questions about Colmuspro? Write to us.
info@colmuspro.eu
© 17.04.2026. All rights reserved.