These are Docker Compose file and configuration files to run an MQTT broker server using Mosquitto. Additionally, the compose file includes Node-RED to provide a web interface for interacting with the broker and creating flows. Finally, Caddy serves as a reverse proxy, securing connections to both the broker and Node-RED.
mosquitto.conf
: Mosquitto configuration file.settings.js
: Node-RED configuration file.Caddyfile
: Caddy configuration file.
-
Ensure you have Docker installed on your system.
docker --version
-
Configure the Mosquitto MQTT broker in the
mosquitto.conf
file as needed. -
Change the domain name in the
Caddyfile
to your own domain name.mqtt.example.com { # Change this to your domain name reverse_proxy mosquitto:1883 }
-
Configure Node-RED in the
settings.js
file. It is recommended to change the users and passwords in theadminAuth
section.adminAuth: { type: "credentials", users: [{ username: "admin", // Change this to your desired username password: "$2a$08$1J9Z6z7...", // Change this to your hashed password by bcrypt permissions: "*" // Change this to your desired permissions }] }
-
Run the following command to start the services.
docker compose up -d
This project is licensed under the MIT License, providing an open and permissive licensing approach for further development and distribution.