https://github.com/absmach/magistrala
Industrial IoT Messaging and Device Management Platform
https://github.com/absmach/magistrala
authentication authorization certificates-generator coap configuration-management devices edge edge-computing go golang iot iot-gateway iot-platform messaging mqtt web-sockets
Last synced: about 2 months ago
JSON representation
Industrial IoT Messaging and Device Management Platform
- Host: GitHub
- URL: https://github.com/absmach/magistrala
- Owner: absmach
- License: apache-2.0
- Created: 2024-11-01T08:37:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-03-12T10:37:40.000Z (3 months ago)
- Last Synced: 2026-03-12T17:23:13.854Z (3 months ago)
- Topics: authentication, authorization, certificates-generator, coap, configuration-management, devices, edge, edge-computing, go, golang, iot, iot-gateway, iot-platform, messaging, mqtt, web-sockets
- Language: Go
- Homepage: https://docs.magistrala.absmach.eu
- Size: 136 MB
- Stars: 180
- Watchers: 5
- Forks: 57
- Open Issues: 41
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
- Maintainers: MAINTAINERS
Awesome Lists containing this project
- awesome-integration - Magistrala (⭐2.5k) - Distributed, event-driven infrastructure for messaging supporting multiple protocols (HTTP, MQTT, WebSocket, CoAP) with strong security and IoT capabilities. (Projects / Message Broker)
README
# Magistrala
### A Modern IoT Platform Built on SuperMQ
### Scalable • Secure • Open-Source
[](https://github.com/absmach/magistrala/actions/workflows/check-license.yaml)
[](https://github.com/absmach/magistrala/actions/workflows/build.yaml)
[](https://goreportcard.com/report/github.com/absmach/magistrala)
[](https://deepwiki.com/absmach/magistrala)
[](https://codecov.io/gh/absmach/magistrala)
[](LICENSE)
[](https://matrix.to/#/#magistrala:matrix.org)
### [Guide](https://docs.magistrala.absmach.eu) | [Contributing](CONTRIBUTING.md) | [Website](https://www.absmach.eu/magistrala) | [Chat](https://matrix.to/#/#magistrala:matrix.org)
Made with ❤️ by [Abstract Machines](https://www.absmach.eu)
## Introduction 🌍
Magistrala is a cutting-edge, open-source IoT cloud platform built on top of [SuperMQ](https://github.com/absmach/supermq). It serves as a robust middleware solution for building complex IoT applications. With Magistrala, you can connect and manage IoT devices seamlessly using multi-protocol support, all while ensuring security and scalability.
### Key Benefits
- **Unified IoT Management**: Connect sensors, actuators and applications over various network protocols.
- **Scalability and Performance**: Designed to handle enterprise-grade IoT deployments.
- **Secure by Design**: Features such as mutual TLS authentication and fine-grained access control.
- **Open-Source Freedom**: Patent-free, community-driven, and designed for extensibility.
## ✨ Features
- 🏢 **Multi-Tenancy**: Support for managing multiple independent domains seamlessly.
- 👥 **Multi-User Platform**: Unlimited organizational hierarchies and user roles for streamlined collaboration.
- 🌐 **Multi-Protocol Connectivity**: HTTP, MQTT, WebSocket, CoAP, and more (see [contrib repository](https://www.github.com/absmach/mg-contrib) for LoRa and OPC UA).
- 💻 **Device Management and Provisioning**: Including Zero-Touch provisioning for seamless device onboarding.
- 🛡️ **Mutual TLS Authentication (mTLS)**: Secure communication using X.509 certificates.
- 📜 **Fine-Grained Access Control**: Support for ABAC and RBAC policies.
- 💾 **Message Persistence**: Timescale and PostgreSQL support (see [contrib repository](https://www.github.com/absmach/mg-contrib) for Cassandra, InfluxDB, and MongoDB).
- 🔄 **Rules Engine (RE)**: Automate processes with flexible rules for decision-making.
- 🚨 **Alarms and Triggers**: Immediate notifications for critical IoT events.
- 📅 **Scheduled Actions**: Plan and execute tasks at predefined times.
- 📝 **Audit Logs**: Maintain a detailed history of platform activities for compliance and debugging.
- 📊 **Platform Logging and Instrumentation**: Integrated with Prometheus and OpenTelemetry.
- ⚡ **Event Sourcing**: Streamlined architecture for real-time IoT event processing.
- 🐳 **Container-Based Deployment**: Fully compatible with Docker and Kubernetes.
- 🌍 **Edge and IoT Ready**: Agent and Export services for managing remote IoT gateways.
- 🛠️ **Developer Tools**: Comprehensive SDK and CLI for efficient development.
- 🏗️ **Domain-Driven Design**: High-quality codebase and extensive test coverage.
## Installation 🛠️
There are multiple ways to run Magistrala.
First, clone the repository and position to it:
```bash
git clone https://github.com/absmach/magistrala.git
cd magistrala
```
To run the latest stable (tagged) version, use:
```bash
# Run with latest stable tagged version
make run_stable
```
To run the latest version, use:
```bash
# Run with latest development version (from main branch)
make run_latest
```
The `make run_stable` command will:
- Checkout the repository to the latest git tag
- Update the version in the environment configuration
- Start the services with the stable release
**Note:** After running `make run_stable`, you'll be on a detached HEAD state. To return to your working branch:
```bash
git checkout main
```
### Running on Apple Silicon (M1/M2/M3) Macs
When running Magistrala on Apple Silicon Macs, the Makefile will automatically detect your ARM64 architecture and build Docker images locally.
**If using Docker Desktop:**
1. **Enable Apple Virtualization Framework**: In Docker Desktop, go to:
- Settings → General → Enable "Use the new Virtualization framework"
2. **Enable Rosetta for x86_64 Emulation**: In Docker Desktop, go to:
- Settings → General → Enable "Use Rosetta for x86_64/amd64 emulation on Apple Silicon"
After enabling these options, restart Docker Desktop, then run `make run_stable` or `make run_latest` as usual.
## 📤 Usage
**Using the CLI :**
Check the health of a specific service using the CLI:
```bash
make cli
./build/cli health
```
Replace `` with the name of the service you want to check.
**Using Curl :**
Alternatively, use a simple HTTP `GET` request to check the platform's health:
```bash
curl -X GET http://localhost:8080/health
```
For additional usage examples and advanced configurations, visit the [official documentation](https://docs.magistrala.absmach.eu).
## 📚 Documentation
Complete documentation is available at the [Magistrala official docs page](https://docs.magistrala.absmach.eu).
For CLI usage details, visit the [CLI Documentation](https://docs.magistrala.absmach.eu/dev-guide/cli/introduction-to-cli).
## 🌐 Community and Contributing
Join the community and contribute to the future of IoT middleware:
- [Open Issues](https://github.com/absmach/magistrala/issues)
- [Contribution Guide](CONTRIBUTING.md)
- [Matrix Chat](https://matrix.to/#/#magistrala:matrix.org)
## 📜 License
Magistrala is open-source software licensed under the [Apache-2.0](LICENSE) license. Contributions are welcome and encouraged!
## 💼 Professional Support
Need help deploying Magistrala or integrating it into your systems? Contact **[Abstract Machines](https://www.absmach.eu)** for expert guidance and support.