prefixkit Ask an engineerAsk Support RU

Smart home

Mosquitto config generator

Build a mosquitto.conf for Mosquitto 2.x: password login, per-user permissions (ACL), WebSocket for browsers and TLS for connections from the internet, plus the mosquitto_passwd commands.

Users

Everything is built in the browser: passwords and addresses are not sent anywhere.

Why the broker refuses

Since 2.0, Mosquitto with no config listens on localhost only and refuses anonymous clients. That is why you need listener 1883 and a password file. Code 5 (not authorised) means a bad login or ACL; a connection error means the port is closed or the broker listens elsewhere.

Test the broker from the browser (needs WebSocket, and wss on 8884 from an HTTPS page): MQTT client. Get a Let’s Encrypt certificate as for a website; restart Mosquitto after renewal.

Idea?