Skip to main content

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

View Complete Prerequisites →

Deployment Methods

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

Learn More →

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:

  1. Detects your router's IMEI
  2. Registers it in the router_versions database table
  3. 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

Learn More →

Next Steps

After successful deployment:

  1. Verify Monitoring: Check your Supabase dashboard for incoming data
  2. Monitor Logs: Watch /var/log/auto-update.log for updates
  3. Test Scripts: Run individual scripts manually if needed
  4. Update Configuration: Modify supabase_config.env if needed

Troubleshooting

For deployment issues, see: