How to move a Lovable app from Lovable Cloud to your own Supabase

Direct answer

Lovable Cloud runs on Supabase’s open-source foundation, but Lovable does not move a project to your own Supabase in one step. You create a Supabase project, apply the schema migrations, restore Lovable’s database export, reconfigure sign-in and redirect URLs, copy storage files, set secrets and deploy Edge Functions, then test on a separate deployment before switching. Users keep their passwords, but signed-in sessions end, and OAuth, storage links and secrets need attention.

When moving is worth it

Lovable’s built-in backend docs describe Cloud as a database, auth, storage and functions built on Supabase’s open-source foundation and managed by Lovable. For many apps that is the right setup. These are the reasons we see teams move:

  • They want to own the infrastructure and connect to the database directly. Lovable’s hosting guide says the managed Supabase path is typically chosen for direct database access, advanced database features or clearer ownership.
  • A compliance requirement, often HIPAA. Supabase’s HIPAA page says customers storing health data must sign a Business Associate Agreement with Supabase. Our HIPAA guide for Lovable and Supabase covers the rest of that work.
  • The project sits in the wrong region. The same Cloud page says a project’s region is locked once the backend is enabled.
  • They want to control cost directly. On Cloud, backend usage is billed as Lovable run credits; on your own project, Supabase bills you under its plan.

Two caveats from the docs. Moving makes you responsible for backups, monitoring, RLS, auth providers, secrets rotation and compliance. And Lovable says migrating from Supabase back to the built-in backend is not currently supported, so treat this as one-way.

The step order that works

Lovable’s move-your-backend section and its hosting guide lay out the sequence. Keep the app running on Cloud until the destination is complete:

  1. Get the code into a repository you own. Lovable’s Git sync runs two-way with GitHub, GitLab or Bitbucket.
  2. Create the Supabase project and note its URL, project ID and publishable key.
  3. Apply the schema from supabase/migrations/ in timestamp order, or drizzle/migrations/ in journal order.
  4. Restore the data. The export is a compressed PostgreSQL archive restored with pg_restore built with zstd support. It covers databases up to 15 GB, a 5 GB file, and one export every 24 hours. Restoring the whole archive over an initialized project can conflict with existing objects, so test it on the new project first.
  5. Configure sign-in providers and update redirect URLs in each OAuth app.
  6. Copy storage files into matching buckets. They are not in the export.
  7. Set secrets, deploy Edge Functions and recreate scheduled jobs. Replace app connector and AI calls, which run through Lovable until you do.
  8. Point a separate test deployment at the new project through its environment variables, leaving the Lovable project unchanged.
  9. Switch. Pause writes, take a final export, restore it, copy changed files, then update .env and supabase/config.toml in the Lovable project.

What breaks

  • The export includes user accounts and password hashes, so users keep their passwords, but anyone signed in must sign in again. Supabase’s guide to migrating auth users explains why: each project signs tokens with its own JWT secret.
  • Google, GitHub and other providers must point at the new project’s URL, and Supabase’s redirect URL settings need your production Site URL and an allow list that matches every redirectTo. Missing either sends users to the wrong place, as in our fix for the Supabase OAuth wrong redirect URL.
  • If your tables store full file URLs, they still contain the old project’s host after the restore. Rewrite them, or store paths instead of URLs.
  • Secrets, sign-in provider settings and API keys are not in the export, so a function that ran on Cloud fails on the new project until each secret is set again.
  • Scheduled jobs may be missing or doubled. Check what exists after the restore and make sure the old and new backends do not both run the same job.

Verify after the switch

Lovable’s checklist is a good minimum: the app loads, records can be created and read, a migrated account can sign in, uploads and downloads work, functions respond and scheduled jobs ran. We would add three checks. Test with two users to confirm each sees only their own rows. Make an unauthenticated request against each table to confirm RLS made the trip. And search the code for the old backend URL, connector calls and AI gateway calls.

Then remove the Cloud database only after you have downloaded and verified the export and files, because removing it deletes both. Our guide to taking a Lovable app to production covers the hardening that usually comes next.

Related Zenveus services: Fix My Lovable App, the Supabase Security Audit and the 48-Hour Verdict

Scroll to Top

Optional tracking stays off until you enable it. You can change your choice at any time.

Essential — always active
Security, requested features, and remembering these choices.

Read our cookie policy