Router Deployment
This section covers how to deploy and configure router monitoring scripts on your OpenWrt routers.
Prerequisites
Before deploying, ensure you have:
- SSH access to your router
- Supabase project configured
- Required packages installed on router
- Network connectivity
Deployment Methods
Mac / Linux Script (Recommended)
The mac-deploy.sh script provides the most comprehensive deployment solution for macOS and Linux systems.
Quick Start:
./mac-deploy.sh -h 192.168.1.1 -u admin
What Gets Deployed
Monitoring Scripts
The deployment process installs comprehensive monitoring scripts that track:
- Device Monitoring: Connected devices via network scanning
- DHCP Monitoring: DHCP lease information
- Signal Monitoring: Cellular signal strength
- SIM Monitoring: Active SIM slot and ICCID
Configuration Files
- Supabase Config: Database connection settings
- Crontab: Scheduled task configuration
- Router Identity: IMEI and AT port caching
View Complete Scripts Reference →
Automatic Database Registration
NEW: When you deploy with mac-deploy.sh, the script automatically:
- Detects your router's IMEI
- Registers it in the
router_versionsdatabase table - Makes it immediately visible in the web interface
No manual registration required! Your router is ready for updates as soon as deployment completes.
Auto-Update System
The system includes automatic script updates with:
- Automatic Updates: Scripts check for updates every 2 hours
- Individual Targeting: Set different versions for different routers via Supabase
- Version Management: Centralized version control with Supabase database
- Rollback Support: Automatic rollback if update fails
- Security: API key authentication and SHA256 checksum verification
Next Steps
After successful deployment:
- Verify Monitoring: Check your Supabase dashboard for incoming data
- Monitor Logs: Watch
/var/log/auto-update.logfor updates - Test Scripts: Run individual scripts manually if needed
- Update Configuration: Modify
supabase_config.envif needed
Troubleshooting
For deployment issues, see: