This Docker image adds a default password and creates CA and server certificates so the MQTT broker can be accessed over SSL/TLS. It also adds some default configs for websockets and logging.
Port | Connection |
---|---|
1883 |
Default |
8883 |
SSL/TLS |
9001 |
Websockets |
Path | Contains |
---|---|
/mosquitto/config |
Custom config files |
/mosquitto/data |
Stored data |
/mosquitto/log |
Log files |
Env. variable | Description |
---|---|
MQTT_USERNAME |
Default username |
MQTT_PASSWORD |
Default password |
CA_COMMON_NAME |
Certificate Authority Common Name |
Run mosquitto_certs [-o] [cn]
in the Docker container to create new certificates.
-o
overwrite existing certificates
mosquitto_certs 192.168.0.254
Creates new certificates using the ip address as common name.
mosquitto_certs -o mqtt.local.lan
Creates and overwrites any existing certificates using the given domain name.
- Github: https://github.com/project-casa/mosquitto
- Docker hub: https://hub.docker.com/r/roeldev/casa-mosquitto
- MQTT wiki: https://github.com/mqtt/mqtt.github.io/wiki
- Mosquitto project: https://github.com/eclipse/mosquitto
- MQTT.fx MQTT client: http://mqttfx.org/
- Arduino MQTT library: https://learn.adafruit.com/mqtt-adafruit-io-and-you/arduino-plus-library-setup
- http://www.steves-internet-guide.com/mosquitto-tls/
- https://github.com/thelebster/example-mosquitto-simple-auth-docker
GPL-2.0+ © 2019 Roel Schut