Skip to main content
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.

When to use this

Requirements

  • Node.js 20+, pnpm, Cloudflare account
  • Same secrets as a normal deploy (Environment Variables)
  • Cloudflare KV (incremental cache), queues; R2 optional when enabled on the account

1 — Install

Cloudflare-related files: wrangler.jsonc, open-next.config.ts, custom-worker.ts.

2 — Create Cloudflare resources (once)

Paste the returned id / preview_id into wrangler.jsonc → kv_namespaces binding NEXT_INC_CACHE_KV.

3 — Personalize wrangler.jsonc

Tenant viewers use the platform host or {slug}.your-platform-host style subdomains — not customer-owned custom domains. See Domain.

4 — Secrets

Local preview: copy .dev.vars.example → .dev.vars (includes NEXTJS_ENV=development).

5 — Deploy

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

Troubleshooting