mash-playbook/docs/services/mosquitto.md

26 lines
922 B
Markdown
Raw Normal View History

2023-07-06 15:20:16 +02:00
# Mosquitto
2023-07-03 13:10:38 +02:00
[Mosquitto](https://mosquitto.org/) is an open source [MQTT](https://en.wikipedia.org/wiki/MQTT) broker.
## Configuration
To enable this service, add the following configuration to your `vars.yml` file and re-run the [installation](../installing.md) process:
```yaml
mosquitto_enabled: true
2023-07-06 11:58:34 +02:00
# If you need to change the MQTT port you can uncomment and adjust
# mosquitto_container_mqtt_host_bind_port: "1884"
2023-07-03 13:10:38 +02:00
```
## Usage
After installation, you can use `just run-tags mosquitto-add-user --extra-vars=username=<username> --extra-vars=password=<password>` to create a user. For the setting to take effect, you must restart the container. To do that you can use `just start-group mosquitto`.
2023-07-03 13:10:38 +02:00
2023-07-06 15:20:16 +02:00
You can then start to send and subscribe to MQTT topics. Use port `1883` and the server's IP or any domain you configured to point to this server.
2023-07-03 13:10:38 +02:00
## Alternatives
* [rumqttd](rumqttd.md) is another MQTT broker