Mainflux is an open-source IoT platform written in Go. It handles device connectivity over HTTP, MQTT, WebSocket, and CoAP, and provides a full pipeline from data ingestion to storage, rules evaluation, alarms, and notifications — without requiring external tooling for each step.
Data normalization is built into the platform through Profiles, which define per-group transformation and routing rules at ingestion time. Security goes beyond standard mTLS: certificate lifecycle management includes TPM and secure element support for hardware-backed key storage. The platform runs entirely on your own infrastructure with no cloud dependency.
- Multi-Protocol Support: HTTP, MQTT, WebSocket, and CoAP protocol adapters.
- Device Management: Thing and group management with flexible metadata.
- Profiles: Per-profile data transformation and routing configuration, including content type, field mapping, and time normalization.
- User Management: Organizations, groups, platform and org invites, and role-based access control (RBAC).
- Rules Engine: Condition and threshold-based rules with configurable alarm, email, and SMS actions.
- Alarms: Real-time alarm generation and lifecycle management triggered by sensor data.
- Scheduled Actions: Cron-based task scheduler for automated platform operations.
- Certificates: X.509 certificate issuance, renewal, and revocation with full mTLS support.
- Hardware Keys: TPM and secure element support for external key management.
- Notifications: Email (SMTP) and SMS (SMPP) notifier services.
- Data Storage: Pluggable writers and readers for PostgreSQL, TimescaleDB, and MongoDB.
- Backup and Restore: Full platform backup and restore capability.
- Observability: Prometheus metrics, Jaeger distributed tracing, and structured logging.
- Event Sourcing: Redis-based event streaming across services for real-time IoT event processing.
- CLI: Command-line interface for platform management and development workflows.
- Container Deployment: Docker and Docker Compose support out of the box.
The following are needed to run Mainflux:
- Docker (version 20.10+)
- Docker Compose (version 2.0+)
Developing Mainflux will also require:
Clone the repository:
git clone https://github.com/MainfluxLabs/mainflux.git
cd mainfluxRun with Docker Compose:
docker compose -f docker/docker-compose.yml up -dOr build and run from source:
make runBuild the CLI:
make cli
./build/mainfluxlabs-cli versionCheck service health:
curl -X GET http://localhost:8080/healthFor full API documentation and usage examples, visit mainfluxlabs.github.io/docs.
Complete documentation is available at mainfluxlabs.github.io/docs.
Contributions are welcome and encouraged:
This project is a fork of mainflux/mainflux, which has since been archived. It is maintained independently by MainfluxLabs, continuing the original work with new features and long-term support. See MAINTAINERS for the current team.
Mainflux is open-source software licensed under the Apache-2.0 license. Contributions are welcome and encouraged!
