Skip to main content

Moving a Lovable app to your own GitHub, database and hosting

Lovable writes real code, and its own documentation says you aren't locked in: the code can sync to your GitHub, the app can run on another host, and the database can move to your own Supabase project. What catches people out is that these are separate moves. The code comes out easily. The data, the user accounts and the secrets each need their own step.

Rather just ask someone? Talk to us

In short

To move a Lovable app, connect Git sync so the code sits in a GitHub repository you own, then deploy that repository to a host such as Vercel. If the app uses Lovable's built-in backend, the database, user accounts, files and secrets move separately, usually into your own Supabase project. If Lovable is working, Git sync alone removes most lock-in.

Lovable's built-in backend, or your own Supabase
A Lovable app keeps its data in one of two places. The built-in backend, which the product also calls Cloud, runs on Supabase's open-source foundation and is managed and billed through your Lovable workspace. Or the project is connected to a Supabase project you own, billed by Supabase. Lovable's docs say switching between the two isn't automatic, so check which one you have before planning a move (Lovable, checked November 2026).

What moves, and what our help costs

Lovable's own documentation, checked November 2026; its features and limits change. Our prices are fixed and quoted before work starts. Vercel and Supabase bill you on their own plans.

Git sync to GitHub
Every Lovable plan
Two-way sync between the project and a repository in your account. Lovable creates the repository when you first link the project.
Codebase download
Paid plans
A one-off zip of the source. Like Git sync, it includes the database migration files but no database records or stored files.
Database export
One every 24 hours
From the built-in backend: structure, data, and user accounts with password hashes. Not stored files, Edge Function code, secrets or sign-in provider settings.
Audit before the move
$495
Our fixed-price audit of the code, database and hosting, with a written report within 3 business days.
The move and the fixes
$2,500 to $8,000
Our typical rescue sprint range, quoted at a fixed price once the audit shows what's involved.

Moving it, step by step

  1. Check which kind of Lovable app you have

    Lovable apps created from 13 May 2026 use TanStack Start, which runs server code. Older ones are React and Vite apps that build to static files. Open package.json: a TanStack Start project lists @tanstack/react-start. The hosting, the 404 fix and the environment variables differ between the two, so find out first.

  2. Put the code in a GitHub account the business owns

    Git sync, on every Lovable plan, links the project to a repository and keeps the two in two-way sync, so you can keep building in Lovable. Link it under the business's own GitHub account or organisation, not a contractor's. Paid plans can also download the code as a zip, but that's a snapshot, not a sync.

  3. Deploy the repository to Vercel

    Lovable's Publish button publishes only to Lovable hosting, so the new host deploys from GitHub. Connect the repository to Vercel and each push to the branch you choose, including the changes Lovable pushes, triggers a new deployment. Deploy to a temporary address first, and move your domain only once everything checks out.

  4. Fix the 404 on refresh

    On an older React and Vite app, the pages exist only in the browser, so opening any address other than the home page directly, or refreshing it, can return a 404 on Vercel. Vercel's fix is a vercel.json file at the project root that rewrites every path to /index.html. On a TanStack Start app, the same 404 usually means the host isn't running the server part.

  5. Set the environment variables, and keep secrets out of VITE_ ones

    Copy the values from the repository's .env file into Vercel's project settings. On the built-in backend these are the VITE_SUPABASE_ values, plus SUPABASE_URL and SUPABASE_PUBLISHABLE_KEY for a TanStack Start app's server code. Secrets your server functions read aren't in the repository, so set those on the host as well. Vite bundles anything prefixed VITE_ into the browser code, so no secret key belongs there. Vercel applies changed variables only to new deployments, so redeploy after editing.

  6. Move the backend only when you need to

    The front end can run on Vercel while the data stays on Lovable's built-in backend. To own the backend, Lovable's supported destination is a Supabase project: apply the migration files, restore the database export, copy the stored files, redeploy Edge Functions and set their secrets again. AI features and connectors that run through Lovable need replacing.

  7. Update sign-in, then check row-level security

    Add the new address to your sign-in provider's allowed redirect URLs, or sign-in fails on the new host. Then check every table. Supabase's publishable key is visible to anyone using the app and reaches only what row-level security allows, so once the database is yours, making sure each table has it switched on, with policies that fit, is your job too.

Stay, move the hosting, or move everything?

Three setups Lovable's own docs describe. Most apps never need the third.

CriteriaStay, with Git sync onYour code and hosting, Lovable's backendEverything on your own accounts
What movesNothing. A synced copy of the code sits in your GitHubThe front end, deployed from your GitHub to a host such as VercelThe front end, database, users, files, functions and secrets
You take onNothing newDeployments, environment variables, the 404 rewrite and sign-in redirectsAll of that, plus backups, row-level security, sign-in settings and monitoring
Lovable still bills forYour plan and Cloud usageYour plan, plus Cloud usage, AI features and connectors that run through itNothing, once nothing calls Lovable and you change your plan
Best whenThe app works and you want a backup and a way outYou want your own deployment pipeline but the backend is fineYou need the data under your own account, or you've finished building in Lovable

Before you switch your domain

Lovable's docs recommend proving the new setup on a temporary address first. This is the list we check.

  • Git sync connected, with the repository in an account the business owns
  • The app running on your own computer from a clone, so you know every variable it reads
  • A test deployment on a temporary address, not your domain
  • A page other than the home page opened directly and refreshed, with no 404
  • Sign-in and sign-out working on the new address
  • The database export and stored files downloaded and checked before anything is removed
  • Row-level security on every table, and no secret key in a VITE_ variable
  • A search of the code for AI features and connectors that still call Lovable

When staying is the better answer

If your Lovable app works, your users are happy and you're still changing it every week, stay. Lovable's own advice is to sync your code to GitHub and move parts only when you hit a real constraint, and that's sound: Git sync is on every plan and means you can leave whenever you need to. Move when you need the data under your own account, or the app has outgrown prompting.

Stay up to date

Tech that matters to Australian small businesses. Unsubscribe anytime.

Tell us what you're on, and what isn't working

Name the platform, roughly what you pay, and what's getting in the way. We'll tell you whether to stay, switch to another product or build, and what the move would involve. Staying is a perfectly good answer.

Only if a quick call would be easier than email.

What are you thinking of leaving?(optional)
Rough budget(optional)

A range is enough. It helps us recommend the right approach, not the biggest one.

No obligation, and we never share your details.

Common questions

Yes. Git sync, on every plan, puts the code in a GitHub, GitLab or Bitbucket repository you control and keeps it in two-way sync. Paid plans can also download the codebase as a zip. Both include the source and the database migration files, but not your database records or stored files (Lovable, checked November 2026).

Open Project settings, then Git, and connect GitHub. When you first link a project, Lovable creates a new repository and starts two-way sync, and you keep editing in Lovable as before. Connect it to the business's own GitHub account or organisation, so the code stays yours whoever builds it.

On the built-in backend, go to More, Database, Manage, then Settings, and choose Export data. Lovable emails you when the export is ready and saves it to the project's storage. It's a compressed PostgreSQL archive that a developer restores with pg_restore. You can request one every 24 hours, and single tables download as CSV.

Not from Lovable's Publish button, which publishes only to Lovable hosting. Connect the GitHub repository from Git sync to Vercel instead, and Vercel deploys each push to your chosen branch, including the changes Lovable makes. Lovable's own docs list Vercel among the hosts a Lovable app can run on.

On an older React and Vite app, the pages exist only in the browser, so opening or refreshing any page but the home page can return a 404. Add a vercel.json file at the project root that rewrites every path to /index.html, as Vercel's Vite guide shows, then redeploy. A TanStack Start app needs its server part running instead.

No, if you move the built-in backend to a Supabase project. Lovable's database export carries users' accounts and password hashes, so they keep their passwords after the restore. Sessions don't carry over, so anyone signed in signs in once more. Sign-in providers such as Google have to be set up again in the new project.

Moving only the front end to Vercel is mostly configuration. Moving the database, users and secrets is developer work, as Lovable's own docs say. We start with a $495 fixed-price audit, then quote the move and any security fixes as a fixed-price sprint, typically $2,500 to $8,000. Vercel and Supabase bill you on their own plans.

Also worth a look

Last reviewed . Platform prices are the vendor's published list prices when this page was reviewed and change often; check current pricing. Migration costs are indicative Australian ranges, not quotes.