Yes, you own the code
A Lovable project is a normal modern web application — React, TypeScript, Vite, standard tooling. There is no proprietary runtime you would be trapped in, and connecting GitHub gives you the whole thing.
How to export
1. Connect GitHub. This is the export mechanism, not a separate feature. Authorise the integration, pick the account, create the repository.
2. Clone it.
git clone <your-repo-url>
cd <your-repo>
npm install
npm run dev
3. Confirm it runs locally. Add any environment values the app expects — the database URL and publishable key for the backend, plus any API keys you configured. Secrets are deliberately not committed.
Do this once early. Discovering an export problem the week you need to leave is the wrong time.
What comes with the code
- Every page, component, style and asset.
- Your routing, business logic and server functions.
- Configuration and dependency list.
- Full commit history.
What does not come automatically
- The managed database. The schema and data live in the backend service. Export them with a database dump if you are moving.
- Secrets. Held in platform secret storage by design; re-add them wherever you host.
- Hosting, domain and TLS. You configure these at your new host.
- Email sending configuration and any provider-side settings.
None are blockers — they are the normal moving costs of any hosted app.
Hosting it yourself
The project builds to a standard deployable app and runs on the usual modern hosts. The pattern is always:
- Point the host at the repository.
- Set the environment variables.
- Set the build command and let it deploy.
- Point DNS at the host.
If your app uses the managed backend, either keep pointing at it or migrate the database and update the connection values.
What you lose by leaving
Be clear-eyed about the trade: you keep the code, but you give up prompt-based editing, the instant preview, one-click publishing and the bundled backend. Most people who export do it for insurance and collaboration rather than because they intend to leave — they keep building in Lovable and use the repository as backup and as the door in for developers.
A sensible ownership routine
- Connect GitHub on day one of any project that matters.
- Clone and run locally once, so you know it works.
- Take a database export before any large schema change.
- Keep a short README noting which secrets the app needs.
Four small habits, and the project is never dependent on a single service — or on anyone's goodwill, including your own future memory of how it was set up.
Frequently asked questions
- Can I export my Lovable code?
- Yes. Connect the project to GitHub and you get the complete source as a standard repository you can clone, edit and deploy anywhere.
- Do I own the code Lovable writes?
- Yes — it is a standard React and TypeScript project with no proprietary runtime, and the repository contains all of it.
- Does the database come with the export?
- No. The code exports through GitHub; the database schema and data need a separate export if you are moving off the managed backend.
- Can I host a Lovable app somewhere else?
- Yes. Point any modern host at the repository, set the environment variables and build command, then point your domain at it.
Go deeper
Related guides
Connecting Lovable to GitHub
How the Lovable GitHub integration works, why you should connect on day one, how two-way sync behaves, and the rules that stop you creating merge conflicts.
Lovable vs Cursor — different jobs, and they work together
Lovable builds and hosts a working web app from plain English. Cursor is an AI code editor for people comfortable in code. Here's how they compare and how to run both on one project.
Lovable pricing, explained without the marketing
How Lovable pricing actually works: what a credit is, what free gets you, when a paid plan pays for itself, and the habits that quietly double your monthly bill.