nodejavascript.com
Simple MQTT broker written in nodejs, local persistence, minimal stdout with docker.
Explore the docs »
DEMO
·
Report Bug
·
Request Feature
Table of Contents
Run this project on docker with a single command, npm run docker
and you're ready to connect and use this slim MQTT broker with minimal event logging.
Logging via terminal, or looks nice like this using Dozzle:
Client app used for above logs:
Use this to spin up a dockerized MQTT broker. I use it to connect various Tasmota devices and collect metrics with hub.docker.com/r/kpetrem/mqtt-exporter. This project was authored May 5, 2021, 7:35 PM privately on GitLab for about a year until I made it opensource.
Learn about MQTT and installing a client which are readily available on desktops and play stores. Anything that publishes to MQTT can use this as a broker.
-
Review ./package.json for dependencies.
-
Clone the repo
git clone https://github.com/nodejavascript/selfhosted-mqtt-broker-nodejs.git
-
Change directory, make an
.env
filecd selfhosted-mqtt-broker-nodejs && touch .env
-
Edit the
.env
file and enter credentialsAEDES_PORT=1883 AEDES_BROKER_NAME=my-broker-name AEDES_BROKER_CONCURRENCY=50 AEDES_USERNAME=common-username AEDES_PASSWORD=common-password
-
Create docker container
npm run docker
if success, look for docker container named
selfhosted-mqtt-broker-nodejs
-
Run locally
npm i && npm start
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
- Home - nodejavascript.com
- YouTube - nodejavascript
- Twitter - @nodejavascript
- LinkedIn - @nodejavascript
- Email - [email protected]