-
Mosquitto - MQTT message broker
- Listens on TCP port
1883
- Management UI on port
8088
(🚀)
- Listens on TCP port
-
InfluxDB - time-series database
- Admin UI (🚀) and InfluxDB API v2 on port
8086
- Admin UI (🚀) and InfluxDB API v2 on port
-
Telegraf - can forward messages/metrics from MQTT to InfluxDB, based on rules in
telegraf/telegraf.conf
Default credentials for everything are hoco:verysecret
.
Credentials can be set through environment variables at setup time and are used by docker-compose
. After initial setup, these should not be changed, as changes are not propagated to configuration, with the exception of TELEGRAF_MQTT_PASSWORD
.
ADMIN_USERNAME
: default username to Mosquitto admin UI and InfluxDBADMIN_PASSWORD
: default password to Mosquitto admin UI and InfluxDBMQTT_ADMIN_USERNAME
: Mosquitto admin API usernameMQTT_ADMIN_PASSWORD
: Mosquitto admin API passwordINFLUXDB_DEFAULT_ORG
: default InfluxDB organizationINFLUXDB_DEFAULT_BUCKET
: default InfluxDB bucketTELEGRAF_MQTT_PASSWORD
: used by Telegraf to listen to MQTT traffic;telegraf
user has rights to listen on all non-system topicsTELEGRAF_INFLUXDB_TOKEN
: used by Telegraf to write to InfluxDB
Default usernames are hoco
, default passwords are verysecret
.
The system configuration for InfluxDB can also be adjusted through environment variables; these are read every time at start-up.
INFLUXD_{SETTING_SLUG}
: see https://hub.docker.com/_/influxdb > Configuration
Other configuration can be set in these files:
dynsec_default.json
: default Mosquitto users, groups & rights. Do not edit the{admin}
user or credentials for thetelegraf
user unless you want stuff to break.telegraf/telegraf.conf
: MQTT -> InfluxDB forwarding rules etc.mosquitto/mosquitto.conf
: Mosquitto system configuration
- Clients/users/roles for MQTT can be created and managed in the management center
- InfluxDB can be configured through the admin UI
- Rules for forwarding metrics from MQTT to InfluxDB can only be set in
telegraf/telegraf.conf
unfortunately
- Clone repo
- Make sure you have rights to use port
1883
, or change the port indocker-compose.yml
- Comment/uncomment volume/bind mounts in
docker-compose.yml
- Run
docker-compose up
- Tweak the configuration
Generate secure passwords with your password manager or openssl rand -base64 [length]
- Clone repo
- Set environment variables and/or adjust configuration
- Run
docker-compose up -d
- Fork repo and adjust config files
- Stacks ->
+ Add stack
->Repository
- Configure stack with URL of your repository
- Set environment variables (under Environment variables)
- Deploy the stack