Deploy a Bolt.new app to Cloudflare Pages

Free and generous for Bolt's typical Vite apps.

Short answer

Push your Bolt.new code to GitHub, import the repo on Cloudflare Pages, build with npm run build, add your environment variables before the first build, add the (none) refresh fallback, allow the new URL in your auth provider, then connect your domain. Cloudflare Pages: Free: unlimited sites, seats, requests and bandwidth for static assets; paid from $5/mo (checked 17 Oct 2026).

Specific to Bolt.new + Cloudflare Pages
  • Use the React (Vite) preset: build command npm run build, output dist.
Need an always-on server?

Cloudflare Pages doesn't run always-on servers. If your project has a long-running backend (websockets, bots, background jobs), use Railway or Render for that part.

Step by step

  1. Check your project type

    • Vite single-page app (most projects): vite.config.* in the project, build output dist/.
    • Framework with a server (e.g. Next.js, Astro SSR): next.config.* or an SSR adapter in the config.
  2. Get the code onto GitHub

    • Built-in: Project settings → Domains & Hosting → Hosting Provider → Netlify → Publish (custom domains don't carry over automatically).
    • Download the project as a .zip, or push it to GitHub, then import into any host.
  3. Create the project on Cloudflare Pages

    Dashboard → Workers & Pages → Create → Pages → Connect to Git, choose the repository, pick the framework preset.

  4. Check the build settings

    React (Vite) preset: build command npm run build, build directory dist.

    For Bolt.new: build command npm run build, output dist (Vite).

  5. Add environment variables before the first build

    In Cloudflare Pages: Workers & Pages → your project → Settings → Environment variables. Copy these from Bolt.new:

    • VITE_SUPABASE_URL / VITE_SUPABASE_ANON_KEY (if using Supabase — names may differ; check your .env)

    Changed a value later? Rebuild. Vite bakes variables in at build time. Troubleshoot missing env vars

  6. Make page refreshes work (Usually nothing to do)

    (none)
    # No config needed: if there is no top-level 404.html,
    # Cloudflare Pages serves index.html for unknown routes.
    # If you DO ship a 404.html, add public/_redirects with:
    /*  /index.html  200

    Server-rendered projects (TanStack Start, Next.js) don't need this. Cloudflare Pages docs (opens in a new tab)

  7. Update login redirect URLs

    Add your new Cloudflare Pages URL (and later your custom domain) to your auth provider's allowed URLs. In Supabase: Authentication → URL Configuration. Redirect troubleshooting · Check RLS before going live

  8. Add your domain

    Your project → Custom domains → Set up a custom domain. Easiest if the domain's DNS is on Cloudflare (Cloudflare Registrar sells domains at cost).

    Domain not going live? DNS checklist

How much does Cloudflare Pages cost for a Bolt.new app?

Free tier Free: unlimited sites, seats, requests and bandwidth for static assets. Paid from $5/mo: Workers Paid: $5/month minimum per account — 10M requests/month included, then $0.30 per extra million. Static asset requests stay free.. Checked 17 Oct 2026 on Cloudflare Pages's pricing page (opens in a new tab).

  • If your project has no top-level 404.html, Pages treats it as a single-page app and serves / for unknown paths automatically.

Other options for Bolt.new

Related guides