Skip to content

How to Deploy and Host a Lovable App

Lovable can publish your app itself, or you can export the code and host it elsewhere. Here is how to choose and what to check either way.

You have two ways to deploy a Lovable app. You can publish it from inside Lovable, or you can sync or download the code and host it yourself. Publishing is the shortest path. Hosting yourself gives you control over infrastructure, data location and cost structure, and it needs engineering work.

Details of any hosted tool change often, so check Lovable's current documentation before relying on anything below. This article reflects the official docs at the time of writing.

Option 1: Publish from Lovable

Lovable's docs describe a Publish button in the editor. Publishing deploys the app to a lovable.app address. A few behaviours are worth knowing:

  • A publish is a snapshot of the project at that moment. Later edits stay off the live site until you publish the changes.
  • By default, editors and above can publish and unpublish.
  • The publish dialog runs a quick scan of database access rules, dependencies and connectors. For apps using the built-in backend, unresolved critical findings open a review dialog with the option to publish anyway or try to fix them.
  • Custom domains require a paid plan, and the app stays on the lovable.app address until the domain shows as active. DNS changes can take time.

This path suits prototypes, demos, internal tools and early tests where speed matters more than infrastructure control.

Option 2: Export the code and host it yourself

Lovable documents a two-way GitHub sync. It lets you back up the code, review changes in pull requests, work locally in your IDE and deploy outside Lovable. Each project links to one repository on one branch at a time. On paid plans there is also a "Download codebase" option in project settings.

Once the code is in your repository, hosting it is ordinary engineering work. The steps are:

  1. Clone the repository and run it locally.
  2. Read package.json and the project files to learn the actual stack and build commands. Do not assume them.
  3. Build it from a clean checkout.
  4. Choose a host that suits that stack.
  5. Set environment variables on the host.
  6. Deploy, test the main path and check logs.

The backend is the harder part

The front end is usually easy to move. The backend is where decisions get real.

Lovable's docs describe a built-in backend that provides the database, login and file storage. They also describe Supabase as a separate integration. Before you move off Lovable, answer these:

  • Where does the data live? If it is in a managed backend tied to your project, you need a plan to export it.
  • How does authentication work? Users, sessions and password resets must keep working after the move.
  • Where do secrets live? API keys must be set on the new host, never committed.
  • What runs server-side? Any functions or scheduled jobs need an equivalent runtime in the new home.

Moving a front end while leaving the backend in place is a valid choice. Moving both is a larger project, and you should plan it as one.

A decision rule

Use this to pick a path.

  1. Is the app a prototype or a test with a few users? Publish from Lovable.
  2. Do you need a custom domain and a stable public site? Publish with a paid-plan domain, then review again as usage grows.
  3. Do you need control over data location, backups, compliance review or integration with your own systems? Export and host yourself.
  4. Do you plan to add substantial custom features? Export early, so engineers work in a normal repository.

If you are unsure, start with option 1 and plan the export before real customer data accumulates. Migrating a small data set is much easier than a large one.

Pre-launch checklist for either path

  • Read the code that handles login, payments and anything that changes data.
  • Confirm access rules: a user should only see and edit their own records.
  • Search the project for secrets and replace them with environment variables.
  • List the variables in an .env.example file with placeholder values.
  • Test sign-up, sign-in and the main user flow with a fresh account.
  • Decide where errors and logs go.
  • Decide how you will back up the database and how you will restore it.

A placeholder example:

VITE_API_URL=https://api.example.com
SERVICE_KEY=<set-in-host-secret-store>

Mistakes we see

Treating the generated app as finished. A working demo does not mean access rules, validation and error handling are complete.

Moving the front end and forgetting the data. The site loads, but sign-in or saved records are gone.

Skipping the export test. Do a trial export and build before you need one, so you know it works.

Ignoring ownership. Confirm who owns the repository, the domain and the backend account.

How we work with this at LaunchSprintAI

Many founders arrive with a Lovable prototype that works and needs to become a product. We review the code, decide what to keep, and rebuild the parts that need structure, such as permissions, data models and deployment. AI tools speed up the work, and engineers review every important change.

If that sounds like your situation, see our MVP development and startup MVP pages. To understand the difference between a demo and a product first, read MVP vs Prototype. When you are ready, start a project brief.

Frequently asked questions

Can I host a Lovable app on my own server? Lovable documents GitHub sync for deploying outside Lovable, so the code can be hosted elsewhere. You need to handle the backend and configuration yourself.

Do I need GitHub? Not only for a copy. The docs mention a download option on paid plans, but GitHub is the route for ongoing sync.

Will moving break my app? It can if the backend, authentication or secrets are not moved with it. Test on a staging copy first.

Related reading

Also on LaunchSprintAI

Our hosting

Built your app with AI? Get it online.

MoodLensAI runs apps made with Claude Code, Codex or Cursor, plus n8n, WordPress and Laravel, on a managed server with HTTPS, backups and monitoring. Fixed monthly plans, no server administration.