Self-hosting and deployment

Run your own FireOTA server.

Environment

bash
SUPABASE_URL=… SUPABASE_PUBLISHABLE_KEY=… (and the VITE_ copies)
SUPABASE_SERVICE_ROLE_KEY=…     # server only
FIREOTA_ENCRYPTION_KEY=…        # node -e "console.log(require('crypto').randomBytes(32).toString('base64url'))"
FIREOTA_CRON_SECRET=…           # bearer token for the maintenance endpoint
GOOGLE_CLIENT_ID=… GOOGLE_CLIENT_SECRET=…
GOOGLE_REDIRECT_URI=https://ota.example.com/api/public/v1/firebase/callback

Database

Apply every SQL file in supabase/migrations in order to a Supabase project, then configure Auth redirect URLs and providers.

Scheduler

bash
# every minute: retry failed webhook deliveries, prune expired OAuth states
curl -X POST https://ota.example.com/api/public/v1/internal/maintenance \
  -H "Authorization: Bearer $FIREOTA_CRON_SECRET"

Limits

Note: Uploads are buffered to verify their checksum, so packages are capped at 40 MB to fit edge-worker memory.