Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Latest commit

 

History

History
71 lines (53 loc) · 2.6 KB

README.md

File metadata and controls

71 lines (53 loc) · 2.6 KB

Mosquitto MQTT broker

Latest release Build status Layers Image size

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.

Ports

Port Connection
1883 Default
8883 SSL/TLS
9001 Websockets

Volumes

Path Contains
/mosquitto/config Custom config files
/mosquitto/data Stored data
/mosquitto/log Log files

Environment variables

Env. variable Description
MQTT_USERNAME Default username
MQTT_PASSWORD Default password
CA_COMMON_NAME Certificate Authority Common Name

Creating certificates with mosquitto_certs

Run mosquitto_certs [-o] [cn] in the Docker container to create new certificates.

Options

  • -o overwrite existing certificates

Examples

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.

Links

Inspired by

License

GPL-2.0+ © 2019 Roel Schut