Get up and running with WarDragon Analytics in 5 minutes.
Before you begin, ensure you have:
-
Docker (version 20.10 or later)
docker --version
-
Docker Compose (version 2.0 or later)
docker-compose --version # OR docker compose version -
One or more WarDragon kits running DragonSync with API enabled (default port 8088)
-
Network connectivity between Analytics host and WarDragon kit(s)
-
System Requirements:
- 2GB RAM minimum (4GB recommended for multi-kit)
- 50GB disk space (for 30 days of data from 5 kits)
- Linux, macOS, or Windows with WSL2
If you don't have Docker installed, here's the recommended setup for Ubuntu:
# Add Docker's official GPG key
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
# Add the repository to Apt sources
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
# Install Docker packages
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# Add your user to the docker group (avoids needing sudo for docker commands)
sudo usermod -aG docker $USERImportant: After adding your user to the docker group, log out and back in for the change to take effect.
git clone https://github.com/alphafox02/WarDragonAnalytics.git
cd WarDragonAnalyticsCopy the example environment file and edit it:
cp .env.example .env
nano .env # or use your preferred editorSet these required variables:
# Database password (change this!)
DB_PASSWORD=your_secure_db_password_here
# Grafana admin password (change this!)
GRAFANA_PASSWORD=your_secure_grafana_password_here
# Optional: Custom ports
# WEB_PORT=8090
# GRAFANA_PORT=3000
# DB_PORT=5432IMPORTANT: Use strong, unique passwords! These will secure your database and Grafana access.
Copy the example kits configuration:
cp config/kits.yaml.example config/kits.yaml
nano config/kits.yamlEdit to add your kit(s):
kits:
- id: kit-001
name: "Mobile Unit Alpha"
api_url: "http://192.168.1.100:8088"
location: "Field Operations"
enabled: true
- id: kit-002
name: "Fixed Site Bravo"
api_url: "http://10.0.0.50:8088"
location: "Headquarters"
enabled: trueFor single-kit local deployment (Analytics on same device as DragonSync):
kits:
- id: local-kit
name: "Local WarDragon Kit"
api_url: "http://127.0.0.1:8088"
enabled: truechmod +x scripts/*.sh./scripts/start.shThis will:
- Pull the latest Docker images
- Build the application containers
- Start all services in detached mode (including MQTT broker)
- Display access URLs
Note: MQTT ingest is enabled by default on port 1883. Configure DragonSync on your kits to push data to this server's IP. See MQTT Ingest Guide for details and security hardening.
Expected output:
WarDragon Analytics - Starting Services
==========================================
Pulling latest Docker images...
Building application images...
Starting containers...
==========================================
WarDragon Analytics is running!
==========================================
Access the services at:
Web UI: http://localhost:8090
Grafana: http://localhost:3000
MQTT: mqtt://localhost:1883
Web UI (http://localhost:8090)
- Main Map: Real-time drone tracks from all kits
- Kit Management: Add/remove/configure kits
- Export: CSV and KML export for analysis
Grafana (http://localhost:3000)
-
Default Login:
- Username:
admin - Password: (from your
.envfile)
- Username:
-
Pre-built Dashboards:
- Operations Overview
- Kit Health Monitoring
- Drone Analytics
- Signal Analysis
Use the included test data generator to simulate drone detections:
python3 app/test_data_generator.pyThis will:
- Generate realistic drone tracks
- Simulate FPV signal detections
- Populate the database with test data
- Allow you to verify the UI and dashboards
Check the data in:
- Web UI: http://localhost:8090
- Grafana: http://localhost:3000
./scripts/logs.sh./scripts/logs.sh collector # Collector service only
./scripts/logs.sh timescaledb # Database only
./scripts/logs.sh web # Web UI only
./scripts/logs.sh grafana # Grafana only./scripts/logs.sh -f --tail=50 # Last 50 lines, follow mode./scripts/stop.sh./scripts/stop.sh
./scripts/start.shdocker-compose ps./scripts/backup.shBackups are saved to ./backups/ with timestamp:
wardragon_analytics_20260119_143022.sql.gz
Restore a backup:
gunzip -c backups/wardragon_analytics_20260119_143022.sql.gz | \
docker-compose exec -T timescaledb psql -U wardragon -d wardragon./scripts/reset-db.shWARNING: This permanently deletes all collected data!
./scripts/stop.shdocker-compose down./scripts/cleanup.shYou'll be prompted to confirm before data deletion.
./scripts/cleanup.sh --keep-volumes-
Check Docker is running:
docker ps
-
Check port conflicts:
sudo lsof -i :8090 sudo lsof -i :3000 sudo lsof -i :5432
-
View error logs:
./scripts/logs.sh
-
Verify kit API is accessible:
curl http://192.168.1.100:8088/status
-
Check network connectivity:
ping 192.168.1.100
-
Verify DragonSync API is enabled on the kit (check DragonSync config)
-
Check firewall rules on both Analytics host and kit
-
Check TimescaleDB container is running:
docker-compose ps timescaledb
-
Verify .env DB_PASSWORD matches:
grep DB_PASSWORD .env
-
Check database logs:
./scripts/logs.sh timescaledb
-
Check disk usage:
df -h docker system df
-
Clean up old Docker data:
docker system prune -a --volumes
-
Reduce data retention (edit
timescaledb/init.sqlretention policies)
By default, Analytics retains:
- Raw data: 30 days (drones, signals)
- System health: 90 days
- Hourly aggregates: 1 year
To modify retention, edit timescaledb/init.sql and reinitialize:
-- Example: Change to 7 days
SELECT add_retention_policy('drones', INTERVAL '7 days');Then reset the database:
./scripts/reset-db.sh- Use strong passwords in
.env - Configure firewall to restrict access:
sudo ufw allow from 192.168.1.0/24 to any port 8090 sudo ufw allow from 192.168.1.0/24 to any port 3000
- Enable HTTPS with reverse proxy (nginx/Caddy)
- Set up automated backups:
# Add to crontab 0 2 * * * cd /path/to/WarDragonAnalytics && ./scripts/backup.sh /mnt/backups
- Configure all kits in
config/kits.yaml - Ensure Analytics host is reachable from all kits
- Monitor kit health in Grafana "Kit Health" dashboard
- Scale resources if needed (edit
docker-compose.ymlresource limits)
- Explore Grafana dashboards - See pre-built analytics and visualizations
- Configure alerts - Set up webhook alerting (Slack, Discord) in
.env - Export data - Use CSV export for offline analysis
- Enable authentication - Set
AUTH_ENABLED=truefor password protection - Set up automated backups - Run
./scripts/setup-backup-cron.sh - Customize dashboards - Create your own Grafana panels
- Read the docs:
| Script | Description | Example |
|---|---|---|
start.sh |
Start all services | ./scripts/start.sh |
stop.sh |
Stop services gracefully | ./scripts/stop.sh |
logs.sh |
Tail service logs | ./scripts/logs.sh collector |
backup.sh |
Backup database | ./scripts/backup.sh /mnt/usb/backups |
reset-db.sh |
Reset database (delete all data) | ./scripts/reset-db.sh |
cleanup.sh |
Complete cleanup | ./scripts/cleanup.sh |
- Issues: GitHub Issues
- DragonSync: alphafox02/DragonSync
- Documentation: architecture.md
Apache 2.0 (same as DragonSync)
Happy tracking!