You can move a Lovable app to hosting and a database you own, and Lovable documents every step. Sync the code to GitHub, deploy it to a host such as Vercel, restore the database export into your own Supabase project, then move files, secrets, sign-in and the domain. The catch: the GitHub repo holds your code and database structure, but not your data, stored files or secrets. Plan a test run first, then one cutover day with writes paused.
Lovable’s docs say the platform is “intentionally built so that you are never locked in” (ownership options). That’s true for the code. The data and the services around it are where the work is.
What does the Lovable export to GitHub contain?
You get the code in one of two ways. Git sync works on all plans: it links the project to a GitHub, GitLab or Bitbucket repository and keeps both sides in sync (Git sync). Download codebase, on paid plans, gives you a one-time ZIP.
Both give you the app’s source, its configuration and the database migration files. In Lovable’s words: “Neither includes the records in your database or the files in storage” (deploying outside Lovable).
| Part of your app | In the repo? | How it moves |
|---|---|---|
| Source code and config | Yes | Git sync or ZIP |
| Tables, columns, RLS rules, triggers, storage bucket rules | Yes, as SQL migration files | Run the migrations in order on the new database |
| Edge function code | Yes, in supabase/functions/ | Deploy with the Supabase CLI |
| Database records | No | Database export (a .backup file), restored with pg_restore |
| User accounts and password hashes | No, but in the database export | Restored with the data; everyone signs in again |
| Uploaded files | No | Download from More → Storage, upload to new buckets |
| Secrets and API keys | No | Add again at the new host |
| Google or GitHub sign-in setup | No | Set up again, update redirect URLs |
| Scheduled jobs | Partly | Check after restore, recreate what’s missing |
| Lovable connectors and AI calls | No | Replace with your own accounts |
Do you need to move everything?
Not always. Lovable’s docs describe three paths:
- Frontend only. Host the app yourself and keep Lovable’s built-in backend. Lovable’s AI features and connectors keep working.
- Backend and data. Move the database, sign-in and storage to your own Supabase project. You can keep building in Lovable.
- Full exit. Do both, then retire the Lovable services.
Each part you move becomes yours to run, back up and secure. If the goal is owning the data, you need path 2 or 3.
How do you deploy a Lovable app to Vercel?
First check which stack the app uses. Open package.json: if it lists @tanstack/react-start, it’s a TanStack Start app (new Lovable apps since May 13, 2026), and the host must run server code. If not, it’s an older React + Vite app that builds to static files in dist/.
Then, per Lovable’s guide:
- Connect the GitHub repository to Vercel (Netlify and Cloudflare Pages work the same way) and pick the branch to deploy.
- Set the build command to
npm run buildand use Node.js 22. Vercel needs no output folder setting. Netlify and Cloudflare Pages needdist. - Add the environment variables from the repo’s
.envfile, such asVITE_SUPABASE_URLandVITE_SUPABASE_PUBLISHABLE_KEY. TanStack apps also needSUPABASE_URLandSUPABASE_PUBLISHABLE_KEYfor the server. Browser values are built into the code, so rebuild after any change. - For an older React + Vite app, add a rewrite in
vercel.jsonso every route servesindex.html. Without it, refreshing a page deep in the app gives a 404. - Add the new address to your sign-in provider’s allowed redirect URLs.
Deploy to a temporary URL first. Open a deep link and refresh it, sign in and out, and try the saves and uploads your app depends on.
How do you move the database and users?
Lovable’s built-in backend runs on Supabase, so the most direct target is your own Supabase project. The order Lovable recommends:
- Create the new Supabase project.
- Run the migration files from
supabase/migrations/in date order to rebuild the tables, rules and functions. - Export the data from More → Database → Manage → Settings. You get a PostgreSQL
.backupfile, “not a SQL file you can paste into the SQL editor”. Restore it withpg_restore, on a test project first (backups and exports). - Turn on each sign-in provider in the new project and update the redirect URLs at Google or GitHub.
- Download stored files from More → Storage and upload them to matching buckets.
- Add the secrets your functions read, deploy the edge functions and recreate scheduled jobs.
- Point a test deployment at the new database and check it end to end.
Your users keep their passwords, because the hashes are in the export. Their sessions don’t carry over, so everyone signs in once more.
How do you keep your custom domain?
Once the new host works, point your domain at it using that host’s instructions. Where you change the records depends on the nameservers. If you bought the domain through Lovable and it still uses Lovable’s nameservers, you edit the records in Lovable. Otherwise you change them where your DNS lives (custom domains).
Two things stay behind. Your your-app.lovable.app address keeps serving the last version you published there until you unpublish it. And the Publish button in Lovable only ever publishes to Lovable hosting.
What traps catch people during a Lovable migration?
Most of these come straight from Lovable’s docs:
- New data after your export is missing. You can request one export every 24 hours, so the final copy needs a pause in writes.
- Removing the database deletes everything. That includes backups, user accounts, files and any export still saved in Lovable’s storage (pause or remove). Download and check the export first.
- Nothing cancels on its own. “A code export or a domain change does not cancel anything.” Your Lovable plan and Cloud usage go on until you change them.
- Jobs can run twice. Lovable warns not to run the same scheduled job on both backends. A job that sends emails would send each one twice. Switch the old ones off at cutover.
- Connectors and AI calls still go through Lovable and still use your credits until you replace them with your own accounts.
- Git sync keeps pushing. If it’s still connected, changes made in Lovable can trigger deployments on your new host.
pg_restoreneeds zstd support to read the export, and the--cleanoption drops objects, so don’t add it blindly.
A plan for cutover day
Do a full test run a few days before and time the export and restore. Then:
- Tell users about a short maintenance window.
- Pause writes: sign-ups, forms, scheduled jobs, webhooks.
- Request the final export and copy files changed since your last copy.
- Restore into the new database and run your checks on the test URL.
- Switch the environment variables to the new backend, rebuild, and move the domain.
- Turn jobs and webhooks back on, on the new backend only.
- Unpublish the
lovable.appaddress when you no longer want it live. - Keep the old database for a while, paused rather than removed, until you’re sure nothing is missing.
What about Base44 hosting?
Base44’s docs say the code export “still relies on Base44 to run, so a ZIP is a copy of your code, not a way to move your app off Base44” (Base44 developer tools). The ZIP export and two-way GitHub sync need the Builder plan or higher. The app’s data lives in Base44’s own database of “entities”, and the frontend talks to it through the Base44 SDK (backend features). So moving off Base44 means building your own backend and swapping those SDK calls, not just changing hosts. You can export each table’s data from the data view. Base44 hosting itself serves single page apps only, with custom domains and HTTPS.
What about Replit hosting?
Replit apps built with its Agent need a server, so Replit’s docs say to publish them as Autoscale or Reserved VM, not Static (deployment types). Each Replit app has two databases: a development one and a production one that holds your live data (development and production). When you move, export the production database, not the development one. The database is PostgreSQL-compatible, so Postgres clients and tools can read it, and uploaded files sit in App Storage, which runs on Google Cloud Storage.
Want us to do the move?
We start with our code audit: a fixed $3,500, with the report 5 working days after we get access. We read the code, run it and check how safe it is, so the move doesn’t carry old holes into your new setup. The report lists the next steps, the migration included, each with an hours range at $39-55 an hour, so you know the cost before you say yes. If the app is already breaking with real users, start at software project rescue.
FAQ
Can I export my code from Lovable?
Yes. Git sync, on all plans, keeps your code in a GitHub, GitLab or Bitbucket repository you own. Paid plans can also download the codebase as a ZIP. Both include the source, configuration and database migration files.
Does the Lovable export to GitHub include my database?
It includes the structure as SQL migration files, but not the records. Lovable’s docs say neither the repo nor the ZIP includes the records in your database or the files in storage. You export the data separately as a .backup file and restore it with pg_restore.
Can I host a Lovable app on Vercel?
Yes. Connect the GitHub repository, build with npm run build on Node.js 22, and add the environment variables from the .env file. Older React + Vite apps also need a rewrite so every route serves index.html.
Can I keep my custom domain when I leave Lovable?
Yes. Point the domain at your new host once it works. If the domain uses Lovable’s nameservers, you change its records in Lovable. Your lovable.app address stays live until you unpublish it.
Will my users have to reset their passwords?
No, if you restore Lovable’s database export into a Supabase project. The export holds user accounts with their password hashes, so people keep their passwords. Sessions don’t carry over, so everyone signs in once after the switch.
How much does it cost to move an app off Lovable?
You’ll pay your new host and database under their own plans, and your Lovable plan runs until you change it. With us, the first step is a fixed $3,500 code audit, and the report prices the move and every other step as hours ranges at $39-55 an hour.