How to Take Your App Out of Lovable (2026): What the Export Includes, What Stays Behind, and How to Run It in Production
You take your code out of Lovable through two-way GitHub sync (all plans) or a .zip download (paid plans), and the synced repository contains the source code, migration files, and Edge Function code, while database recor
You take your code out of Lovable through two-way GitHub sync (all plans) or a .zip download (paid plans), and the synced repository contains the source code, migration files, and Edge Function code, while database records, stored files, server secrets, and sign-in provider settings move separately. With Control Plane, you point Claude, ChatGPT, or Cursor at that repository through Control Plane’s MCP server and ask it to deploy, and it builds the code and runs it with health checks and two replicas behind an HTTPS URL.
Disclosure: Control Plane publishes this guide.
TL;DR
A Lovable app leaves through GitHub sync or a .zip download, and the code is one of several things that have to move.
- How the code leaves. GitHub sync creates a repository that you own, private by default, and disconnecting leaves it intact with its history. The .zip download is on paid plans.
-
What the export contains. Source code, migration files (scripts that create your database tables), Edge Function code (server-side functions that run in Supabase), and
VITE_values in.envtravel with the repository. Database records, stored files, server secrets, sign-in provider settings, and scheduled jobs move separately. App connector connections are not exported. -
Two stacks need different hosts. Apps created from May 13, 2026 use TanStack Start and need a host that runs server code. Older apps use React + Vite and produce a static folder that needs a web server with an
index.htmlfallback. - Where the data goes. A Supabase project you connected yourself stays as it is. The database in Lovable’s built-in backend exports as a PostgreSQL backup that you restore into a Supabase project.
- What changes afterward. The Supabase Site URL and Redirect URLs point to the new address, and the custom domain’s DNS records change. DNS records are the entries that tell browsers which server answers for your domain.
- Where Control Plane fits. Connect your AI assistant to Control Plane’s MCP server, point it at the repository, and it builds and deploys the app with production defaults while Control Plane handles Day 2 operations.
How do I take my code out of Lovable?
You take your code out of Lovable by connecting GitHub, which works on every plan, or by downloading the codebase as a .zip on a paid plan.
- Connect GitHub and confirm the repository is in your account. Lovable creates a new repository, a versioned folder of your code, in the GitHub account or organization connected to your Lovable workspace. It is private by default. Sync is two-way, so changes made in Lovable are committed to the repository and commits pushed to the synced branch appear back in Lovable.
- Download the .zip instead if you are on a paid plan and do not use GitHub. Lovable’s “Download codebase” option gives you the project files without GitHub.
-
Check which stack the app uses. Apps created from May 13, 2026 (June 22, 2026 for Enterprise projects) use TanStack Start, and older apps use React + Vite unless they were upgraded. A TanStack Start project lists
@tanstack/react-startinpackage.json. The stack decides the build command and what the host has to run. -
List the environment variables the app reads. An environment variable is a named value the app reads when it builds or starts. For apps on Lovable’s built-in backend, the values are in the repository’s
.envfile. React + Vite apps expectVITE_SUPABASE_URL,VITE_SUPABASE_PUBLISHABLE_KEY, andVITE_SUPABASE_PROJECT_ID. TanStack Start apps useVITE_SUPABASE_URLandVITE_SUPABASE_PUBLISHABLE_KEYfor the browser andSUPABASE_URLandSUPABASE_PUBLISHABLE_KEYfor the server, and their.envalso holdsSUPABASE_PROJECT_ID. If you connected your own Supabase project, read the variable names from your own.envfile.
Lovable’s Git sync documentation calls the repository “a synced copy that you own”. Disconnecting Lovable leaves the repository in your account with its history. Values prefixed VITE_ are baked into the app at build time, so set them before the build runs.
What does the Lovable export include, and what stays behind?
The export carries the code, and the data, files, secrets, and settings each move by a separate route.
| Item | In the GitHub repository | How it moves |
|---|---|---|
| Source code | Yes | With the repository |
| Database migration files | Yes | With the repository |
Edge Function code (under supabase/functions/) |
Yes | With the repository, then deployed to a new Supabase project with the Supabase CLI |
VITE_ values in .env
|
Yes, committed to the repository | Read during the build. Keep them for the same Supabase project, or update them and build again for a new one |
| Server secrets | No | Entered again in a new Supabase project for Edge Functions and in the new host’s secrets store for server code. They stay in place in your own Supabase project |
| Database records | No | Stay in place in your own Supabase project. Exported from the built-in backend as a PostgreSQL backup and restored with pg_restore
|
| Auth users with password hashes | No, they are in the database backup | Restored with the database backup |
| Stored files | No | Stay in place in your own Supabase project. Downloaded from the built-in backend and uploaded again by hand |
| Sign-in provider settings | No | Set up again by hand in the new Supabase project and at each provider, including the new callback URL |
| Custom domain | No, a domain you connected stays registered with your own provider | You remove Lovable’s records and add the new host’s records |
| Scheduled jobs and app connectors | No | Scheduled jobs are recreated by hand. Connector connections are not exported, so when the backend moves each one is replaced with your own integration for that provider |
Lovable’s hosting documentation says neither GitHub sync nor the .zip “includes the records in your database or the files in storage”. Server secrets are kept out of the repository and the export. The same documentation says both Git sync and the .zip “give you the application source, including the configuration files and the database migration files”.
What does my new host have to run?
The host has to run server code for newer Lovable apps and serve static files for older ones.
| App created | Stack | Build | Run | What the host needs |
|---|---|---|---|---|
| From May 13, 2026 | TanStack Start | NITRO_PRESET=node-server npm run build |
node .output/server/index.mjs on Node.js 22, listening on port 3000 (PORT and HOST override it) |
On a container or your own server, a running Node.js 22 process; object storage or a CDN alone cannot run it |
| Before May 13, 2026 | React + Vite | npm run build |
A static dist/ folder |
A web server that serves the files with an index.html fallback |
A TanStack Start app runs server code, so a process has to stay running to answer requests. A React + Vite app compiles to static files, and a web server returns index.html for any address that does not match a file, so in-app routes keep working when a visitor opens or refreshes them.
What happens to my database, users, and files?
Your database, users, and files stay in place if you connected your own Supabase project, and they move by export and restore if the app uses Lovable’s built-in backend.
| Backend | Who owns it | What moves | What to change after the move |
|---|---|---|---|
| Lovable’s built-in backend | Lovable runs it, on Supabase’s open-source foundation | The database exports as a compressed PostgreSQL custom-format backup that loads with pg_restore from PostgreSQL 16 or later. It includes auth users with password hashes. Stored files, Edge Function code, server secrets, sign-in provider settings, and API keys are outside it. |
Restore into a new managed or self-hosted Supabase project, update the app’s Supabase URL and key values to the new project, build again, and set the project’s Site URL and Redirect URLs |
| Your own Supabase project connected to Lovable | You own it and Supabase bills it | The project stays in your Supabase account. Disconnecting Supabase in Lovable “does not change your code and does not delete anything in your Supabase project”. | Keep the same Supabase URL and key values, set the server-side ones on the new host for a TanStack Start app, add the new address to the allowed Redirect URLs, and update the Site URL if it still holds the Lovable address |
Lovable’s database backup documentation allows one export every 24 hours for databases that use up to 15 GB of storage, with an export file of at most 5 GB. Run a practice restore first and take the final export on a later day. Before the final export, stop new writes by pausing sign-ups and edits or showing a maintenance notice, and keep them stopped until the domain points to the new app, because anything saved to the old backend after the export is missing from the new database. Compare row counts after the restore, and leave the Lovable project unchanged until the new app has served real traffic. The quoted sentence about your own project comes from Lovable’s Supabase integration documentation.
Supabase’s redirect URL documentation describes the two Auth settings that matter after the move. Site URL is the default redirect when the app passes no redirectTo, and it is used for email confirmations and password resets. Redirect URLs is the list of addresses Supabase may send a user to after OAuth sign-in, such as “Sign in with Google”, or after an emailed sign-in link. If Site URL still holds the old address, or the new address is missing from Redirect URLs, reset emails and sign-in redirects can send users to the old address.
Stored files move in a separate step. Supabase’s backup documentation states that database backups do not include objects stored through the Storage API, so uploaded images and documents are downloaded from the old bucket and uploaded to the new one. Keep the same bucket names and file paths, because database rows point to files by path. Edge Functions get a new address in a new Supabase project, so services that call them, such as a payment provider’s webhooks, need that new address.
A secret that was pasted into a chat, committed to the repository, or stored in a VITE_ variable is exposed, so create a new one at the provider and revoke the old one. The Supabase publishable key is safe in the browser and limited by Row Level Security, the per-table rules that decide which rows a user can read or write. The secret key bypasses every Row Level Security policy and must stay on the server.
How do I deploy an app I built with AI?
The quickest way to deploy an app you built with AI is to connect the assistant you already use to Control Plane and ask it to deploy the repository.
- Connect the assistant to Control Plane. Control Plane is a listed connector in Claude and a listed plugin in ChatGPT, and its hosted MCP server also connects to Cursor. You connect, sign in, and select the Control Plane organizations (orgs) the assistant may access.
- Deploy from the repository with health checks and two replicas. Through Control Plane’s MCP server, the assistant builds an image from your GitHub or GitLab repository with no Docker daemon, using the Dockerfile when one is present and otherwise detecting the stack. It deploys the app as a standard workload, Control Plane’s workload type for stateless services, with production defaults that include health checks, regular probes that confirm the app responds, and two replicas, copies of the app that share traffic so one can restart while the other serves. It returns an HTTPS URL that is globally load-balanced and TLS-terminated. A static React + Vite build needs a small web server in the image, and the assistant can add one.
-
Set environment variables and secrets. Tell the assistant which variables the app reads.
VITE_values are read during the build, and a setting on the running app does not change them. The build uses the values committed in.env, so if the Supabase project changed, update.envin the repository and build again, or the app keeps talking to the old backend. Control Plane generates secret values or gives you a link to the Control Plane Console to type them, so the credential stays out of the conversation, and workloads read them ascpln://secretreferences. The Twelve-Factor App method keeps config, including credentials, in environment variables, separate from code. - Keep or move the database. Keep an existing Supabase project by setting its URL and keys as environment variables and secrets. A Lovable app relies on Supabase for sign-in, stored files, and Edge Functions as well as the database, so the built-in backend’s backup restores into a Supabase project, managed or self-hosted. For a new service that connects to a database directly, the assistant can install PostgreSQL from Control Plane’s Template Catalog with generated credentials. A highly available PostgreSQL template adds automatic failover, and a single-server template has optional PgBouncer pooling and optional scheduled backups to object storage.
- Add the custom domain and update the Supabase URLs. Change DNS only after the data is restored, the app is built again with the new project’s values, and it is tested at the Control Plane URL. On Control Plane, a custom domain needs a TXT record to prove ownership plus a CNAME or NS records. TLS certificates are issued and renewed automatically, and the domain routes to the nearest healthy Control Plane location, a cloud region where the app runs. Add the Control Plane URL and the custom domain to the Supabase Redirect URLs before you test, which is safe while the old site still runs. Set the Site URL to the address users type, normally the custom domain, when you switch DNS.
- Check logs and keep rollback ready. Logs are collected automatically and queryable with LogQL, with 30-day default retention, and the assistant can read them and report a failing workload’s likely cause and fix. An update that fails its health probes does not replace the running version, because each location keeps serving the last healthy version until the new one reports ready. The assistant can roll a workload back to its previous image, and before a deletion it states what it removes and what breaks, then waits for your explicit yes.
Lovable’s hosting documentation says that when a TanStack Start app runs outside Lovable “you take on its deployment pipeline, environment variables, availability, logs, and preview environments”. On Control Plane, the assistant and the platform carry the build, the deployment, availability, and logs. A workload runs in every location of its Global Virtual Cloud (GVC), Control Plane’s named set of locations across AWS, GCP, Azure, and Oracle Cloud Infrastructure regions. The same path works for apps from other builders, as covered in the easiest way to deploy AI-built apps to production. Change stored secrets on a schedule, as explained in how to rotate secrets in an AI-built app.
What infrastructure does a vibe-coded app need before it can handle real customers?
An app that serves real customers needs the same six pieces of infrastructure however it was built.
- Build. A repeatable process that turns the source code into something a server can run each time the code changes.
- Runtime with two replicas and health checks. Two copies of the app, so one can restart without dropping requests, and probes that tell the platform when a copy is ready for traffic.
- Database with backups. A production database with scheduled backups and a tested restore.
- Secrets store. A place for API keys and database credentials that is separate from the code.
- DNS and TLS. A custom domain with a certificate that renews automatically.
- Logs. Searchable logs kept long enough to diagnose a problem after it happens.
Control Plane provides all six in one platform. Related guides cover how to make a vibe-coded app production ready and the security risks in vibe-coded apps with a fix for each.
How Control Plane fits
Control Plane handles Day 2 operations for you, including autoscaling, built-in observability, and security.
Your AI assistant connects to Control Plane’s MCP server, builds and deploys the app from the repository, and creates secrets without the values appearing in the conversation. Control Plane runs the app with health checks and two replicas, issues and renews the TLS certificate for your domain, and collects the logs. The app keeps using your Supabase project, and databases for new services install from Control Plane’s Template Catalog with generated credentials.
Control Plane is PCI DSS Level 1, SOC 2 Type II, HIPAA, and GDPR compliant. The same steps apply to an app that started in another AI builder, as shown in how to take a Replit app to production.
FAQ
These questions come up when a Lovable app moves to a new host.
How do I take my code out of Lovable?
Connect GitHub in Lovable, which works on every plan and creates a repository that is private by default in the GitHub account or organization you connect. On paid plans you can also download the codebase as a .zip.
Do I own the code Lovable generates?
The repository is yours to keep: Lovable’s documentation calls it “a synced copy that you own”, and when you disconnect, it stays on GitHub with all its history and files.
Does exporting from Lovable include my database?
No. The code export has no database records. Lovable’s built-in backend exports the database separately as a PostgreSQL backup that you restore into a Supabase project. That backup includes auth users with password hashes, and stored files, server secrets, and sign-in provider settings are outside it.
Can I keep using Supabase after I leave Lovable?
Yes. If you connected your own Supabase project, disconnecting Supabase in Lovable “does not change your code and does not delete anything in your Supabase project”. The app keeps the same Supabase URL and key, and the new address goes into the Supabase Redirect URLs. If the app used Lovable’s built-in backend, restore the database export into a managed or self-hosted Supabase project.
Will my users have to sign up again?
No, as long as you restore the database backup into a Supabase project. The backup includes auth users with their password hashes, so users keep their passwords. Anyone signed in during the switch signs in again. Sign-in through Google or another provider uses OAuth, the standard behind “Sign in with Google” buttons. In a new Supabase project you enter your own client ID and secret from that provider and register the new project’s callback URL with the provider. Until both are done, those sign-ins fail.
Why do password reset emails break after I move my app?
They break when the Supabase Site URL still holds the old address. Site URL is the default redirect for email confirmations and password resets, so set it to the new address and add that address to the Redirect URLs.
How do I move a custom domain from Lovable?
Deploy and test the app at the new host’s HTTPS URL first, and change DNS as the last step. Add the new host’s verification record while the Lovable records still serve the site. Then replace the A record Lovable gave you with the new host’s records, remove the _lovable verification TXT record, and disconnect the domain in Lovable once the new site answers. A domain you connected from another provider stays registered with that provider. A domain bought through Lovable can be transferred to another registrar or pointed at custom nameservers. Control Plane verifies the domain with a TXT record and issues and renews its TLS certificate.
Do I need DevOps experience to run a Lovable app myself?
No. With Control Plane, your AI assistant handles the build, the deployment, secrets, health checks, replicas, and logs, and Control Plane operates the infrastructure. You still need to understand environment variables, which are named values the app reads, and DNS records, which tell browsers where your domain lives. Restoring a built-in backend’s database uses the pg_restore command-line tool, and your assistant can walk you through it.
What is the difference between the publishable key and the secret key?
The publishable key can ship in browser code because Row Level Security limits what it can do. The secret key skips those rules, so it belongs only in server code and a secrets store. The anon and service_role keys are the legacy versions of these two keys, and Supabase is deprecating them by the end of 2026.
Can Supabase Edge Functions run outside Supabase?
Yes. Supabase’s documentation says Edge Functions run on any Deno-compatible platform, including self-hosted infrastructure. The function code is in the repository under supabase/functions/. Functions deployed to a Supabase project are called at that project’s address, so after you deploy them to your own project with the Supabase CLI, update the app’s Supabase URL and key values and the project ID in supabase/config.toml, then build again.
Talk to the Control Plane team to plan the move, or sign up free to deploy your Lovable app.
Originally published on the Control Plane blog.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.