Skip to content
Learn
Deep guide

How to Migrate Off Lovable Cloud to Your Own Supabase

Yes, and we have run this Lovable app migration end to end. Existing users kept their passwords, because the restore carries the complete Supabase auth schema. Active sessions did not transfer, so everyone signed in again. The same Lovable project reconnected to the customer-owned Supabase once Cloud was removed, so they kept building in Lovable on a backend they own. The order that works: export, restore the database and auth schema, move files and secrets, verify the destination, remove Cloud, then reconnect.

Emmanuel Marboeuf
Emmanuel Marboeuf

10 years as CTO of a $10M ARR SaaS in San Francisco, shipping to Fortune 500 in regulated AI and PII. Background in cyberdefense. Now CEO of BWorlds, helping builders and companies transform vibe coded apps into real products.

Update (November 2026): Lovable has moved these actions: Export, Pause and Remove now sit under More, then Database, then Manage, then Settings, and the labels read Pause database and Remove database. The steps below follow the current path, and note the older one where the screenshots still show it. The migration results we report are from an end-to-end migration we ran ourselves.

Why migrate off Lovable Cloud

We ran this migration end to end on a real app, and three results are worth having before you start. Existing users kept their passwords, because the restore carries the complete Supabase auth schema. Active sessions did not transfer, so everyone had to sign in again. And the same Lovable project reconnected to the customer's own Supabase after Cloud was removed, so they kept building in Lovable exactly as before.

Lovable offers three self-service actions, under More → Database → Manage → Settings.

  • Export project data creates a database backup containing structure, data, and auth users with their password hashes. Lovable exports databases using up to 15 GB of storage, the export file itself can be at most 5 GB, and you can request one export every 24 hours.
  • Pause database stops an idle backend from consuming credits without deleting it. Lovable also pauses a project's backend automatically after about 7 days without activity, though not for projects with scheduled jobs or other background activity.
  • Remove database permanently deletes the backend, along with its backups, your app's user accounts, and the files in storage.

Older projects may still show these under Cloud → Overview → Advanced settings, labelled Pause Cloud and Remove Lovable Cloud. The actions are the same.

Removing the backend comes last. Export, restore, move the remaining pieces, and verify the destination before deleting anything.

How this guide works

Lovable Cloud to Supabase migration tools exist, and so do paid services. This guide uses Lovable's own export instead, restored into a Supabase project you create, so your data and your users stay in your hands and the old backend survives as a rollback until the new one is verified.

Three phases. Which ones you need depends on where you want to end up:

  • Phase 1: Own your data copies your database, users, files, functions and secrets onto a Supabase project you control, using Lovable's official export. Your app keeps running on Cloud, untouched. Everyone starts here.
  • Phase 2: Own your hosting deploys your frontend to Vercel, so the app no longer depends on Lovable's hosting. Do it if you want full control of the infrastructure or plan to build with another AI tool. Skip it if you want to keep publishing through Lovable.
  • Phase 3: Cut the cord removes the old backend and, if you are staying in Lovable, connects your own Supabase to the same project. Removal is permanent and moves nothing for you, which is why it comes last.

At the end there is an emergency playbook for when Lovable Cloud goes down.

What moves, and how

ComponentMigration path
Frontend, migrations, Edge Functions, RLS policiesGitHub repository
Database rows, schema, policies, auth users, password hashesOfficial Lovable .backup restore
Storage filesDownload and upload separately
Secret values and OAuth configurationRecreate in the destination
Scheduled jobsRestore definitions, then recreate jobs and update URLs
Active sessionsDo not transfer; users sign in again

Supabase documents the mechanism behind the password result: migrating the auth schema brings users and their hashed passwords across, so nobody resets a password. Anyone signed in at the time is signed out, because the destination's JWT secret differs.

Keep credentials private during migration

Never paste a password, a secret key or customer data into a chat prompt, even when an AI tool is helping you migrate. The export backup holds your users' personal data: keep it on your own machine, and delete it once the migration is verified.

Phase 1: Own your data

You want your database, users, files, functions, and secrets replicated on a Supabase project you control, verified, while your app keeps running on Lovable Cloud untouched.

You need: a Supabase account, a GitHub account, and 2 to 4 hours depending on the app. The database restore requires command-line tooling; use the reviewed process below.

Before you begin: the export is a snapshot. Anything your users write after the export starts will not be in it. For the final cutover, pause writes first, from users and also from scheduled jobs, webhooks and other integrations, so no data is created behind the backup. Lovable does not have a maintenance mode, but you can unpublish your project (Project settings, then Publishing, then Unpublish project). Time the export and restore on a dry run first, because those two steps set how long the pause has to last. Let your users know in advance, and start when traffic is lowest. You can republish once the migration is complete. For a first dry run, you can skip the pause and migrate a copy of live data while the app stays up.

Connect your Lovable project to GitHub

If your project is already connected to GitHub, skip to the next step. Otherwise:

  1. Create a GitHub account at github.com if you do not have one
  2. Create a new repository (the name can match your project, e.g. my-lovable-app)
  3. In the Lovable editor, go to Project Settings, then Git, then GitHub, and connect to that repository

Lovable will push your full source code, including database migrations, Edge Functions, and RLS policies. You need this for the Edge Function code and for Phase 2.

Create a new Supabase project

Go to supabase.com, create a new project. Choose a region close to your users. You will be asked to set a database password. Save it somewhere safe; the restore step needs it. Also save the project URL and publishable key (use the Copy dropdown in the dashboard).

Warning: skip the GitHub (optional) field during project creation, and do not enable automatic migration deploys yet. The export backup already contains your full schema. If Supabase also replays the migration files from your repo on top of the restored backup, the two can conflict. You will connect the GitHub integration a few steps down, right after the restore, when it can no longer conflict. (If your project has no production data worth keeping, you can skip the export path entirely and deploy just the schema from your migration files: see the "Manual schema deployment" section at the end of this guide.)

Export your database from Lovable Cloud

In your Lovable project, open More → Database → Manage → Settings. In the Export project data section, click Export data and confirm. Lovable emails you when the export is ready and saves the file to your project's storage; download it from More → Storage, where it sits in a bucket named something like database_export_..., holding a .backup file.

Download the file now and keep it somewhere safe. The export lives inside your project's own storage, so it is deleted together with the backend if you ever remove it.

If your database is larger than the 15 GB the self-service export covers, or the export file would exceed 5 GB, write to support@lovable.dev with your project ID. If you cannot use the export at all, the old fallback still works: export each table as CSV from the Database view. But be warned that Lovable writes semicolon-delimited CSVs with JSON-style array syntax that Supabase's importer rejects; ask your AI tool to convert them, and treat the backup restore as the far less error-prone path.

Restore the backup into your Supabase

Lovable's export is a PostgreSQL custom-format archive, compressed with zstd, and it contains managed schemas such as auth. That means two things: the Supabase dashboard cannot open it, and it is restored with pg_restore, not by pasting SQL into the SQL editor. Supabase's plain-SQL restore examples do not apply to this file. If you use Claude Code to execute the restore, give it the backup path and destination project, then review each command before approving it.

Restore [path to backup] into Supabase project [project name] using
Supabase's supported migration process. Preserve the complete auth schema.
When finished, compare row counts for every table and the auth-user count.
Stop and show me any restore error before modifying auth tables.

Keep credentials out of the prompt. Authenticate through the browser or terminal when requested. If the restore reports errors on auth.identities, resolve them before continuing; do not replace the auth schema with hand-written inserts.

Verify the restore

Open the Table Editor in your new Supabase project. Your tables should be there with their rows. Check Authentication to confirm your users arrived, and spot-check row counts on your most important tables against the Lovable Cloud side.

Check your auth users can sign in

We restored the complete auth schema in an end-to-end migration. Existing users signed in with their original passwords after the move. Active sessions did not transfer, so users had to sign in again.

Repeat that test with a real account before cutover.

Warning: do not hand-craft INSERT statements for Supabase's auth.users or auth.identities tables, and do not let an AI tool invent them. The restore is the supported path; if something about auth looks wrong afterwards, follow Supabase's auth migration guidance or ask for support before modifying auth tables.

Deploy Edge Functions and re-enter secrets

Your Edge Function code is in GitHub, not the backup. After the restore, connect the repository under Project Settings → Integrations, enable Deploy to production for the main branch, and confirm the functions are declared in supabase/config.toml. Trigger an intentional deployment and verify the functions in the dashboard.

The integration can also apply migrations. If it reports migration-state errors, resolve them instead of replaying the schema blindly.

Secret values never leave Lovable. Re-enter them under Edge Functions → Secrets with the exact names used by your functions.

Export storage bucket files

In your Lovable project, open More → Storage. For each bucket:

  1. Select the bucket
  2. Click the checkbox to select all items
  3. Click the download button

Then in your new Supabase project, create the same buckets and upload the files through the Storage section of the dashboard.

Warning: the restored database already contains the bookkeeping rows for your files, so the new project's Storage view may list objects whose actual file is missing until you upload it. Match your uploads to the existing paths. And if your app stores signed URLs in the database (links with a token= parameter), those URLs belong to the old project and are dead; regenerate them from the new project.

Recreate scheduled jobs

If your app uses scheduled jobs (cron), their definitions came along in the export, but the restore cannot write them into their protected home in the new project, so they need to be recreated. First, in your new Supabase project, go to Database → Extensions and enable pg_cron (and pg_net, which jobs use to call your functions over HTTP). Then list what you had: in Lovable's SQL editor (More → Database → SQL editor), run:

SELECT jobname, schedule, command FROM cron.job;

Recreate each job in your new project's SQL Editor with cron.schedule, or paste the list into your AI tool and ask it to write the statements for you. Watch the URLs: a job that calls an edge function still points at your old project's address, so swap in the new project's URL as you go. If you skip this, scheduled work silently keeps hitting a backend that will disappear in Phase 3.

Migrate Google sign-in (Optional)

Skip this if your app has no Google sign-in. It is the most involved part of the migration, so if it is not critical, turn it off for now and add it back once the rest is done.

If you need it, two things to handle:

1. Configure Google OAuth in your new Supabase project. Check your Lovable auth settings (More → Database → Users → Auth settings). If you are on "Managed by Lovable", you will need to create your own Google Cloud OAuth credentials (ask your AI tool to walk you through it if the Google docs feel dense) and configure them in your new Supabase project under Authentication, then Providers, then Google. If you are already on "Your own credentials", you can reuse the same Client ID and Client Secret.

2. Update your code. Lovable Cloud handles Google sign-in through its own libraries, not through Supabase directly. These will not work outside Lovable Cloud. Ask your AI tool to search your codebase for any calls to lovable.auth or imports from @lovable.dev/ and replace them with the equivalent native Supabase auth methods.

Existing users may need to sign in again after the move. Verify account matching and session behavior with test users before cutover; do not assume OAuth identities or existing sessions will transfer automatically.

Where you stand after Phase 1

Everything now exists in two places: your app still runs on Lovable Cloud, untouched, and a verified copy of your database, users, files, functions and secrets lives on your own Supabase. Nothing has switched, which is the point. The old backend is your rollback until the new path is verified end to end.

  • Keeping Lovable: go to Phase 3, remove the old backend and connect your Supabase to the same project.
  • Own hosting, or switching tools: do Phase 2 first, verify on Vercel against your new Supabase, then finish with Phase 3.

Phase 2: Own your hosting

After Phase 1, the migrated data is on your own Supabase and the original Lovable Cloud instance remains available as a rollback source. This phase moves the frontend to Vercel so the new production path no longer depends on Lovable hosting. This is also the phase to complete if you want to continue developing your project with another AI tool like Claude Code, Codex, or Cursor. Once your app is deployed on Vercel from your GitHub repo, you can work on the code with any tool you want and Vercel auto-deploys every push.

You need: a Vercel account and about 20 minutes.

Create a Vercel account

Go to vercel.com and sign up. The easiest option is to sign up with your GitHub account, which connects the two automatically.

Import your project

In the Vercel dashboard, click New Project, then Import your GitHub repository. Vercel auto-detects that it is a Lovable project and configures the build settings. Click Deploy.

Warning: From now on, every push to your GitHub repo triggers a new deployment automatically. This is different from Lovable, where you preview changes before publishing. With Vercel, anything pushed to main goes live. If you keep editing in Lovable, those changes will be pushed to main and deployed to production instantly. Make sure to test your changes before pushing, or ask your AI tool to help you set up a branch-based workflow where only merges to main deploy to production.

Update environment variables

Your Lovable project uses environment variables to connect to Supabase. You need to set the same values in Vercel. Find your credentials in your Supabase dashboard: click the Copy button next to your project URL, then select Project URL or Publishable key from the dropdown.

In your Vercel project settings, add:

  • VITE_SUPABASE_URL = your new Supabase project URL (e.g. https://yourproject.supabase.co)
  • VITE_SUPABASE_PUBLISHABLE_KEY = your new publishable (anon) key
  • VITE_SUPABASE_PROJECT_ID = your new project reference ID

If your app uses other environment variables (Stripe, OpenAI, Resend, etc.), add those through Vercel's protected environment settings too. Inventory the required variable names from the application code and provider dashboards; do not commit an .env file or secret values to GitHub.

Point your domain

If you have a custom domain, add it to your Vercel project and update your DNS records to point at Vercel instead of Lovable's hosting.

Warning: DNS changes can take minutes to hours to propagate. During that window, some users may still hit the old Lovable hosting while others reach Vercel. This is normal and resolves on its own.

Your app now runs on your own infrastructure. Your users hit Vercel, which talks to your own Supabase. The old backend still exists, but nobody depends on it. You can keep editing in Lovable: it pushes to main, Vercel deploys from main, so those edits go live automatically. With Claude Code or Codex you can test locally before pushing.

Phase 3: Cut the cord

Your data lives on your own Supabase, and, if you did Phase 2, your app already serves from your own hosting. The old Cloud instance is still attached to your Lovable project. This phase removes it, and reconnects the project to your Supabase if you are staying in Lovable.

Before you remove anything

Removal is permanent, so the checklist comes first:

  • The export .backup file is downloaded to your machine. The export is stored inside your project's own storage, so it is deleted together with the backend.
  • Storage files are downloaded and re-uploaded to the new project.
  • The restore is verified: tables, rows, users, policies.
  • Edge Functions are deployed and secrets re-entered on the new project.
  • Scheduled jobs point at the new project's URLs.
  • A real sign-in test passed against the new Supabase. If you are staying in Lovable and have no app pointing at the new project yet, spin up a throwaway deployment (Phase 2 without the domain step) on a vercel.app URL, test sign-in and data there, then delete it.

Remove Lovable Cloud

Open More → Database → Manage → Settings and click Remove in the Remove database section. Lovable makes you check two confirmation boxes (the second unlocks after the first) and type the project's exact display name before the final Remove. This permanently deletes the backend, its backups, your app's user accounts and the files in storage. It cannot be undone, and it does not migrate anything for you. That is what the checklist above was for.

Connect your own Supabase to the same project

If you are staying in Lovable: once the project has no backend, open Settings → General → External Supabase and click Connect. Authorize your Supabase organization, then click Connect next to your new project. Only a workspace owner or admin can link the organization.

Then point the project at it: open Code, edit .env to replace the old Supabase values with your new project's URL, publishable key and project ID, and replace the old project ID in supabase/config.toml. Save both files. Lovable does not rewrite these for you. If the preview shows an error page right after connecting, make a small edit or refresh to trigger a rebuild.

From here you keep building and publishing in Lovable exactly as before, except the backend is a Supabase project you own.

If you are done with Lovable

If you completed Phase 2 and are moving to another tool, there is nothing to connect: your app runs on Vercel and your own Supabase, and the old Cloud instance was the last dependency. Even then, do not remove it merely to finish a checklist; keep it until you are certain nothing depends on it, because preservation is safer than irreversible deletion when any dependency is uncertain.

If Lovable Cloud goes down

Lovable Cloud is unreachable, your app is down, your users are affected.

Phase 2 done: nothing to do. You run on Vercel and your own Supabase.

Phase 1 only: follow Phase 2 now. Your data is already on your Supabase, so what is left is deploying the frontend and setting its environment variables. Treat 20 minutes as a best case; DNS, integrations and verification can take longer.

Nothing done yet: you can still get the frontend back online. Deploy to Vercel from your GitHub repo (Phase 2), keep the environment variables pointing at the Lovable Cloud database (the values already in your .env), and point your domain at Vercel.

Warning: that last one only works if Lovable's hosting is down and the database is still reachable. If the database itself is failing, or you need to run data migrations, it will not be enough: run a full migration (Phase 1) or wait for Lovable support.

Verifying everything works

After completing whichever phases you need, run through this checklist:

  • Auth flows: Sign up, log in, log out, password reset. All should work against your new Supabase project.
  • Data queries: Browse your app as a user would. Verify that data loads correctly, lists populate, and detail pages render.
  • Storage files: Check that images, documents, and other uploaded files load correctly from the new storage buckets, and that no stored signed URLs still point at the old project.
  • Edge Functions: Test any server-side logic. Payment processing, email sending, API integrations.
  • RLS policies: Log in as different user types. Verify that users can only see and modify their own data.
  • Webhooks: If you use Stripe, Resend, or other services with webhooks, update the webhook URLs to point at your new domain.
  • Scheduled jobs: Confirm cron jobs run against the new project and no job still calls an old Cloud URL.
  • Custom domain: Verify your domain resolves to Vercel and that HTTPS works correctly.
  • Performance: Run a few page loads. Check that response times are acceptable from your new infrastructure.

If any check fails, the issue is almost certainly in environment variables or missing data. Go back to the relevant phase and verify each piece transferred correctly.

Manual schema deployment

If your project has no production data worth restoring (a prototype you are rebuilding fresh), you can skip the export entirely and deploy just the schema from your repo's migration files. Do not run this on a project you restored the backup into: the backup already contains the schema, and replaying migrations on top can conflict. These steps require Git (pre-installed on most Macs; on Windows, download here) and Node.js (which includes npx). Open a terminal (Terminal on Mac, PowerShell on Windows) and run:

git clone https://github.com/your-username/your-lovable-app.git
cd your-lovable-app
npx supabase login
npx supabase link --project-ref your-new-project-ref
npx supabase db push
npx supabase functions deploy

Replace your-new-project-ref with the project reference ID from your Supabase dashboard (the part before .supabase.co in your project URL). login opens your browser; link asks for the database password you saved earlier; db push applies the schema, RLS policies and indexes; functions deploy ships your Edge Functions.

If db push fails with an error like "relation does not exist", it means a migration file references a table that was created through the Lovable UI instead of through code. Paste the error into your AI tool and ask it to fix the migration file.

What comes next

You have migrated. Your app runs on infrastructure you control, and you can change database provider, switch hosting or scale without waiting for anyone's support team.

Owning the infrastructure is not the same as running it. Nobody is watching at 3 a.m. when a database connection drops, or when the Stripe webhook starts returning 500s.

That is what BWorlds is for: a CTO's checks turned into agents. They go through security, code quality, operations and compliance readiness, watch the app once it's live, rank what they find, and hand your coding tool the fix to apply. Then they check the change landed. The migration gives you control; the agents give you the operating layer around it.

Need to plan your own move?

Tell us about your app and what you need to preserve. Do not send secrets, backups, or customer data.

Contact BWorlds

Frequently asked questions.

Yes. Source code syncs to GitHub automatically, including your frontend, schema migrations, Edge Functions, and RLS policies. The database has an official export too: More, then Database, then Manage, then Settings, then Export project data. The backup carries your schema, data, and auth users with their password hashes. Lovable exports databases using up to 15 GB of storage, with a 5 GB export-file limit and one export every 24 hours. Storage files, Edge Function code, secret values and sign-in provider settings still move manually.

Yes, if you follow the verification checklist. The most common issues after migration are secrets that were not re-entered, storage files that were not re-uploaded, and scheduled jobs still calling the old Cloud URLs.

Yes, when the complete auth schema is restored correctly. In our own end-to-end migration, existing users signed in with their original passwords afterwards. Supabase documents the same thing: migrating the auth schema brings users and their hashed passwords across, so nobody has to reset a password. Active sessions are the exception. They did not transfer, so users had to sign in again. Test a real account before cutover.

The export, storage download, and reconnection are dashboard steps. Restoring the backup and deploying backend code require command-line tooling or reviewed automation. If you use an AI coding tool, review its commands and verify the result before continuing.

Yes. We verified that the same Lovable project reconnects to a customer-owned Supabase after Lovable Cloud is removed, through Settings, then General, then External Supabase. You then update the project's .env and supabase/config.toml by hand. Back up and verify the destination first, because removal is permanent.

A small app may take a few hours, but data volume, auth users, storage files, functions, integrations, DNS, and verification can extend the work substantially. There is no one-click path: Lovable states that it does not move a project from the built-in backend to your own Supabase in one step. Removing Lovable Cloud is quick only after the migration and rollback plan have already been verified.

Keep going.

All learn

Related answers