This page is for the moment after local setup works and you want the first safe Cloudflare deployment.
It is not the right first page if you still have not finished your local install, first build, or first sanity check.
pnpm cf:preview, pnpm cf:deploy, pnpm cf:typegenpnpm build locallyBefore touching deploy, prepare these:
pnpm installUse this check first:
npx wrangler whoamiIf that fails, sign in first:
npx wrangler loginFor this repo, the worker configuration lives in wrangler.toml, and the repo-safe example lives in wrangler.toml.example.
Run:
pnpm buildOnly continue if the build succeeds cleanly.
If you changed runtime bindings or want fresh types, run:
pnpm cf:typegenThen preview the worker locally:
pnpm cf:previewCheck the homepage and one deeper route before you deploy.
This site can ship public content pages without database or auth secrets.
Add secrets before turning on auth or database-backed features:
npx wrangler secret put AUTH_SECRET
npx wrangler secret put DATABASE_URLIf local preview uses auth, replace the placeholder AUTH_SECRET in .dev.vars with a real local secret.
Run:
pnpm cf:deployThis repo already uses @opennextjs/cloudflare, so the deploy scripts target Cloudflare Workers directly.
After the first successful deploy:
/, /openclaw, and one deeper route such as /skillsBefore calling the deployment done, confirm these:
Cloudflare should be the second proof. Local build and local preview come first.
This repo is already wired for Cloudflare Workers through OpenNext. Use the repo scripts instead of inventing a different deploy path.
If the bound domain and NEXT_PUBLIC_APP_URL disagree, links and previews become confusing fast.
Do not block a content-only launch on database secrets you are not using yet. But do not enable auth or database features without them.
Write down the deployed command, date, domain, and last known good config. It saves time later.