Skip to content
Book a call
Book a call
← App takeover

Leaving Lovable: getting back your code, database and users

By Killian Paulic · updated on 31 October 2026

In short

Yes, you can leave Lovable, and Lovable states that what you create belongs to you. But nothing happens in one click. The code goes through GitHub, the database through an export, and the files, secrets and sign-in setup have to be redone by hand. If you restore the database into Supabase, your users keep their passwords.

This guide is based on Lovable’s official documentation, read on 31 October 2026. Lovable changes fast: check each point before you act.

Do you really need to leave?

Lovable itself says most teams don’t need to leave. The good reasons are concrete: a rule about where your data is stored, your own deployment pipeline, or a company policy on hosting.

If your app is struggling because of bugs or security holes, changing host won’t fix them. They’ll follow you. And every piece you move becomes yours to run, update and protect.

You don’t have to move everything: move only the app and keep Lovable’s backend, or move the backend and keep using the editor.

Check your app’s version first

Lovable builds apps in two ways, and they aren’t hosted the same way. Open package.json: if you see @tanstack/react-start, your app runs on TanStack Start.

Your appWhat it needs
TanStack Start (created since 13 May 2026)A host that runs server code. Plain static files are not enough.
React + Vite (older)A static file host, with a fallback to index.html for inner pages.

So a guide written before May 2026 may not cover your case.

What comes with you and what doesn’t

ItemHow it works
The codeGit sync on all plans, or a .zip download on paid plans.
The database structure and RLS rulesIn the SQL migration files, with the code.
The dataFull database export (a PostgreSQL archive to restore with pg_restore), or CSV table by table.
User accountsIn the export, with hashed passwords. Restored into Supabase, they keep their passwords, but everyone has to sign in again.
Files uploaded by usersNeither in the code nor in the export. Download them, then upload them again by hand.
Secrets and API keysNot exported. Create them again.
Sign-in with Google or GitHubSet it up again, adding the new URL to the allowed redirect URLs.
Edge functionsThe code is in supabase/functions/. Deploy them with the Supabase command-line tool.
Scheduled tasksList them, then create them again if they’re missing after the restore.
App connectorsNot exported. Replace them with your own integration with each service.
AI featuresThey go through Lovable. Replace them with your own account with a provider.

The order to follow

Keep the current app online throughout the preparation. The switch comes at the end.

  1. Connect the project to GitHub

    Lovable creates a new repository: you can’t connect it to an existing one. Don’t rewrite the history of the synced branch (force-push, rebase).

  2. Run the app on your computer

    This shows what it needs to install and which variables it needs, before a host complicates things.

  3. Deploy to a temporary URL

    Use Node.js 22 and fill in the variables. The secrets read by your server functions are not in the repository.

  4. Create the destination Supabase project

    Choose the region carefully: Lovable says it can’t be changed afterwards when it creates the project itself. Check this point if you create it yourself.

  5. Restore the data and test

    Restore the export and the files, connect your test version to them, then test with migrated accounts: open an inner page, sign in, sign out, write data, upload a file.

  6. Look for what still calls Lovable

    Search the code: connectors, AI features, the old backend’s URL. All of it keeps going through Lovable until you replace it.

  7. Make the final copy

    Anything written after the export isn’t in it. Stop writes from users, scheduled tasks and webhooks, run another export, copy the changed files, restore.

  8. Switch over

    Point your domain to the new host, then unpublish the app on Lovable.

  9. Shut down the old services

    Once you have checked the export and the files, delete the database, then disconnect Git or delete the project. Check your subscription too.

The traps to know about

  • Only one export every 24 hours

    If the final copy fails, you may have to wait a day to try again, so plan for it. The export is also limited to a 15 GB database and a 5 GB file. Beyond that, you have to contact support.

  • The database has to be running

    No export if the project is paused, including when your workspace is out of credits. You have to restart it first.

  • Deleting the database deletes the exports

    The export is saved in the project’s storage. Download it and keep it somewhere else before deleting anything.

  • VITE_ variables are frozen at build time

    They end up in the code sent to the browser. You have to rebuild to change them, and they must never hold a secret.

  • PostgreSQL alone is not enough

    The supported destinations are managed Supabase and self-hosted Supabase. With a plain PostgreSQL database, you’re missing user sign-in, storage, realtime and functions.

  • Payments don’t come with you

    If you change payment provider, products and prices have to be created again. Subscribers stay with the old provider until they subscribe again or you move them.

  • The old URL stays online

    Your lovable.app URL keeps serving the last published version until you unpublish. And your subscription keeps running until you change it.

Your questions

Another question? Email me at killian@propell.studio

Will my users lose their passwords?

Not if you restore the export into Supabase: the hashed passwords are in the export. People who are signed in will have to sign in again, so warn them and test sign-in before you switch over.

Do I need a paid plan to get the code?

No. Git sync is available on all plans. The `.zip` download is for paid plans only.

Can I keep using Lovable afterwards?

Yes, if you only move part of it. You can host the app elsewhere and keep developing in Lovable. Careful: the Publish button still publishes on Lovable.

Do I have to rewrite everything in Next.js?

No, you can leave without doing that. A TanStack Start app runs on any host that runs server code. Moving to Next.js is a rewrite, only worth doing if you have a specific reason.

Can I do it without a developer?

Lovable itself says that moving a backend is a developer’s job. You can get the code back yourself. The database, user sign-in and the switch are riskier.

Sources

Checked on 31 October 2026.

Shall we talk?

The call lasts 30 minutes and it’s free. I’ll give you my opinion on your project, even if we don’t end up working together.

Book a call

or email me at killian@propell.studio

In Rennes.