To migrate Lovable Cloud to Supabase, you create your own Supabase project, export the database from Lovable, restore it into the new project, then move everything the export leaves behind by hand: stored files, edge functions, secrets, sign-in providers, redirect URLs and payment webhooks. The database move is the easy part. The pieces around it are where founders get stuck, and where users get locked out or payments go missing.
Your Lovable app works. Customers use it, maybe pay for it. Now you want to own the infrastructure under it: the data in an account in your name, a bill you can read line by line, and a setup an investor's technical advisor or your first hire can inspect. This post walks through the move in the order I'd do it, what Lovable's export does and doesn't carry, when to pick plain Supabase and when AWS, and the checklist I run before switching anything.
TL;DR#
- Lovable's export carries your database, including user accounts and password hashes. Restored into Supabase, users keep their passwords, but everyone is signed out once.
- It doesn't carry files, edge function deployments, secrets, sign-in provider settings, API keys or Stripe webhook endpoints. Each is a separate step.
- Managed Supabase is the right destination for most Lovable apps. It runs the same stack, and Lovable supports it directly. AWS makes sense when a customer, regulator or existing setup requires it.
- Rehearse first. Lovable allows one database export every 24 hours, so a trial run and the real cutover need two different days.
- Download the export and your files before removing Lovable Cloud. Removing the database deletes the backend, and the export with it.
Why founders move off Lovable Cloud#
Lovable Cloud is Lovable's built-in backend: a database, sign-in, file storage and server functions, run for you on Supabase under the hood. It's a good place to start. The reasons to leave usually arrive with success:
- Ownership. Customer data sits in an account you control, under your name and your contracts.
- Cost you can see. On your own Supabase or AWS account, every line of the bill is visible, and you choose the plan, backups and limits.
- Access. Your developers, auditors and future hires can work on the database and logs directly, with their own accounts and permissions.
- Requirements from customers. Enterprise buyers and regulated industries ask where data lives, who can reach it and how it's backed up. "Inside our app builder" is a hard answer to give.
None of these mean leaving Lovable the editor. You can keep building in Lovable after the backend moves; it just talks to your Supabase project instead of its own.
Supabase or AWS: where should your Lovable app go?#
Lovable's docs are clear on what they support: if you move the built-in backend, the supported destinations are managed Supabase and self-hosted Supabase. Anything else means replacing parts of the app yourself. That gives you three realistic options:
| Destination | What it means | Choose it when… | The catch |
|---|---|---|---|
| Managed Supabase (supabase.com) | Same stack Lovable Cloud runs on, in your own account | You want ownership and control with the least change. This fits most apps. | You now own backups, plan limits and upgrades |
| Self-hosted Supabase on AWS | Supabase's open-source stack in Docker, on servers in your AWS account | Data must stay in your AWS account or region, or you already run on AWS | You run auth, storage, realtime and edge services yourself, and patch them |
| Rebuilt on AWS services | Database on RDS, sign-in on Cognito or similar, files on S3, your own API | You've outgrown Supabase's model, or need something it can't do | It's a partial rebuild, not a migration. Lovable's editor no longer understands your backend. |
There's also a fourth option, if you're on Lovable's Enterprise plan: in October 2026 Lovable opened a private preview that runs Lovable inside your own AWS account, with the app's database on Aurora PostgreSQL and files in S3. The editor and its AI still run on Lovable's side.
My default advice: move to managed Supabase first. It's the smallest change that gets you ownership. If you later need AWS, you'll be moving from a backend you control and understand, which is a much easier project. For what a lean AWS setup looks like when you do get there, see AWS architecture for startups.
What moves with the export, and what doesn't#
This is the table I wish every founder saw before starting. Lovable's database export is a full PostgreSQL backup, both structure and data. Everything else is on you.
| Piece | Moves with the export? | What you do |
|---|---|---|
| Tables and data | Yes | Restore the backup into the new project |
| User accounts and password hashes | Yes | Nothing; users keep their passwords |
| Signed-in sessions | No | Everyone signs in again once. Warn them first. |
| Row Level Security policies | Yes, as part of the schema | Verify them; don't assume |
| Files in storage | No | Download from Lovable, upload to matching buckets |
| Edge function code | It's in your repo, not deployed | Deploy each function to the new project |
| Secrets (Stripe, email, AI keys) | No | Set each one again in the new project |
| Sign-in providers (Google, GitHub…) | No | Turn each on again and update its settings |
| OAuth redirect URLs | No | Point them at the new project's URL |
| Stripe webhook endpoint | No | Create a new endpoint; it gets a new signing secret |
| Scheduled jobs | Check | Compare after the restore; make sure they don't run twice |
| Lovable AI features and connectors | No | Replace with your own provider accounts |
A note on passwords, because you'll read conflicting things. Older guides, written before Lovable added its own export, say passwords can't be moved and every user needs a reset. Lovable's current docs say the opposite: accounts and password hashes (the scrambled form passwords are stored in) are in the export, and restored into Supabase, "your users keep their passwords." A reset flow is only needed if your destination can't restore Supabase's accounts, which is the case if you rebuild sign-in on something else.
How to migrate Lovable Cloud to Supabase, step by step#
These steps follow Lovable's own guide to deploying outside Lovable, in the order I'd run them, with the gaps filled in. Steps 2 to 8 are developer work. If you don't write code, read them anyway: they're the questions to ask whoever does it.
1. Inventory what your app actually uses#
Before touching anything, write one list: every secret the app uses, every sign-in method, every edge function, every scheduled job, every webhook (Stripe and others), every external service, and every AI feature that runs through Lovable. Connect the project to GitHub so the code, including the database migration files in supabase/migrations/, sits in a repository you own.
This list becomes your checklist. Most migrations that go wrong skip it, and discover the forgotten secret in production.
2. Create the Supabase project and rebuild the schema#
Create a new project at supabase.com in a region close to your users. If you have paying customers, choose a paid plan: Supabase backs up paid projects daily, while free-plan projects are expected to export their own data. Then apply the migration files from supabase/migrations/ in timestamp order. They define the tables, the Row Level Security policies, and the storage buckets with their access rules.
3. Export the database from Lovable and restore it#
In Lovable, go to More → Database → Manage → Settings, and under Export project data start the export. Lovable emails you when it's ready and saves it to your project's storage. Download it and keep a copy somewhere else.
The limits matter for planning: databases up to 15 GB can be exported, the export file can be at most 5 GB, you get one export every 24 hours, and the project must be running (a paused project, including one paused because credits ran out, has to be resumed first).
The file is a PostgreSQL backup archive, not SQL you can paste into an editor. Your developer restores it with pg_restore. Do the first restore into a scratch project to see what errors come up, because restoring over a database that already has objects in it can conflict.
4. Check Row Level Security before anyone logs in#
Row Level Security (RLS) is the set of database rules that decides which rows each user may read or change. The policies come across with the schema, but "came across" isn't "correct." Open Advisors → Security in the new Supabase dashboard and clear every warning, then do the two-account test: sign in as user A, open something private, and try the same URL as user B. If B can see it, stop.
If your app has teams or companies, the policies are more involved; I go through the patterns in multi-tenant SaaS in PostgreSQL.
5. Move your stored files#
Uploaded files (avatars, documents, invoices) are not in the database export. Download them from More → Storage in Lovable and upload them to the buckets with the same names in the new project. Then check each bucket's public or private setting matches the old one.
6. Deploy edge functions and set their secrets#
Edge functions are the small server-side programs your app calls for anything that needs a secret: payments, emails, AI calls. Their code lives in supabase/functions/ in your repository. Your developer deploys them with the Supabase CLI and sets every secret again, because Lovable's secrets are not part of the export:
npx supabase functions deploy
npx supabase secrets set STRIPE_SECRET_KEY=... STRIPE_WEBHOOK_SECRET=... RESEND_API_KEY=...
This is also the moment to stop using any key that was ever pasted into a chat or committed to code. A migration is the cheapest time to rotate keys; my 10-minute API key check shows where they hide.
7. Reconnect sign-in providers and redirect URLs#
In the new project, turn on each sign-in provider again under Authentication → Sign In / Providers. For Google, GitHub or any other OAuth provider (the "Sign in with…" buttons), open that provider's developer console and add the new Supabase project's callback URL. Then set your app's real domain as the Site URL and in the allowed redirect URLs. Password reset and magic-link emails use these, so test them too.
8. Point Stripe at the new backend#
If Stripe talks to your app through a webhook (a message Stripe sends your server when a payment succeeds, fails or renews), that webhook points at a function URL that contains your old project's address. Create a new webhook endpoint in Stripe for the new function URL. Stripe generates a unique signing secret for each endpoint, so set the new whsec_ value as a secret in step 6 or every event will fail verification.
During cutover, both endpoints may receive the same event, so make sure your handler records event IDs and ignores duplicates; my Stripe webhooks post covers that pattern. After the switch, disable the old endpoint and watch Event deliveries for failures. In live mode Stripe retries a failed delivery for up to three days, so nothing is lost if you catch it.
9. Switch the app's environment variables#
The frontend finds its backend through three values that are baked in when the app is built, so the app must be rebuilt after changing them:
VITE_SUPABASE_URL=https://<new-project-ref>.supabase.co
VITE_SUPABASE_PUBLISHABLE_KEY=<new publishable key>
VITE_SUPABASE_PROJECT_ID=<new-project-ref>
In the Lovable project, update .env and the project_id in supabase/config.toml. Lovable pushes the change to your repository, which may trigger a deploy, so do this last, inside your cutover window.
10. Replace what Lovable ran for you#
AI features in your app run through Lovable's AI gateway until you swap them for your own provider account (OpenAI, Anthropic, Google). App connectors aren't exported either. Each needs its own integration and keys. Then compare scheduled jobs against your inventory and recreate any that are missing, making sure the old and new backends never run the same job at once.
Need a hand with the move?#
If steps 3 to 8 read like a foreign language, that's normal, and it's exactly the part I do. My Lovable-to-production migration covers the inventory, a rehearsal on a copy, the cutover and a week of watching it afterwards, with a plain-language plan before anything is switched. Get a migration plan for your app.
Where founders get stuck#
The steps above look tidy. These are the places the real moves snag:
Everyone gets logged out at once#
Sessions don't carry over, so on cutover day every user is signed out together. That's fine if you warned them, and a support flood if you didn't. Send a short email the day before, and make sure password reset works on the new project before you switch.
"redirect_uri_mismatch" on the login screen#
The most common cutover-day error. The Google or GitHub OAuth app still lists the old callback URL. It's a two-minute fix if someone has access to that developer console, and a long afternoon if the account belongs to a freelancer who's moved on.
File links that point at the old project#
Apps often save a file's full public URL in a database row. Those URLs contain the old project's address, so once Lovable Cloud is removed, every image and document breaks. Search your tables for the old project reference and rewrite the links during the migration, not after.
Payments that "worked" but didn't unlock anything#
The customer pays, Stripe sends the webhook to the old URL or signs it with the old secret, and the account never upgrades. Check Stripe's event deliveries for the new endpoint in the first hour after cutover.
Data written after the export#
Anything users create between the final export and the switch exists only in the old database. Either put the app in a short maintenance window for the final export, or plan how you'll copy the gap across.
The 24-hour export limit#
Founders often plan to "export, test, fix, and re-export" in one evening. With one export per day, the rehearsal and the real cutover happen on different days. Put both in the calendar.
The pre-cutover checklist#
Don't switch until every box is ticked:
- The full inventory exists: secrets, sign-in providers, edge functions, scheduled jobs, webhooks, external services, AI features
- A rehearsal restore into a scratch Supabase project worked, and the app ran against it
- Security Advisor shows no RLS warnings, and the two-account test passes
- Every edge function is deployed, and every secret is set (and rotated where it was ever exposed)
- Every sign-in provider works, including password reset and email links, on the new project
- Stored files are uploaded, and no database row still links to the old project's URL
- A new Stripe webhook endpoint exists, its secret is set, and a test event succeeded
- The webhook handler ignores duplicate events
- Scheduled jobs exist once, on the new backend only
- Automatic backups are on in the new project, and you know how far back you can restore
- Users have been told they'll need to sign in again
- The final export and all storage files are downloaded and kept outside Lovable
- There's a written rollback plan: how to point the app back at Lovable Cloud if the cutover fails
Only after a week of the new backend running cleanly would I remove Lovable Cloud from the project. Then run the rest of my SaaS launch checklist against your new setup; owning the backend means owning backups, monitoring and alerts too. If the app was built quickly and you haven't had it reviewed, my production readiness audit for vibe-coded apps is the natural next step, and what to fix first in an AI-built app helps if something is already breaking.
Want me to move it for you?#
I offer a Lovable-to-production migration. I take your Lovable Cloud app to your own Supabase project (or AWS, if you need it), handle the files, functions, secrets, sign-in and Stripe webhooks, rehearse the cutover on a copy, and switch it with your users barely noticing. You get a written plan first, so you know the scope before any work starts. Book your migration.
FAQ#
Can I move my Lovable Cloud project to my own Supabase?#
Yes. Lovable supports moving its built-in backend to managed Supabase or self-hosted Supabase. You export the database from the project's settings, restore it into your own Supabase project, then move files, edge functions, secrets, sign-in settings and webhooks separately, and point the app at the new project.
Will my users have to reset their passwords after leaving Lovable Cloud?#
Not if you move to Supabase. Lovable's database export includes user accounts and password hashes, so users keep their passwords after the restore. They will be signed out once and need to sign in again. A password reset is only needed if you move sign-in to a different system that can't use Supabase's accounts.
Does the Lovable Cloud export include storage files and edge functions?#
No. The export contains the database only: structure, data, and user accounts. Files in storage must be downloaded from Lovable and uploaded to your new buckets. Edge function code is in your repository and has to be deployed to the new project, and every secret it uses has to be set again.
Can I host my Lovable app on AWS?#
Yes, in a few ways. The frontend is a standard web project you can build and host outside Lovable, including on AWS. For the backend, Lovable supports self-hosted Supabase, which you can run on AWS servers. Rebuilding the backend on AWS services such as RDS and Cognito is possible, but it's a partial rebuild that Lovable doesn't support directly.
Can I keep building in Lovable after moving to my own Supabase?#
Yes. Lovable can work with a Supabase project you own: you update the project's environment values to point at your Supabase project, and the editor keeps working against it. What changes is that you, not Lovable, now manage that project's plan, backups, secrets and settings.
How long does it take to migrate off Lovable Cloud?#
It depends on how many functions, files, sign-in methods and integrations the app has. One hard constraint is that Lovable allows one database export every 24 hours, so a rehearsal and the real cutover need to be on separate days. Plan for a rehearsal, a fix-up period, and a short cutover window.
