Mosquitto MQTT Broker¶
Eclipse Mosquitto 2.1.2 on Ubuntu 24.04 LTS, set up as a private MQTT broker. Clients connect over TLS with a user name and password, a topic ACL decides what each user may read and write, and retained messages and durable sessions survive restarts. This page covers what is on the image, its defaults and how billing works.
Launch on AWS Marketplace Getting started
What is on the image¶
- Mosquitto 2.1.2, built from the official source release with TLS. The
broker is
/usr/sbin/mosquitto; the clientsmosquitto_pub,mosquitto_subandmosquitto_passwdare in/usr/bin. - A systemd service,
mosquitto, that runs as the unprivilegedmosquittouser. - First-boot setup that creates this instance's TLS certificates, three example users with random passwords, and the topic ACL. Nothing secret is baked into the image.
- A helper client,
/opt/sushi/bin/mosquitto-as.sh, that publishes or subscribes as one of the example users without putting the password on the command line. - A walkthrough script,
/opt/sushi/docs/demo.sh.
WebSockets, the SQLite persistence plugin and the HTTP API are not built in. There is no browser dashboard: Mosquitto is a headless broker.
Defaults¶
| Setting | Default |
|---|---|
| Listener | mqtts://127.0.0.1:8883 (TLS, loopback only) |
| Anonymous access | Off |
| Users | publisher, subscriber and denied, see Users and topic ACL |
| Persistence | On, in /var/lib/mosquitto/data/mosquitto.db |
| Client certificates | Not required |
Recommended instance¶
t3.medium with an encrypted gp3 root volume of at least 16 GiB and at least
2 GiB of memory. No inbound security group rules are needed: you connect with
AWS Systems Manager Session Manager, and reach the broker through Session
Manager port forwarding or a private proxy.
Billing¶
You pay an hourly software fee while the instance runs, as shown in the offer terms on the listing. AWS bills EC2, EBS and data transfer separately.
Where to go next¶
- Getting started: subscribe, launch, connect and send your first message.
- Configuration: users, the topic ACL, network access and certificates.
- Operations: security model, logs, backups and updates.
- Troubleshooting: common errors and how to fix them.
Upstream project¶
Eclipse Mosquitto is open source under EPL-2.0 or BSD-3-Clause. See the Mosquitto documentation for the configuration file and client options. Software Sushi packages the image; the Eclipse Foundation does not endorse or support it.