A feature-rich MQTT broker implementation with persistent storage, authentication, and web dashboard.
- MySQL-based authentication and ACL (Access Control List)
- Persistent message storage using BadgerDB
- WebSocket support for browser-based MQTT clients
- Admin dashboard for managing users and ACLs
- Real-time statistics and monitoring
- Support for MQTT v3.1.1 and v5.0
- MQTT Broker (Go)
- TCP port: 1883
- WebSocket port: 50040
- HTTP API port: 18080
- Admin Dashboard (PHP)
- Web UI port: 10000
- User/ACL management
- Real-time stats visualization
- Copy the example config and customize:
cp auth-mysql.example.yml auth-mysql.yml
# Edit MySQL connection details in auth-mysql.yml
- Initialize the MySQL database:
mysql -u root -p < ddl.sql
- Start services using PM2:
pm2 start pm2.config.js
# or
go run main.go --conf=auth-mysql.yml
The auth-mysql.yml
file configures:
- Authentication mode (anonymous/username/client ID)
- ACL mode
- MySQL connection details
- MQTT broker settings
main.go
- MQTT broker implementationcontrol-panel/
- PHP admin dashboardhooks/
- MQTT broker plugins for auth, storage etcresources/
- Shared database utilities
MIT License
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.