Netcraft

// From Lovable, Bolt or Replit to production

How do you move a Lovable app to your own hosting and GitHub?

Connect the project to GitHub (two-way sync, all Lovable plans), check package.json for React + Vite or TanStack Start, and deploy the repo to Vercel or Netlify with the same environment variables. Then move the backend to your own Supabase project: schema from migrations, data and users from a database export, files from storage, secrets re-added by hand.

Want it done for you? Vibe-code to Production: from €1,500, fixed quote in 24h →

Gabriel Cazaciuc

By , Founder & lead developer, Netcraft Digital

Last updated

Key facts

GitHub sync
Two-way, on all plans; .zip download needs a paid plan
Source: Lovable docs, Nov 2026
Secrets stored in Lovable
Not exported; re-add them on the new backend
Source: Lovable docs, Nov 2026
Database export
One per 24 hours; users keep passwords, sessions do not carry over
Source: Lovable docs, Nov 2026
Supported backend destinations
Managed Supabase or self-hosted Supabase
Source: Lovable docs, Nov 2026
Own hosting and Supabase with us
From €1,500, 3–4 days
Source: Our fixed-price offer, Nov 2026

Why move a Lovable app to your own hosting?

So that the app, the data and the bills are in your name. Lovable's docs say you own what you create and can host it anywhere. Moving makes that ownership practical: a change in a builder's pricing, limits or account status no longer decides whether your product is online.

You do not have to stop using Lovable. With GitHub sync, you can keep prompting in Lovable for interface changes while the app runs on your own host. Note one limit: Lovable supports moving from its built-in backend to Supabase, but not from Supabase back to the built-in backend.

Step 1: How do I get my Lovable code into GitHub?

Connect the project to GitHub from Lovable's Git settings. The sync is two-way: changes in Lovable are pushed to the repo, and commits pushed to the repo show up in Lovable. Git sync works on every plan; the one-time .zip download from the code editor needs a paid plan.

The repo contains the source code and the database migration files that define the schema. It does not contain your data, uploaded files or secrets. Those move separately in step 4.

Step 2: Which kind of Lovable app do I have?

Check package.json for @tanstack/react-start. Apps created since 13 May 2026 use TanStack Start and run server code; older apps are React + Vite and build to static files. The difference decides which hosting you need.

React + Vite (older apps)TanStack Start (new apps)
Buildnpm run buildNITRO_PRESET=node-server npm run build (or the host's preset)
OutputStatic files in dist/A Node server in .output/
Host needsAny static hostA host that runs server code
RoutingRewrite every unknown path to /index.htmlHandled by the server
SEO on your own hostEmpty HTML shell unless you add pre-renderingFull HTML on every request

The SEO row matters. Lovable pre-renders older apps for crawlers on its own hosting; once a React + Vite app is a static build on your host, that stops. See Lovable SEO before you switch the domain.

Step 3: How do I deploy the frontend to Vercel or Netlify?

Import the GitHub repo in Vercel or Netlify, set Node 22, and add the environment variables. For a React + Vite app, add a rewrite so that refreshing a page like /dashboard/settings does not return a 404. On Vercel, that is a vercel.json in the repo root:

{
  "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
}
VariableUsed byNote
VITE_SUPABASE_URLBrowserEmbedded at build time; rebuild after changing it
VITE_SUPABASE_PUBLISHABLE_KEYBrowserPublic by design; only safe with correct RLS
VITE_SUPABASE_PROJECT_IDBrowserEmbedded at build time
SUPABASE_URL, SUPABASE_PUBLISHABLE_KEY, SUPABASE_PROJECT_IDTanStack Start serverSet on the host
Function secrets (Stripe, AI providers)Edge or server functionsNever with a VITE_ prefix

Step 4: How do I move the database, users and files?

Create a Supabase project in your name, apply the schema, then restore the data. Moving the Postgres database alone is not enough: authentication, storage, realtime and edge functions have to move too.

Backend move

  • Apply supabase/migrations/ in timestamp order (supabase db push or the SQL editor)
  • Export the database in Lovable (More → Database → Manage → Settings) and download the file from More → Storage
  • Restore the .backup file with pg_restore (it needs zstd support), on a test project first
  • Check that auth users came across; their password hashes are included, so they keep their passwords
  • Download storage files and upload them into buckets with the same names
  • Deploy edge functions from supabase/functions/ with npx supabase functions deploy
  • Re-add every secret with supabase secrets set; Lovable does not export them
  • Recreate OAuth providers (Google, GitHub) and their redirect URLs for the new domain
  • Recreate scheduled jobs, and stop the old ones so nothing runs twice
  • Replace connectors and AI calls that went through Lovable with your own provider accounts

Step 5: How do I switch over without losing data?

Run the new deployment against the new backend on a test URL first, then do the final switch in a short window with writes paused. Lovable limits database exports to one per 24 hours, so plan the test export and the final export on different days.

Cutover

  • On the test URL: refresh nested routes, sign up, sign in, sign out, read, write, upload, run each function
  • Pause writes in the old app (maintenance message or read-only mode)
  • Take the final export, copy files changed since the test, restore
  • Update .env and supabase/config.toml in the repo to the new project
  • Point your domain to the new host (custom domain guide)
  • Keep the exports and files downloaded before removing the old backend
  • Tell users they need to sign in again; sessions do not carry over

Can I keep using Lovable after moving?

Yes. The repo stays synced, so Lovable can keep editing the interface while your host deploys every push. Many founders also start using Claude Code or Cursor on the same repo at this point; see Lovable vs Claude Code. Before inviting real users to the new setup, run the Supabase security checklist on the new project and the rest of the production checklist.

// FAQ

Frequently asked questions

Another question? Write to us; you get an answer from the developer within one working day.

Can I export my code from Lovable?

Yes. GitHub sync is available on all plans and keeps a full copy of the code in your repo; the .zip download needs a paid plan. You own the code and can host it anywhere.

Can I host a Lovable app on Vercel?

Yes. React + Vite apps deploy as static sites with a rewrite to index.html; TanStack Start apps need Vercel to run their server build. Add the same environment variables you had in Lovable.

Does exporting from Lovable include my database?

The repo includes the schema as migration files, not the data. Export the data and users from Lovable's database settings and download storage files separately.

Will my users need to reset their passwords?

No. The database export includes password hashes, so users keep their passwords. They will need to sign in again because sessions do not carry over.

Can I self-host the Lovable editor?

No. The editor and its AI agent are Lovable's managed services. You can self-host the app and its Supabase backend.

// From Lovable, Bolt or Replit to production

Keep reading

// From Lovable, Bolt or Replit to production

How do you connect a custom domain to a Lovable app?

You need a paid Lovable plan (Pro starts at $25/month). Add the domain in the project's domain settings, then at your DNS provider create the A record Lovable shows and a TXT record named _lovable whose value starts with lovable_verify=. Lovable issues the SSL certificate itself. Most domains work within a few hours; DNS can take up to 72.

Read the guide

// From Lovable, Bolt or Replit to production

Why doesn't Google index my Lovable app, and how do I fix it?

Older Lovable apps are React single-page apps: the server sends an empty HTML page and the content appears after JavaScript runs, so Google indexes them late or partly. Lovable apps created since 13 May 2026 render on the server. To fix an older app, enable pre-rendering, upgrade it to TanStack Start, or move public pages to a server-rendered site.

Read the guide

// From Lovable, Bolt or Replit to production

How do you secure the Supabase database behind a Lovable app?

Enable row-level security (RLS) on every table in the public schema, write policies that compare (select auth.uid()) with the row owner for reads and writes, keep the secret key out of the browser, make private storage buckets private, and check who calls each edge function. Lovable's pre-publish scan flags missing RLS, but it cannot prove your policies are correct.

Read the guide

// Start here

How do you take a Lovable, Bolt or Replit app to production?

To take an AI-built app to production you need five things the builder rarely finishes: database access rules on every table, payments confirmed on the server, hosting and a database in your own name, pages Google can read, and code you can change without breaking it. With a developer this usually takes 3–7 days and costs €1,500–3,000.

Read the guide

Vibe-code to Production, at a fixed price

Security, payments, hosting, domain and SEO for apps made with AI builders. From €1,500, 3–7 days. Written scope and price within 24 hours.