Mosquitto MQTT
server in the Docker
container with Authentication
plugin.
- Docker Registry @monstrenyatko/rpi-mosquitto-auth
- GitHub @monstrenyatko/docker-rpi-mosquitto-auth
It has the mosquitto-auth-plug to enable authentication.
List of the supported/compiled authentication back-ends:
- MySQL
- Redis
- HTTP
- JWT
- MongoDB
- Files
See mosquitto-auth-plug
for configuration details.
-
Pull prebuilt
Docker
image:docker pull monstrenyatko/rpi-mosquitto-auth
-
Create
Data
storage:MQTT_DATA="mosquitto-data" docker volume create --name $MQTT_DATA
-
Prepare
Configuration
directory:- Create the
/etc/config/mosquitto/conf.d/
directory - [OPTIONAL] Add
auth-plugin.conf
with required settings to theconf.d
- [OPTIONAL] Add all
.conf
files with additionalMosquitto
configuration to theconf.d
- Create the
-
Start pre built image:
docker-compose up -d
-
Stop/Restart:
docker-compose stop docker-compose start
Container is already configured for automatic restart (See docker-compose.yml
).
cd <path to sources>
./build.sh <tag name>