Blog

Tutorials, guides and product news.

Developers

How to host a Lovable app on your own server

2 November 2026 6 min read
Share this post

To host a Lovable app on your own server, sync the project to GitHub with Lovable's Git sync, connect the repository to the Coolify panel on your server, set the environment variables and point your domain at it. Lovable documents this route itself: the code is yours and runs wherever you put it. You can keep building in Lovable too, since edits land in the repository and the server deploys from there.

The decision that matters most is the backend, because database records and uploaded files don't travel with the code.

How do you get the code out of Lovable?

RouteHowWhen
Git syncGo to Project settings, then Git and GitHub, and press Connect. Lovable creates a new repository, private by default, and two-way sync starts.Ongoing deployments, on all plans
Download codebaseDownload a .zip from the same page or the code editor.A one-time copy, on paid plans

Which kind of project do you have?

Lovable builds on two stacks, and the server settings follow from that. If package.json lists @tanstack/react-start, your project is TanStack Start. If not, it's an older React + Vite project. New projects start on TanStack Start.

StackWhat runs on the serverCoolify settings
TanStack StartA Node.js server for server-rendered pages, server functions and API routesBuild variable NITRO_PRESET=node-server, Start command node .output/server/index.mjs, port 3000. package.json must list nitro.
React + ViteStatic files in dist/Output type Static site, Publish directory /dist. Set Site type to SPA on the General page so nested pages don't return a 404 on refresh.

A static Vite build is one of the project types we have run through Coolify on a real server. The TanStack Start values come from Lovable's own docs, which recommend Node 22.

Step by step

  1. Order a server from the Next.js VPS page. Despite the name, it comes with Coolify, which deploys far more than Next.js.
  2. Clone the repository and open the folder in a coding tool such as Claude Code or Cursor.
  3. Copy the Paste into your AI tool row from the Overview tab of your Seturack panel and paste it into that tool, which then handles the deployment. Don't paste it into the Lovable chat. It contains an API key, and Lovable can't run anything outside its own preview.
  4. Give the tool the environment variables it needs, which depend on your backend choice below.
  5. Test the HTTPS address when it arrives. Refresh a nested page, sign in and out, and try a write and an upload. If sign-in fails on a redirect, add the new address to your allowed redirect URLs.
  6. Point your domain's A record at the server's IP address and tell the tool the domain name. The certificate is issued automatically.
  7. Ask the tool to deploy on every push. Lovable's edits reach the repository, so each one starts a build.

The Next.js guide covers doing this by hand. You have root access, and you can manage everything from the panel if you prefer. Your lovable.app address keeps serving the version you last published there.

Where does the backend live?

Stay on the built-in backend

Only the site moves, so this is the least work. Set VITE_SUPABASE_URL and VITE_SUPABASE_PUBLISHABLE_KEY before the build. TanStack Start also needs SUPABASE_URL and SUPABASE_PUBLISHABLE_KEY for its server code. These values are in the repository's .env file, but the secrets your server functions read aren't. AI features and connectors keep working and keep drawing on your Lovable credits.

Run Supabase on your own server

Lovable names two destinations for its built-in backend: managed Supabase and self-hosted Supabase. Moving PostgreSQL alone isn't enough, because sign-in, storage, realtime and Edge Functions have to move too. Supabase VPS gives you all of these on a separate server. Supabase's docs ask for at least 4 GB of RAM, 2 cores and 40 GB of disk.

  1. Create the structure by running the files in supabase/migrations/ in date order.
  2. Move the data. Go to More, Database, Manage, Settings and press Export data, then load the zstd-compressed PostgreSQL archive with a zstd-capable pg_restore on port 5432. User accounts are included, and everyone signs in again. Try this on a test install first.
  3. Download files from More, Storage and upload them in Studio to buckets with the same names.
  4. Copy supabase/functions/ to volumes/functions/ on the server, set their secrets and restart the functions service.
  5. Set up sign-in providers, SITE_URL and ADDITIONAL_REDIRECT_URLS.
  6. On the site, set VITE_SUPABASE_URL to your Supabase server's address, set the publishable key and rebuild.

AI and connector calls that go through Lovable have to move to your own provider accounts. Updates and monitoring become your job, and Lovable can't debug infrastructure it doesn't control.

Use a project in your own Supabase account

If you connected your own Supabase account, the backend already lives outside Lovable, so you only set the addresses. To bring it onto your server, Supabase's restore guide gives the steps with supabase db dump.

Frequently asked questions

How much RAM does a Lovable app need?

The sales page recommends at least 4 GB of RAM, 2 vCores and 40 GB of disk. That figure comes from the build: a large Next.js project with 85 packages ran out of memory at 2 GB and built at 4 GB. If a build runs out of memory, scale up from your panel.

What will it cost per month?

The recommended minimum size is about $6 a month (VAT included), and outside Turkey you pay in US dollars. Daily backups are included in the price and traffic is unlimited. A second server for Supabase is charged separately. Exporting code doesn't end your Lovable subscription or Cloud usage.

How do I move my domain away from Lovable?

Test everything on the temporary address first. Then point the A record at the server's IP address, add the domain to the app and deploy again. To retire the lovable.app address, unpublish the project in Lovable.

How do I update the site after launch?

Keep working in Lovable or your coding tool. Each change reaches the synced branch, and with a webhook the server builds it. To keep half-finished work offline, let Lovable work on a separate branch and merge when it's ready.

Does the database come along with the code?

No. Git sync and the zip contain source files and the files that define the database structure. Records and uploaded files are exported separately, so verify them at the destination before you retire the old backend.

Ready-made on Seturack: Next.js, Coolify, Supabase.

Comments0

No Comments Yet

Be the first to share your thoughts.

Join the Discussion

Please sign in or sign up to leave a comment.

Never Miss a Post

Get our latest tutorials, guides and product news in your inbox.

You're subscribed to our newsletter.