This project bootstraps a pilot deployment of Stack A, a complete IoT infrastructure platform.
- OpenRemote - IoT management platform (proxy + manager + Keycloak + PostgreSQL)
- Mosquitto - MQTT message broker with TLS (port 8883)
- ChirpStack v4 - LoRaWAN Network Server (+ Gateway Bridge + Redis + PostgreSQL + REST API)
- Frigate - Network Video Recorder with object detection (events → MQTT)
- Prometheus - Metrics and monitoring (optional profile)
- Single amd64 nettop runs the entire hub
- 3–5 strongholds (installation sites)
- 5–10 LoRaWAN devices
- 2–6 RTSP cameras
- LoRaWAN region: EU868
# 1. Generate .env from the production template (random secrets injected) ./scripts/gen-env.sh # prod | or: gen-env.sh dev | gen-env.sh test # 2. Start the stack (creates data dirs, TLS certs, and MQTT users when missing) ./scripts/bootstrap.sh # prod | or: APP_ENV=dev ./scripts/bootstrap.sh # 3. Configure cameras (optional) python scripts/add_camera.py --name front_door --rtsp rtsp://user:pass@ip:554/stream1 # 4. Verify services docker ps --format "table {{.Names}}\t{{.Status}}"
| Document | Description |
|---|---|
| Getting Started | Installation and initial setup |
| Configuration | Detailed configuration options |
| Architecture | System design and data flows |
| Sensor Integration | Cameras, LoRaWAN, MQTT sensors |
| Testing | Running tests and load testing |
| Analytics | Log aggregation and reporting |
| Troubleshooting | Common issues and solutions |
| Service | URL | Description |
|---|---|---|
| OpenRemote | https://localhost | Main management UI |
| ChirpStack | http://localhost:8080 | LoRaWAN server UI |
| ChirpStack REST | http://localhost:8090 | REST API |
| Frigate | http://localhost:8971 | NVR interface |
| Prometheus | http://localhost:9090 | Monitoring (if enabled) |
# Setup Python environment python3 -m venv .venv source .venv/bin/activate pip install -r requirements/dev.txt # Run all tests pytest tests/ -v # Run load tests locust -f tests/locustfile.py --headless -u 10 -t 60s
Generate statistics reports for monitoring and debugging:
source .venv/bin/activate # Console report python -m coop_stack_analytics.cli --since 1h # Export JSON python -m coop_stack_analytics.cli --format json --output reports/report.json # Quick health check python -m coop_stack_analytics.cli --health-only
├── config/
│ ├── chirpstack/ # ChirpStack configuration
│ ├── frigate/ # Frigate NVR configuration
│ ├── keycloak/ # Keycloak realm import
│ ├── mosquitto/ # MQTT broker configuration
│ ├── postgresql/ # Database init scripts
│ └── prometheus/ # Monitoring configuration
├── docker/
│ ├── docker-compose.yml # Base (production)
│ ├── docker-compose.dev.yml # Development overrides
│ └── docker-compose.test.yml # Test / CI overrides
├── env/
│ ├── prod.env # Production template (default)
│ ├── dev.env # Development template
│ └── test.env # Test / CI template
├── config/ # Service configuration files
├── data/ # Bind-mounted volumes (gitignored)
├── docs/ # Documentation
├── scripts/ # Lifecycle and setup scripts
├── coop_stack_analytics/ # Log analytics module
├── tests/ # Test suite
└── requirements/ # Python dependencies (base / test / dev)
- Use
./scripts/clean_data.shto reset data (fixes ownership of container-owned files before removal) - Frigate publishes only port 8971 to localhost; port 5000 is intentionally not exposed
- Mosquitto expects TLS files in
config/mosquitto/certs/ - ChirpStack config is split into
chirpstack.tomlandregion_eu868.toml scripts/package.shcreates a sanitized archive (excludes secrets and certificates)
See LICENSE file for details.