Zeltro › Self-host your Lovable app and keep building it locally

Self-hosting a Lovable app

How to export your Lovable code to GitHub, run it on your own machine, and keep building it with your own AI instead of Lovable credits. What exports, what stays in Lovable Cloud, and the real steps to bring it all home.

Lovable is good at getting an app from an idea to a working screen. The day comes, though, when you want the app somewhere you control: no credits running down every time you ask for a change, no question of what happens if the plan changes, and the code and data on a machine you own.

Lovable is unusually open about this. Its own docs say you can "export your code, migrate your data, self-host parts or all of your stack, or move to another provider at any time." This page is the practical version: what exports, what does not, and how to keep building once it is on your machine.

What you can take with you#

A Lovable project is two things, and they leave differently.

Piece What it is How it comes out
Front end A standard Vite and React app in TypeScript GitHub sync on every plan, or Download codebase on paid plans
Database schema Migration files in the repository Comes with the code
Data, sign-in, file storage, Edge Functions Lovable Cloud, which runs on Supabase Exported and moved separately, by hand

The front end is the easy part. The backend is where the work is, and Lovable says so: "Moving the PostgreSQL database alone does not move authentication, storage, realtime, or Edge Functions."

Step 1: export your Lovable code to GitHub#

  1. In Lovable, connect your workspace to GitHub (Lovable installs its GitHub App).
  2. Open Project settings → Git and link the project.
  3. Lovable creates a new repository in your account and starts two-way sync.

That works on every plan. On a paid plan you can also choose Download codebase from the same screen, or from the bottom of the file tree in the code editor.

Two-way sync means you do not have to decide anything yet. Edits made in Lovable are committed to the repository, and commits you push to the synced branch show up back in Lovable. Lovable recommends leaving it on main and doing your own work on a feature branch. If you disconnect later, Lovable "stops the sync and changes nothing else": the repository keeps its full history.

Step 2: run the Lovable project on your own machine#

You can do this by hand: install Node.js, clone the repository, then npm install and npm run dev. For one look at the code, that is all you need.

To keep building it, it helps to have a real development environment around it. Zeltro is a free local development platform: each project runs in its own container, every project shares one set of databases, and your AI agent works inside the project.

zeltro clone work-directly https://github.com/you/your-lovable-app

That clones the repository, reads package.json, recognises a React app on Vite, and sets it up as a Node 22 project. When an AI agent is configured, the clone also has it adapt the repository to Zeltro. Then:

zeltro status your-lovable-app

prints the project's address on this machine, and a LAN address for trying it on your phone.

If you downloaded the codebase instead, unzip it into your projects folder and run zeltro setup your-lovable-app. Inside Zeltro the dev server has to listen on port 3000 (Lovable projects usually set 8080 in vite.config.ts), and the browser reaches it through nginx on port 80. If the page does not come up, check the port. If it loads but hot reload does not connect, set server.ws.clientPort (server.hmr.clientPort before Vite 8.1) to 80. Or ask your agent to do both.

Step 3: decide what to do about Lovable Cloud#

Out of the box, the cloned app still talks to its Lovable Cloud backend. Lovable's docs are blunt about what that means: "A local app that keeps that configuration reads and writes the same backend as your published app." Use test data until you have decided.

You have three honest options:

  • Keep Lovable Cloud as the backend for now. Build the front end locally and let the data stay where it is. Fastest, and nothing to migrate yet.
  • Move to your own Supabase. Lovable lists managed Supabase and self-hosted Supabase as the supported destinations for its backend. Export the schema and data, download the storage files, set the secrets and sign-in redirect URLs again, and redeploy the Edge Functions.
  • Move to a plain database. Zeltro runs Postgres for every project already. In Lovable's words, "migrating to plain PostgreSQL or another database provider means implementing equivalents yourself": sign-in, storage and functions included. That is a real piece of work, and it is exactly the kind your AI agent can take on in steps, inside the project, against a database on your own machine.

Newer Lovable projects add one more catch: "connector and AI calls fail locally", because the credentials behind them are managed by Lovable. Those features need replacing with your own keys or services before the app is fully yours.

Step 4: keep building without credits#

This is the part that changes the economics. In Lovable, every change is spent from a credit balance. In Zeltro, the agent doing the work is yours: Claude Code, Codex, Gemini, Qwen Code, Aider, OpenCode or Hermes, on a subscription you already pay for, an API key billed at the provider's own price, or a free local model.

cd ~/zeltro-projects/your-lovable-app
zeltro ai "read AGENTS.md, then add a settings page for the user's profile"

Every project has an AGENTS.md with its address, database and commands, so the agent starts oriented instead of rediscovering the setup each time. There are no Zeltro tokens and no markup. See bring your own key for how that works, or put your own numbers into the savings calculator.

Self-hosted means you host it#

Zeltro is where the app lives while you build it. It does not put it on the internet. Lovable's front end is a standard Vite build, so any static host works for that part, and the backend goes wherever you moved it. If you would rather not deal with servers at all, I will take it live for you.

Sources#

Checked on 18 October 2026: Lovable's Git sync and deployment, hosting and ownership pages. Plans and features change, so check them against your own account.

Questions

Can you self-host a Lovable app?

Yes. Lovable's docs say you can self-host part or all of the stack. The front end is a standard React app you can run and host anywhere. The backend, if you use Lovable Cloud, has to be moved separately to your own Supabase (managed or self-hosted) or rebuilt on another database.

How do I export Lovable code to GitHub?

Connect your workspace to GitHub, then link the project under Project settings → Git. Lovable creates a repository in your account and keeps it in two-way sync. This works on every plan.

Can I download my Lovable project without GitHub?

On paid plans, yes: Download codebase in Project settings → Git, or at the bottom of the file tree in the code editor. On the free plan, use GitHub sync.

Does exporting a Lovable project include the database?

The schema, yes: the migration files are in the repository. The data, sign-in users, storage files and secrets are not. Export the data and download the storage files separately, then set the secrets again wherever the backend ends up.

Is there a self-hosted Lovable alternative?

Lovable's builder itself only runs in its cloud; its agent needs an internet connection. Zeltro is the self-hosted alternative for the building part: it runs on your computer, with your choice of AI, and your app and its databases stay local. It builds PHP and Python apps as well as JavaScript ones. See the full Lovable comparison.

Can I keep using Lovable after exporting?

Yes. Sync is two-way, so you can work locally on a branch and still use Lovable in the browser. Disconnecting stops the sync and leaves both the repository and the Lovable project as they are.

What does Zeltro cost?

The Zeltro app is free for personal use, hobby projects and learning, with no account. A business using it, including for paid client work, buys a lifetime commercial license once, for US$99.99. The zeltro command line tool is open source (MIT). Separately, you pay for your AI: a subscription you already have, an API key billed per use, or nothing with a local model.

Bring your Lovable app home

Install Zeltro, clone your Lovable repository, and keep building with the AI you already pay for, or a free local model. Free for personal use, with no account.

Install Zeltro Why bring your own key

Rather not set it up yourself? I’ll do it for you.

Checked 2026-10-18. Other products change often — if something here is out of date, tell us and it gets fixed.