Lovable self hosting moves two of a Lovable app’s three layers. The frontend build and the Supabase backend with its data can run on infrastructure you operate; the editor and AI agent cannot, because Lovable documents the platform as a managed service that “cannot be self-hosted or deployed inside a customer VPC”. A customer’s security review can force the move.

Lovable self hosting: which parts of the app can move

Lovable self hosting covers the app, not the platform: the frontend build and the Supabase backend can run on servers you operate, while the editor and AI agent stay a managed service. Two of the three layers move, and every operating duty for those two moves with them.

Running the app on your own servers is one of the four ways out of Lovable, and whether to leave at all is its own decision. What follows assumes a customer, a contract or a policy has already made it for you.

LayerWhat it isCan you run it yourself?What you take on
FrontendA React and Vite build that serves static files on older apps; TanStack Start, which renders pages on the server, on apps created from May 13, 2026 (June 22, 2026 for Enterprise workspaces)Yes: a static host for a Vite build, a host that runs server code for TanStack StartBuild and deployment automation, TLS, CDN and reverse proxy, monitoring, logging and uptime, infrastructure updates, preview environments
Backend and dataLovable Cloud: a database, storage, authentication, realtime and functions on Supabase’s open-source foundationYes: managed Supabase and self-hosted Supabase are the two supported destinationsPostgreSQL operations and backups, service availability, row-level security, patches and upgrades, scaling, monitoring, compliance certification of your infrastructure
Editor and AI agentThe chat, the visual editor and the agent that write the codeNo: Lovable runs it as a managed serviceNothing to operate; a different editor if the code must stay inside your network

Read the backend row twice. Lovable’s ownership page says “Moving the PostgreSQL database alone does not move authentication, storage, realtime, or Edge Functions” and that a move to plain PostgreSQL means building those equivalents yourself, which Lovable does not support. That is why the documented self-hosted route is a whole Supabase stack, not a bare database.

Lovable’s deployment and ownership page draws the line a little differently: it splits an app into code, frontend, and backend and data. The code part is already portable once Git sync is on, so in a Lovable self-hosted setup the questions that matter are the two runtime layers and the editor that keeps writing to them.

Before you plan anything, find out which frontend you have, because the two stacks need different hosts. Lovable’s stack FAQ gives the cutover date in the table above, and eligible older projects can be upgraded. To self host a Lovable app, start with package.json: a TanStack Start project lists @tanstack/react-start under its dependencies, and an older React and Vite project does not.

Does Lovable do hosting? What Lovable hosting already covers

Lovable hosting is built in: publishing puts the app on a lovable.app address with HTTPS included, a custom domain needs a paid plan, and the backend runs on Lovable Cloud. Most apps never need to leave it; self-hosting starts when a customer, a contract or a policy names where the app must run.

Publishing from the Publish dialog is free and works even when the credit balance is zero; a live site uses no credits on its own, and Run credits pay for what the app does while it runs, such as backend activity and AI features. Lovable’s ownership page lists production hosting with custom domains, automatic SSL and global delivery among what its own hosting provides. Loveable hosting, the common misspelling, is the same built-in service. What that costs in credits month to month is covered in what a live Lovable app costs each month.

Lovable’s own guide is plain that “Most teams keep that setup and never need this guide.” It names three requirements that justify moving part of the app: a deployment pipeline of your own, a compliance or data residency rule that specifies where the app must run, or an organizational policy on hosting. For the backend on your own servers, the guide narrows it further to “strict compliance, data residency, or infrastructure control requirements.”

What your enterprise customer is actually asking for

An enterprise request to self-host usually bundles four asks: data residency, a deployment inside the customer’s network, a retention or training term on the AI, and a compliance report. Self-hosting the app answers the first two, leaves the AI term with the editor’s vendor, and rarely changes the third-party report.

Lovable data residency may already be covered before anything moves. Lovable’s security page says Lovable Cloud hosts data in the EU, US and Asia Pacific, and that customer data stays in the region you select and does not move across regions by default. The Cloud docs add that the region cannot be changed after Cloud is enabled, so check which one your project picked.

The askDoes self-hosting answer it?What answers it instead
Data residency: the data in a named regionYes, you choose where the servers runLovable Cloud’s region choice (Americas, Europe or Asia Pacific, or a country-specific region on Enterprise request), if the required region is one of them
A deployment inside the customer’s networkYes for the app; no for the editor and agentNothing: the platform cannot be deployed inside a customer VPC
A training or retention limit on the AI modelNo: prompts and code still reach the editorLovable’s security page: no training on Business and Enterprise data and an opt-out on Free and Pro; Lovable’s docs: Enterprise workspaces use only zero-data-retention models by default
A compliance report such as SOC 2 or ISO 27001No: Lovable’s certificates describe LovableYour own controls, owners and evidence for your app

On training, Lovable’s security page says Business and Enterprise prompts, code and workspace data are not used to train Lovable models, Free and Pro users can switch training off in Account Settings, and contracts with third-party AI providers restrict training and retention. Lovable’s security post says the company has been SOC 2 Type 2 compliant as of August 13, 2025, and is ISO 27001:2022 certified. Those reports cover Lovable’s own systems, and what Lovable’s certificates cover sets out where they stop.

Ask the customer which of the four is the blocker before you price a move. It may be one line in a contract, and what a customer means by their own servers helps you find out which. If the review arrives as a questionnaire, answering a big customer’s security questionnaire covers that part.

When a deal waits on that review, gather the evidence before you touch a server: who owns each control, where the data sits, how a release is rolled back. If nobody on the team can produce that yet, a free audit is where we talk through with you which evidence the reviewer is waiting for and what you can already show. In the sprint, our engineers deliver a technical controls checklist with supporting evidence organized for enterprise security review, which is not a SOC 2 audit report, and bundle the readiness report, architecture diagram, data model, security checklist and capacity statement into one PDF.

The controls themselves are listed in the SOC 2-style controls checklist. What goes into the PDF a reviewer opens is in the due diligence pack a reviewer reads.

What running a Lovable app yourself hands you

Lovable’s external hosting guide is direct about the handover: “Lovable does not monitor, operate, or debug any part of self-hosted infrastructure, and production previews are not generated for self-hosted production environments.” For a backend on your own servers it lists eight duties that become yours:

  • PostgreSQL operations, backups and disaster recovery
  • Availability and reliability of authentication, storage and realtime
  • Row-level security design and enforcement
  • Security patches and version upgrades
  • Edge function deployment and execution
  • Performance tuning and scaling
  • Monitoring, alerting and incident response
  • Compliance certification of your infrastructure

Supabase’s own overview adds what the managed platform does that a self-hosted stack does not: branching, advanced metrics beyond logs, managed backups and point-in-time recovery, analytics and vector buckets, ETL and the Management API are not available when self-hosting. Backups are the line to plan first, because nothing takes them for you.

Monitoring is the line we would check next. We audited 21 third-party apps in June and July 2026, and 17 of the 21 had no error tracking or alerting: when a user hits an error, nothing records it. Those apps were a selected set, not a random sample of AI-built apps, so treat the count as a gap worth looking for rather than a rate; once the app runs on your servers, that gap belongs to whoever runs them.

A self-hosted app has no single honest monthly figure, and no source we read gives one. The bill arrives as a list of lines to price against your own provider:

  • Compute or a CDN for the frontend
  • Compute for the Supabase services; Supabase’s Docker guide sets the minimum at 4 GB of RAM, 2 CPU cores and a 40 GB SSD, and recommends 8 GB, 4 cores and 80 GB
  • PostgreSQL storage and backup storage
  • Egress
  • TLS certificates and DNS
  • Log and metric retention
  • Recurring human time for patches, upgrades and incidents

These duties sit on the same release path as everything else the app ships, and the controls a small app’s release path needs lays that path out from first deploy to rollback.

How to self-host a Lovable app: four passes and the check

A self-hosted Lovable app moves in four passes: the code into a repository you control, a Supabase stack on your servers with secrets generated by hand, the data, users and files exported and checked, then the frontend rebuilt against the new backend and the traffic cut over once rehearsed.

The passes below are read from Lovable’s and Supabase’s documentation, not from a migration we ran for this page.

  1. 01 Put the code in a repository you control with Git sync, and confirm the default branch builds from a fresh clone.
  2. 02 Stand up a self-hosted Supabase stack and replace every placeholder secret before the first start.
  3. 03 Export the database, copy the storage files, restore both, and check row counts, sign-ins and file downloads against the live app.
  4. 04 Rebuild the frontend with the new backend values, test it on a temporary address, then move the domain.

Pass one starts with Git sync. When you connect a project, Lovable creates a new GitHub repository, private by default, and keeps it in two-way sync on one branch at a time. Lovable’s hosting guide says the two-way sync also works with a GitLab or Bitbucket repository. If the sync stops pushing, when the Lovable GitHub sync breaks covers the usual causes.

Pass two builds the backend. Lovable can generate Docker configurations in three supported shapes (frontend only, backend only with self-hosted Supabase, or the full stack), but it fills them with placeholder secrets. Replace JWT_SECRET, POSTGRES_PASSWORD, ANON_KEY and SERVICE_ROLE_KEY before use; Lovable’s guide has you generate the JWT secret with openssl rand -base64 32 and sends you to Supabase’s documentation for the API keys. The guide is blunt about why: “Lovable cannot run or test Docker builds” and “Lovable cannot generate real secrets.” Supabase’s self-hosting guide has you run sh utils/generate-keys.sh, which writes the generated secrets to the .env file, then sh utils/add-new-auth-keys.sh to add the new API keys and signing key pair; where the generated Compose file and that guide disagree, we’d follow Supabase.

Pass three moves what Git sync never carries. Lovable’s database export holds the full structure and data, including users’ accounts with their password hashes, so users keep their passwords when it is restored into a Supabase project; it leaves out storage files, Edge Function code and project secrets. The export covers databases using up to 15 GB, the file itself can be at most 5 GB, and you can request one every 24 hours. It arrives as a PostgreSQL custom-format .backup archive with zstd compression, so it goes through pg_restore, not the SQL editor, and Lovable’s guide warns that a pg_restore build without zstd support cannot restore the data. The order of the capture, files and secrets included, is in the Lovable Cloud capture steps.

Pass four rebuilds the frontend. On both stacks, browser values prefixed with VITE_ are embedded at build time, not runtime, so a new backend means a new build; why VITE_ values are fixed at build explains the mechanism. A TanStack Start app also reads SUPABASE_URL and SUPABASE_PUBLISHABLE_KEY for its server code and keeps its server runtime on the new host.

# Older React + Vite app: values are baked into dist/
VITE_SUPABASE_URL=https://your-self-hosted-domain.com \
VITE_SUPABASE_PUBLISHABLE_KEY=your-anon-key \
npm run build

# TanStack Start app: set the same VITE_ values, build for a Node.js server, then run it (port 3000)
VITE_SUPABASE_URL=https://your-self-hosted-domain.com \
VITE_SUPABASE_PUBLISHABLE_KEY=your-anon-key \
NITRO_PRESET=node-server npm run build
node .output/server/index.mjs

Before the domain moves, test on a temporary address: open a nested route directly and refresh it, sign in and out, run the reads, writes and uploads the app depends on, and on TanStack Start trigger a server-rendered page and a server function. Then search the code for app connectors, AI features and the Lovable Cloud URL, since each still runs through Lovable until it is replaced.

The check that proves the move is a fresh clone, deployed to staging, with no step that needs Lovable; the general order for any builder is in how to self host an exported app. Picture it from your side: you hold the repository and the provider accounts in your own name, run the first deploy from a fresh clone, and it stops at a step that still depended on the builder tool. Until a fresh clone deploys with no step that needs the builder, part of the app still belongs to the tool, and the takeover checklist for an app covers what else to claim.

In the sprint, deliverable 7.11, Independent repository and hosting, is verified the same way: deploy a fresh clone to staging through the pipeline with no step that depends on the generating tool.

Where a self-hosted Lovable app can run

Lovable’s ownership page lists the destinations for older Vite apps: containers (Docker), Kubernetes clusters and virtual machines running Nginx or Apache on your own infrastructure, plus AWS, GCP and Azure, each with a static, a container and a managed Kubernetes option. On AWS that means S3 with CloudFront, ECS, EKS or Amplify. A Lovable Docker image covers much of that list, since Lovable’s guide uses the same container approach for Kubernetes, ECS or Cloud Run, and for the frontend on its own on a single virtual machine.

To migrate from Lovable to AWS, check the stack first: S3 with CloudFront fits only a confirmed Vite build, because a TanStack Start app does not run from object storage or a CDN alone and needs a host that runs its server part. Choosing between Railway vs Vercel and the other hosts is its own comparison. If only the frontend has to leave and the backend can stay on Lovable Cloud, deploying a Lovable app to Vercel is the smaller job.

Who edits the code once the app runs on your servers

The editor never moved. Lovable says you can keep the repository connected and keep editing in Lovable while another host serves the live app. Our reading: if the reason for the move is that code must not leave your network, that setup does not meet it, because every prompt still sends the code to Lovable’s editor. Lovable’s terms add that, unless it agrees otherwise in writing, it does not guarantee where data sent through the platform is processed or stored.

So something else has to edit the code. The two common next editors are Claude Code and Cursor: moving the editor to Claude Code and moving a Lovable project into Cursor each start from the same repository. Both assume someone can read a failing build and fix it. Decide who that is, you or someone you pay, before the cutover.

Common questions about running a Lovable app on your own servers

Where are Lovable apps hosted?

Lovable apps are hosted by Lovable by default: publishing deploys the app to a lovable.app address with HTTPS included, and its database, sign-in and file storage run on Lovable Cloud in the region chosen when Cloud was enabled (Americas, Europe or Asia Pacific). The code can also be deployed to a host you choose or to servers you run.

Does Lovable give free hosting?

Yes, publishing from Lovable’s Publish dialog is free and works even with a credit balance of zero. The live site itself uses no credits; backend activity and AI features use Run credits as people use the app, and Lovable’s pricing page says that for most smaller or new apps the included grant that comes with a subscription covers it. A custom domain needs a paid plan.

Yes, running the app you built with Lovable on your own servers is allowed: Lovable’s terms (last updated August 28, 2026) say that, as between you and Lovable, you own the applications you build and the AI output generated for you, subject to third-party rights. The Lovable editor and agent are not offered for self-hosting. This is a plain reading of the terms, not legal advice.

Can anyone edit my Lovable app?

No. In Lovable, editing a project takes an editor, admin or owner role, and a viewer cannot edit. Workspace members can see, edit and publish the workspace’s projects unless a project’s access is restricted, and changes pushed to the synced GitHub branch flow back into Lovable, so repository access counts too. Moving the app to your own servers does not change who can prompt in Lovable.

How do I move a self-hosted postgres and auth stack onto a managed service?

Dump the self-hosted database, restore it into the managed project, copy the storage files, and check row counts, sign-ins and file downloads. Supabase documents three ways to bring an existing Postgres database onto its platform: a guided Colab notebook, a manual dump and restore, or logical replication for minimal downtime. The auth schema, users and hashed passwords included, can move between Supabase projects so nobody resets a password, but if the new project uses a different JWT secret, existing tokens become invalid and users sign in again.

When is self-hosting a Lovable app worth getting help with?

Help is worth it when a deal or a security review depends on the move and nobody on the team will own the servers, backups and patches afterwards. AxonBuild talks through the order of the work with you in a free audit: what has to move before the deal closes and what can wait.