Deploying Lovable TanStack Start Apps to Cloudflare Workers
Lovable's new default for projects is full-stack, server-rendered. That changes the hosting story: your app isn't a folder of files anymore — it has to actually run code on every visit. Here's how Staticbot quietly handles that for you, on Cloudflare's global edge, with your own custom domain and your own Supabase.
TL;DR
- Since May 13, 2026, new Lovable projects are full-stack apps (TanStack Start with server-side rendering), not static bundles. They need a real runtime.
- Staticbot hosts them on Cloudflare's global edge for you. You don't need a Cloudflare account — we handle the infrastructure, you just point your domain.
- You bring your domain (any registrar), add a couple of DNS records we generate, and SSL is automatic.
- The migration is one flow: your Supabase backend (database, auth, edge functions, storage) and your app both move off Lovable in the same run.
- Hosting is $15/mo per app. Every migration credit — free or paid — includes the first month free.
- Bring your own Cloudflare account is on the roadmap. Until then, you're on ours.
What actually changed for your project
Before May 13, every Lovable project was a single-page React app. The build produced a folder of HTML, CSS, and JavaScript. Drop it on a CDN, point your domain at it, done. That's how Lovable apps were hosted up until then, and that's how Staticbot's existing deploys work.
New Lovable projects are different. The build still produces files, but it also produces a small server program that runs on every request — drawing data, rendering pages, running server-only logic. Lovable's announcement explains the why: faster first paint, better SEO, server-only secrets, and the AI can put backend logic right next to your components.
The catch is that this server program can't live on a plain file CDN. It needs to run somewhere, fast, on every request, from every country your users come from. That's the problem Staticbot quietly solves for you.
How we host your app
Your app runs on Cloudflare's global edge network — the same one Cloudflare uses for its own products, present in 300+ cities worldwide. We use a Cloudflare product called Workers for Platforms, which is built exactly for cases like ours: a SaaS provider hosting customer apps side-by-side, each isolated from the others, each with its own domain.
When a request hits your domain, Cloudflare terminates the connection at the nearest edge city, looks up which customer's app to dispatch to, and runs your code. The lookup and dispatch happen in single-digit milliseconds. Your app doesn't compete for capacity with other customers because Cloudflare gives each one its own isolated runtime.
You never see a Cloudflare login. You don't manage the Workers account, the routing, or the configuration. Staticbot owns the operational side; you own the app and the data.
Your domain, your registrar, no migration
Your domain stays where it is. Namecheap, GoDaddy, Google Domains, Route 53, Cloudflare-as-registrar — wherever you bought it. You don't move nameservers, you don't transfer the domain, and you keep full ownership.
What you do is add a small number of DNS records that Staticbot generates for you and shows in the deployment screen with copy buttons:
- An ALIAS (or ANAME) at the apex (
yourdomain.com), or a CNAME on a subdomain (www.yourdomain.comorapp.yourdomain.com). See our guides for adding an ANAME/ALIAS record or adding a CNAME. - One TXT record so Cloudflare can verify you control the domain and issue your SSL certificate.
Most modern registrars support ALIAS / ANAME at the apex — Namecheap, Route 53, DNSimple, Cloudflare-as-registrar, Hover, deSEC, and others. If yours doesn't (a handful of older or budget registrars still don't), the deployment screen shows you the alternative: use www as your canonical hostname and set the apex to redirect — a feature every registrar offers for free, and a pattern Vercel, Netlify, Heroku, and most other modern hosts document and support natively.
SSL is fully automatic. Cloudflare issues the certificate, renews it before expiry, and serves modern TLS. There's no certificate setup on your end and nothing to remember to rotate.
Our deployment code is open source
Two things matter for trust: what we promise, and whether you can verify it. The infrastructure code that runs to set up your hosting — the Terraform module, deliberately small and readable — is open source in the public github.com/bitfiction/staticbot repo under infrastructure/_templates/cloudflare_workers_app_template/.
Per customer, it provisions two things on Cloudflare: your custom hostname (with the SSL cert) and the routing entry that maps your domain to your app. That's the entire footprint — under 100 lines of Terraform. You can read it before you commit, you can audit it after, and you can fork it when you bring your own Cloudflare account later.
The same setup handles TanStack Start (Lovable's current default), Nuxt 3, SolidStart, Astro (with the Cloudflare adapter), and Hono Workers — the build details are configurable per stack, not baked into the infrastructure. You commit code in any of those frameworks; Staticbot picks the right build profile.
What happens when you click Deploy
Four steps. You see each one move through the Staticbot dashboard, with live status:
- Set up your domain on the edge. Staticbot creates the custom-hostname entry on Cloudflare and surfaces the DNS records you need to add. The SSL certificate is requested automatically.
- Build your app from your repo. Staticbot pulls your code from GitHub, detects your Node version and package manager from the files you committed, installs dependencies, and runs your build. No build server to configure.
- Deploy to Cloudflare. The built app is shipped to your isolated runtime on the edge. Sensitive environment variables (API keys, secrets) are pushed separately into Cloudflare's secret store — they never sit in source code or in deployment logs.
- Verify it's responding. Staticbot polls your public URL until it returns a healthy response. This is informational — DNS and certificate propagation can take a few minutes, and we don't want a green deploy to flip red just because your DNS is still warming up.
Same orchestration we use for Supabase migrations and static-site deploys — no new framework, no new mental model.
Migration from Lovable: backend + app, one run
If you're on Lovable Cloud (the bundled Supabase that comes with Lovable), Staticbot migrates everything in one guided flow:
- Inventory — Staticbot scans your Lovable Supabase: schema, tables, edge functions, storage buckets, auth configuration.
- Database — schema and table data move to your target Supabase (managed by Supabase or self-hosted, your choice).
- Edge functions, storage, auth configuration — each one re-created on your own Supabase.
- Switchover — Staticbot updates the Supabase URL and key in your GitHub repo so the deployed app talks to your Supabase. Your Lovable preview keeps using Lovable's; the live app at your domain uses yours.
- Frontend deploy — Staticbot auto-detects whether you have a classic Vite project (deploys to AWS S3 + CloudFront) or a new full-stack TanStack Start project (deploys to Cloudflare). The deploy runs. Your app goes live.
If your project predates the May 13 cutover and is still on Vite + React, the existing AWS S3 + CloudFront path is unchanged. Same dashboard, same migration, different deploy target. Nothing about the choice is sticky — if Lovable ships another stack tomorrow, we add another template, you re-deploy.
"But isn't this just Cloudflare lock-in instead of Lovable lock-in?"
Fair question. Two things make this different.
One: your app code is portable. We don't modify your repo. The code we build is a standard TanStack Start project that can also run on AWS, Netlify, or a Node server with no rewrites. Your Supabase is yours from day one, not ours.
Two: bring your own Cloudflare account is on the roadmap. When it ships, the migration path is one click: same app, same hosting setup, your Cloudflare account, your name on the cert. Our users are already asking for it — it's a priority.
Until then, you're on a Cloudflare account we own. That's a real dependency on us — we won't pretend otherwise. The promise: the deployment code we run is open source, the app we build is portable, your data is yours, and the path off Staticbot is documented end-to-end.
Want the technical deep dive?
Curious about the moving parts — Workers for Platforms, dispatch namespaces, KV-backed routing, SSL for SaaS, the wrangler commands? We wrote a companion post for that.
Read the technical deep dive