The scaffolder sets every new site up for Cloudflare: a wrangler.jsonc that serves the built dist/ folder with Workers Static Assets, and a deploy script. A static site needs no Astro adapter.
Prerequisites
- A site created with the Quickstart, without
--deploy other - A Cloudflare account
Steps
Set the site address
In
astro.config.ts, setsitein the Nimbus config to the address readers will use.nimbus-docs checkwarns while it’s still the placeholder.Deploy
npm run deployyarn run deploypnpm run deploybun run deploypredeployrunsastro checkandastro buildfirst. The first run opens a browser to sign in to Cloudflare.
Verify
Wrangler prints the site’s address when it finishes:
Deployed my-docs triggers (<n> sec)
https://my-docs.<your-subdomain>.workers.devOpen it: your site, as it ran locally. To check the production build before deploying, run npm run preview:cf, which serves it with wrangler dev as Cloudflare will.
Use your own domain
In the Cloudflare dashboard, add a custom domain to the Worker. Then set site to that domain and deploy again.
With a server
Request rendering, the remote MCP server and Markdown at page URLs need a server. Add the Cloudflare adapter:
npx @cloudflare/nimbus-docs add adapter-cloudflareyarn nimbus-docs add adapter-cloudflarepnpm nimbus-docs add adapter-cloudflarebunx @cloudflare/nimbus-docs add adapter-cloudflareThe scripts stay the same: deploy builds and publishes the Worker. To start a new site with a server, pass --adapter cloudflare to the scaffolder.
Deploy from CI
The “Last updated” line and the sitemap’s dates come from git history, and most CI systems clone only the latest commit. Set fetch-depth: 0 on the checkout step in GitHub Actions, or run git fetch --unshallow, before the build.
Next steps
- Serve under a path: publish at
example.com/docs/. - Metadata and SEO: titles, share cards and sitemaps.