Deploy Streamly to Cloudflare Workers with OpenNext and Wrangler — KV setup, wrangler personalization, and production checklist.
Streamly ships a premade Cloudflare Workers path using OpenNext and Wrangler. This runs the full app (operator admin + viewer storefront + APIs) — not CDN-only static hosting.Production reference: https://streamly.watch via pnpm run deploy:cloudflare.
The repo wrangler.jsonc is wired for streamly.watch (routes and KV ids). Before your own production deploy, create your KV namespace, replace ids, and change routes/vars to your domain.
Tenant viewers use the platform host or {slug}.your-platform-host style subdomains — not customer-owned custom domains. See Domain.
4 — Secrets
pnpm exec wrangler secret put SUPABASE_SERVICE_ROLE_KEYpnpm exec wrangler secret put TENANT_SECRETS_MASTER_KEYpnpm exec wrangler secret put STREAMLY_CRON_SECRETpnpm exec wrangler secret put STREAMLY_INITIAL_ADMIN_EMAILpnpm exec wrangler secret put STREAMLY_INITIAL_ADMIN_PASSWORDpnpm exec wrangler secret put RESEND_API_KEY# plus TMDB, STREAMLY_FROM_EMAIL, etc. as needed
Local preview: copy .dev.vars.example → .dev.vars (includes NEXTJS_ENV=development).
5 — Deploy
pnpm run typecheck # recommendedpnpm run deploy:cloudflare
Preview: pnpm run preview:cloudflare. Also: pnpm run upload:cloudflare.Hourly Worker cron runs internal jobs including maintenance and smart_sync (catalog warm).
6 — After deploy
Check
Expect
Storefront /
Theme + branding load
/admin/login
Email + password
Payment webhooks
Stripe /api/webhooks/stripe, PayPal /api/webhooks/paypal if enabled
Legal pages
Bundled markdown (Workers-safe)
Troubleshooting
Issue
Fix
KV / binding errors
Create your namespace; replace ids in wrangler.jsonc