About Eclipse Mosquitto
Eclipse Mosquitto is a lightweight open-source MQTT broker from the Eclipse Foundation. It speaks MQTT 3.1, 3.1.1 and 5.0, which lets phones, sensors and back-end services publish to topics and subscribe to them with almost no overhead. It is dual-licensed under the EPL 2.0 and EDL 1.0.
Devices need a broker with a stable address that never sleeps. A CloudSat server gives Mosquitto fixed IPv4 and IPv6 addresses, DDoS filtering in front and a region near your devices, and the smallest plan is enough to start.
After deploy the broker runs on Ubuntu 24.04 LTS. Since version 2.0 it accepts only local connections until you define listeners and authentication.
What you get with Eclipse Mosquitto
- Accepts MQTT 3.1, 3.1.1 and 5.0 clients
- TLS listeners and MQTT over WebSockets
- Password files and access control lists
- Retained messages, last will and QoS 0 to 2
- Bridges to other brokers
mosquitto_pubandmosquitto_subclients
Eclipse Mosquitto use cases
- A message hub for home automation and sensors
- Telemetry from field devices to a central server
- Lightweight pub/sub between microservices
After you deploy Eclipse Mosquitto
- SSH in when the server is Running and check the broker with
systemctl status mosquitto. - Add a
listener 1883line, or 8883 with TLS certificates, to the configuration; Mosquitto 2.x stays on localhost until you do. - Create users with
mosquitto_passwd -c <password-file> <user>, reference the file withpassword_fileand keepallow_anonymous false. - Test with
mosquitto_subandmosquitto_pubin two shells, then open only the ports you use in the CloudSat firewall.
Eclipse Mosquitto ports
Open these in your firewall if you use one: 1883/tcp MQTT, 8883/tcp MQTT over TLS.
Eclipse Mosquitto FAQ
Should port 1883 face the internet?
Only with authentication, and preferably not at all, because plain MQTT sends passwords unencrypted. Use 8883 with TLS for devices that connect over the open internet.
Can browsers connect?
Yes, through MQTT over WebSockets. Add a listener with protocol websockets, ideally behind TLS, and point your web client at it.
Disclaimer. The Eclipse Mosquitto project has no affiliation with CloudSat and does not endorse it. Names and logos belong to their owners and appear only to identify the software.