Futurista Soft Book a call (opens in a new tab)
Founder guide

How to export your Lovable code and move off Lovable

Last reviewed 21 November 2026

Maybe a developer is taking over, you want your own hosting, or you just want a copy you control. Getting the code out is easy. The database, uploaded files, secrets and sign-in settings are what catch people out.

Short answer

Connect GitHub for a two-way copy of your code, or download it as a zip on a paid plan. The code doesn’t include your data, uploaded files, secrets or sign-in settings, so export the database separately and set the rest up again at the new host. You can also keep building in Lovable and run the live app somewhere else.

First: it’s yours

Lovable’s hosting and ownership guide says you own what you create, including your code and your data. Leaving is a technical job, not a legal one.

Step 1: get the code

Connect GitHub even if you never plan to leave. It’s the simplest backup of your code you’ll ever make.

What comes with the code, and what doesn’t

Part of your appIn the code?What to do
App code and database structureYesThe structure is in migration files, such as supabase/migrations
Database contentsNoExport it separately (see below)
Uploaded files and imagesNoDownload them from More → Storage and upload them to the new storage
Backend functionsYes, the codeThey live in supabase/functions, and you deploy them yourself at the new host
Secrets and API keysNoSet them again at the new host. They’re kept out of the code on purpose
Sign-in settingsNoSet up providers and allowed addresses again
App connectors and built-in AINoThese run through Lovable, so you replace them with your own accounts
Scheduled jobsNoList them before you move, then set them up again

Step 2: export the database

If you use Lovable’s built-in backend, go to More → Database → Manage → Settings → Export data. Lovable emails you when the export is ready. It’s a standard PostgreSQL archive that a developer restores with pg_restore. You can make one export every 24 hours, for databases up to 15 GB. The details are in Lovable’s backup guide, and the full move is in our guide to moving from Lovable Cloud to your own Supabase. If your app already uses your own Supabase project, the data is already in your Supabase account.

The export includes user accounts and their password hashes, so treat the file like customer data: don’t email it around or leave it in a shared folder. Your users keep their passwords after the move, but they’ll need to sign in again.

Which kind of Lovable app do you have?

This decides where it can run, according to Lovable’s external hosting guide:

Move without breaking things

  1. Keep the Lovable version running until the new one is proven.
  2. Set the environment variables at the new host, then rebuild. Anything named VITE_ ends up in visitors’ browsers, so it must never hold a secret key.
  3. Deploy the backend functions and set their secrets if you moved the backend too.
  4. Add the new address to your sign-in settings, or nobody will be able to log in.
  5. Test everything on a temporary address: sign-up, sign-in, payments, emails and file uploads.
  6. Only then point your domain at the new host.

Do you have to leave Lovable completely?

No. Lovable supports keeping the project in Lovable for building and previews while the live app runs elsewhere, deployed from GitHub. Two things to know: the Publish button only ever publishes to Lovable’s own hosting, and an app that still uses Lovable’s AI or connectors still needs your Lovable project and credits.

When to get help

Moving the code is the easy part. Moving live customer data, sign-in and payments without anyone noticing is where it goes wrong. If real customers depend on the app, have a developer plan the move and check it first. If you want someone to take the app over completely, see what a Lovable rescue involves.

Questions founders ask

Is my Lovable code really mine?

Lovable’s documentation says you own what you create, subject to things like open-source licences, and that you own your data. Connecting GitHub means you always hold a copy of the code yourself.

Can I export on the free plan?

GitHub sync is available on all plans. Downloading the code as a zip needs a paid plan.

Will my users need to reset their passwords?

Not if the database export is restored properly, because it includes the password hashes. They will need to sign in again after the move.

Read next