Skip to content

IOT University project: MQTT Broker with different authentication methods

License

Notifications You must be signed in to change notification settings

sihamouda/IOT-MQTT-Broker

Repository files navigation

Simple Mosquitto broker

Mosquitto Logo

This is a simple Mosquitto broker to quickly initialize projects requiring an MQTT broker.

Prerequisite

How to use

For development purposes, you need to setup the project:

It will rebuild the mosquitto server (and will purge volumes)

make dev

Find other make helper command in the Makefile

The Mosquitto broker is now available on localhost. You can test it easily (require Mosquitto client):

| In one shell:

mosquitto_sub -h localhost -t "sensor/temperature"

| In a second shell:

mosquitto_pub -h localhost -t sensor/temperature -m 23

Configuration

The config file is in the file mosquito.conf

By default we activated the log and data persistance (logs are in the log folder, and data are stored in a docker volume).

Authentication

By default authentication is disactivated

Enable authentication

Change these Dockerfiles arguments:

Example:

- AUTH_METHOD=password
- AUTH_USER=admin
- AUTH_PASSWORD=admin

TLS

By default TLS is disactivated

Enable TLS

Change these Dockerfiles arguments for self-signed certificates:

Example:

- TLS=true

About

IOT University project: MQTT Broker with different authentication methods

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published