← All posts

Move a Lovable or Bolt app off the builder and deploy it

Step by step: connect GitHub, take ownership of the backend, set environment variables, deploy to Cloudflare, Vercel or Netlify, and fix what breaks.

Tommy Pham

Short answer: connect the project to GitHub, make sure the backend lives in an account you own (your own Supabase project), copy the environment variables to your new host, deploy the repo there, add a rewrite for client-side routes, and update auth redirect URLs to the new domain. The frontend part is usually quick. The backend part is where the work is if you started on a built-in backend like Lovable Cloud.

I’ve built apps with both Lovable and Bolt. Part of my guide to AI app builders.

Before you start: what are you moving?

Part Where it lives Moving it
Frontend code (React + Vite) The builder, synced to GitHub Easy: deploy the repo anywhere
Database, auth, storage Your Supabase project Nothing to move. Just point the new host at it
Database, auth, storage Lovable Cloud or Bolt’s built-in backend Real migration: export data, recreate schema, move users and files
Environment variables and secrets Builder settings Copy them by hand

Step 1: Connect GitHub

  • Lovable: project settings → GitHub → connect and create the repository. Changes then sync between Lovable and GitHub.
  • Bolt: use the GitHub integration to push the project to a new repository.

Use your own GitHub account (or your company’s), not a contractor’s. You can keep using the builder afterwards. Just be clear about who edits what, so nobody overwrites anyone.

Step 2: Own the backend

If the app already uses your own Supabase project, you’re set.

If it uses Lovable Cloud, Lovable’s docs say there’s no one-click migration to your own Supabase. The path is: export the Cloud data, create a Supabase project, recreate the schema (from the migrations in the repo if present), import the data, and point the app at the new project. User accounts and storage files need separate handling. Don’t remove Lovable Cloud until the move is verified. Removing it deletes the instance.

While you’re in there, check RLS on every table.

Step 3: Collect environment variables

Find every variable the app uses:

grep -rhoE "import\.meta\.env\.[A-Z0-9_]+|process\.env\.[A-Z0-9_]+" src | sort -u

For a Vite app, public values start with VITE_ (Supabase URL and anon/publishable key). Anything secret must not have the VITE_ prefix, because it would be shipped to every visitor. → Which keys are safe in your frontend

Step 4: Deploy to your host

A Lovable or Bolt React + Vite app builds to static files, so any static host works:

Host Build command Output folder
Cloudflare (Workers static assets or Pages) npm run build dist
Vercel npm run build (auto-detected) dist
Netlify npm run build dist
Firebase Hosting npm run build then firebase deploy dist

Connect the GitHub repo in the host’s dashboard, add the environment variables, and deploy. → Which host to pick

Step 5: Fix client-side routing

Refreshing /dashboard returns a 404 on many static hosts, because there’s no dashboard.html. Add a fallback to index.html:

  • Netlify: public/_redirects with /* /index.html 200
  • Vercel: vercel.json with {"rewrites": [{"source": "/(.*)", "destination": "/index.html"}]}
  • Cloudflare: set not_found_handling = "single-page-application" for Workers static assets (Pages does this automatically for SPAs)
  • Firebase: "rewrites": [{"source": "**", "destination": "/index.html"}] in firebase.json

Step 6: Update URLs everywhere

  • Supabase → Authentication → URL configuration: set the Site URL and add the new domain to the redirect URLs.
  • OAuth apps (Google, GitHub): add the new callback URLs.
  • Payment webhooks (Stripe, Polar): point them at the new domain.
  • Hardcoded URLs in the code: search for the old preview domain and localhost.

Then connect your custom domain.

Step 7: Test like a new user

Sign up, confirm the email, log in, use the core feature, pay (in test mode) and log out, on a phone. Then work through the rest of the production checklist.

FAQ

Can I keep editing in Lovable after deploying elsewhere?

Yes, if GitHub sync stays connected. Lovable pushes to the repo, and your host redeploys from it.

Will my Lovable or Bolt URL keep working?

Usually, until you unpublish it there. Once your own domain is live, redirect people to it, so you’re not running two copies.

Do I need a server?

Not for a typical Lovable or Bolt app with Supabase. It’s static files plus Supabase. Add serverless functions or edge functions only for things that need secrets (AI calls, payments).


Want this migration done for you, backend included? I do these. See my work or get in touch below.

Sources

Contact

Let's work together. Say hi.

Open to freelance projects and remote roles. The easiest way to reach me is Upwork or email.

PaymentsUpworkpreferredWisePayoneer
© 2026 Tommy Pham