← Back to blog

Published on

How to move a Lovable app to other hosting, with a custom domain and servers in Brazil

Any app built on Lovable can be hosted outside Lovable without a rewrite. The code goes to a GitHub repository you own through Lovable’s Git sync, which is available on every plan, including Free, and any platform that runs a Node or Bun server can deploy the app from there. Apps created since May 13, 2026 use TanStack Start and need a real server; older ones, built with React and Vite, are a static site. The database, sign-in, and files stay on Lovable Cloud, which runs on Supabase under the hood, and the public keys already ship in the committed .env. A custom domain on Lovable requires the Pro plan, at US$ 25 per month, or R$ 143.43 with the PTAX rate of November 27, 2026 and the 3.5% IOF on international card purchases. Outside Lovable, the same app runs on Vercel, Netlify, Render, or Zenifra, which we tested end to end on November 12, 2026 and which costs R$ 29.90 per month on the Basic plan, billed in Brazilian reais. This guide covers what Lovable generates, how to get the code to GitHub, what each option costs, the exact configuration that worked, how to connect your domain, and the errors that come up most.

Can you host a Lovable app outside Lovable?

Yes. The app Lovable generates is a regular JavaScript project, with a package.json, a lockfile, and source code that belongs to you. Lovable’s own pricing page states that the code, the apps, and your customers’ data are yours. To host it elsewhere, you turn on GitHub sync, connect that repository to a hosting platform, and enter the build and start commands. The app keeps using the same Lovable Cloud database and sign-in, so nobody has to create an account again.

The reasons for leaving vary. Some people want a custom domain without paying for Lovable Pro. Others want the server close to Brazilian users, want to pay in Brazilian reais through PIX or boleto, or simply want the code in a repository the team controls, with commit history, pull request reviews, and predictable deploys. It is also common for the app to grow and for someone on the team to start editing code directly in an editor while still using Lovable’s chat for new screens.

The path has three parts, and only the first is required. First, the code goes to GitHub and the hosting platform deploys from it. Then, if you want, you point a custom domain at the new address. Finally, and only if it makes sense for your case, the backend also leaves Lovable Cloud. Most apps do well stopping at the first or second part.

Prices in this guide were read on the official Lovable, Vercel, Netlify, and Render pages on November 28, 2026. The conversion uses the PTAX selling rate of November 27, 2026, published by the Central Bank of Brazil, at R$ 5.5430 per dollar, plus the 3.5% IOF tax on international card purchases. Zenifra’s prices come from its public plans API, checked on the same day.

What does Lovable generate when you build an app?

It depends on when the project was created. According to Lovable’s docs, apps created from May 13, 2026 use TanStack Start, a React framework that renders pages on the server and supports server functions and API routes. To check, open package.json and look for @tanstack/react-start in the dependencies. Earlier projects use React with Vite and only produce static files in the dist folder.

That difference changes everything about hosting. A TanStack Start app needs a running process, because each page is assembled on the server before it reaches the browser. It does not work from a file bucket or a CDN alone. An older React and Vite project is a static site, and any file host will do, as long as every route returns index.html.

TanStack Start projects use Nitro to produce the build output. Nitro has presets that adapt the server to each platform: one for Vercel, one for Netlify, one for a plain Node server, one for Bun. On platforms Nitro recognizes, the preset is picked automatically. On your own server, or on a platform that runs your start command, you choose the preset with the NITRO_PRESET variable, and that is where the most common migration error lives, explained further down.

The backend comes from Lovable Cloud, Lovable’s built-in backend. The docs say it uses Supabase’s open-source foundation and provides a PostgreSQL database, real-time updates, user authentication, and file storage with no manual setup. In our test on November 12, 2026, the new app came exactly like that: TanStack Start for the front end and server, Lovable Cloud for the database and sign-in, and a bun.lock in the repository.

Project typeHow to recognize itWhat it needs to runWhere you can host it
TanStack Start (created since May 13, 2026)@tanstack/react-start in package.jsonA running Node or Bun process, port 3000 by defaultVercel, Netlify, Render, Zenifra, or any server with Node or Bun
React with Vite (older projects)No @tanstack/react-start; the build creates a dist folderJust serving files, with every route returning index.htmlAny static host, CDN, or Nginx

If your project is older and you want server-side rendering, Lovable offers an option to upgrade the project to TanStack Start. Do it before the migration, inside Lovable, and only then set up the new hosting.

How do you export a Lovable project to GitHub?

Through Lovable’s own Git sync, which is available on every plan, including Free, and works with GitHub, GitLab, and Bitbucket. In the project, open the settings, go to Git, and pick GitHub. If your account is not linked yet, click Add connection and authorize the Lovable app on your account or on your company’s organization. Then click Connect next to that connection, and Lovable creates a private repository named after the project.

The sync works both ways. What you change through Lovable’s chat becomes a commit on GitHub, and what someone pushes to the synced branch flows back into Lovable. The docs explain that Lovable edits and syncs one branch at a time, by default the repository’s default branch, usually main. It pulls your commits when GitHub notifies it about a push; if a commit does not show up in Lovable, another push, even an empty commit, usually fixes it.

There are limits worth knowing before you start. Git sync always creates a new repository, so you cannot connect the project to an existing one. If you disconnect, you also cannot reconnect to the same repository, and Lovable creates another. Renaming the repository or the organization does not break anything, but deleting the repository stops the sync. GitHub rejects files over 100 MB, and Lovable cannot edit files over 10 MB.

There is also a .zip code download, but it is only on paid plans and produces a one-time copy with no sync. To host elsewhere and keep editing in Lovable, GitHub sync is the right path. Neither option takes database records or user-uploaded files, which stay on Lovable Cloud.

bash
# Check the project type after cloning the repository
git clone git@github.com:your-account/your-app.git
cd your-app
grep -q "@tanstack/react-start" package.json && echo "TanStack Start" || echo "React with Vite"

# See the public variables Lovable already committed
cat .env

Do not disconnect the sync once the new host is linked to the repository. Since you cannot reconnect to the same repository, disconnecting forces you to point your hosting at a new one.

Where can you host a Lovable app, and what changes with each option?

There are five common options: staying on Lovable, Vercel, Netlify, Render, and a platform with servers in Brazil, such as Zenifra. All of them deploy from GitHub, issue HTTPS certificates, and redeploy on every push. The differences are price, what the free plan allows, where the server runs, and the currency of the bill.

On Lovable, publishing to a lovable.app address is free on every plan, and hosting a published app does not use credits on its own. Pages are delivered from locations around the world. Server compute for TanStack Start apps also uses no credits below a high daily limit, which the docs set at 1,000,000 server requests per project. A custom domain and removing the Edit with Lovable badge require a paid plan, and the lovable.app address keeps existing, redirecting to your primary domain.

On Vercel and Netlify, Nitro recognizes the platform and picks the preset automatically; Lovable’s guide lists npm run build and Node 22. Vercel’s Hobby plan is free, but its terms of service say it is for personal or non-commercial use only, so an app that sells anything needs Pro. Vercel Functions run in Washington by default, and the São Paulo region (gru1) exists and can be selected. Netlify includes a custom domain with SSL on the Free plan.

On Render and Zenifra, the app runs as a regular web service, with the node-server preset and a start command that launches the server Nitro generates. Render has a free instance that spins down after 15 minutes without traffic and takes about a minute to come back, and it has no South America region. Zenifra runs in São Paulo, bills in Brazilian reais, and is where we tested the configuration in this guide.

PlatformIs the free plan fit for production?Custom domainRegion closest to BrazilCurrency and payment
LovablePublishes to lovable.app, with the Lovable badgeFrom ProPages delivered from locations worldwideUS dollars by card; from Brazil, the page shows prices in reais
VercelHobby is for personal or non-commercial use onlyUp to 50 per project on Hobby; unlimited on ProFunctions in Washington by default; São Paulo (gru1) availableUS dollars, card
NetlifyFree with 300 credits per monthIncluded on Free, with SSLNot listed on the pricing pageUS dollars, card
RenderFree instance spins down after 15 minutes without traffic2 included on the Hobby workspace, then US$ 0.25 eachVirginia (US)US dollars, card
ZenifraNo free plan; hourly billing works for testingUp to 20 per project, no separate chargeSão PauloBrazilian reais, with PIX, boleto, or card

For an older React and Vite project, the list is longer, because any static host works. In that case, Lovable’s guide reminds you to set up a fallback to index.html with status 200, or internal routes return 404 when the page is reloaded. On Zenifra, a static site fits the Static plan, at R$ 5.90 per month.

How much does a Lovable app with a custom domain cost per month?

For a commercial TanStack Start app with a custom domain and the backend still on Lovable Cloud, the monthly bill ranges from US$ 7 to US$ 25 on the US platforms, or R$ 40.16 to R$ 143.43 with PTAX and IOF. On Zenifra, the same app costs R$ 29.90 on the Basic plan, in Brazilian reais. The table uses the cheapest plan on each platform that allows a custom domain and commercial use.

The scenario is a small app that already has customers: a few hundred users, server-rendered pages, and the database on Lovable Cloud. On platforms that bill usage on top of the subscription, such as Vercel and Netlify, an app this size tends to fit in the included credit, but the amount can grow with traffic.

PlatformPlan usedPrice in US dollarsIn BRL, with PTAX and 3.5% IOFNote
LovablePro, 100 creditsUS$ 25 per month, or US$ 250 per yearR$ 143.43 per monthFrom Brazil, the pricing page shows R$ 129 per month; includes credits to edit with AI
VercelPro, 1 developer seatUS$ 20 per month, with US$ 20 of usage creditR$ 114.74 per monthUsage above the credit is billed separately
NetlifyPersonal, 1,000 creditsUS$ 9 per monthR$ 51.63 per monthFree, with 300 credits, also accepts a custom domain
RenderHobby workspace and a 512 MB instanceUS$ 7 per monthR$ 40.16 per monthNo South America region
ZenifraBasic, 0.5 vCPU and 512 MBNot applicableR$ 29.90 per month, no IOFR$ 0.05 per hour or R$ 328.90 per year

Lovable’s price is not just hosting. The US$ 25 Pro plan includes 100 credits per month to build and edit the app through chat, on top of the custom domain. If you already pay for Pro because you edit a lot, the domain comes at no extra cost and Lovable hosting is the simplest option. The math changes for people who edit rarely: Lovable’s Free plan keeps GitHub sync and gives 5 build credits per day, up to 30 per month, so you can edit on Lovable for free and host with a custom domain somewhere else.

About Lovable’s price in reais: the page opened from Brazil on November 28, 2026 showed R$ 129 per month for Pro and R$ 259 for Business, against US$ 25 and US$ 50 in the docs. Billing goes through Stripe’s portal, and the docs warn that taxes and currency conversion can make the charge higher than the plan price. Check your card statement before comparing.

On Zenifra, Basic has 0.5 vCPU, 512 MB of memory, HTTPS, DDoS protection, and real-time logs, and it was the plan in our test. If the app grows, Premium, with 1 vCPU and 1 GB, costs R$ 62.90 per month and adds metrics and health checks.

What stays on Lovable Cloud and what changes when the app leaves?

Almost all of the backend stays where it is. The database, sign-in, file storage, Edge Functions, connectors, and Lovable Cloud AI features keep running on Lovable, and the app hosted elsewhere talks to them over the internet, as it already did. What changes is where the front end and the TanStack Start server run, and who holds that server’s environment variables.

The public Supabase keys are already in the repository. Lovable commits a .env file with VITE_SUPABASE_URL, VITE_SUPABASE_PUBLISHABLE_KEY, and VITE_SUPABASE_PROJECT_ID, which the build reads and bakes into the browser JavaScript. These keys are public by design, and data security depends on the database’s RLS policies, which Lovable already creates. You do not need to add the VITE_ variables on the new host.

The TanStack Start server, however, reads SUPABASE_URL and SUPABASE_PUBLISHABLE_KEY at runtime, without the prefix. They have the same values as the VITE_ versions and must be added on the platform. Server function secrets, such as a payment or email API key, are not in the repository and must also be added by hand at the destination.

ItemWhere it lives after the migrationWhat to do
App codeGitHub repositoryTurn on Git sync in Lovable
TanStack Start front end and serverOn the new hostSet build, start, port, and variables
PostgreSQL database and RLS policiesLovable CloudNothing; the app keeps using the same database
Sign-in and user accountsLovable CloudAdd the new URL to the allowed redirect URLs if you use social sign-in or email links
User-uploaded filesLovable CloudNothing
Edge Functions and connectorsLovable CloudNothing; still billed in Lovable credits
VITE_SUPABASE_URL and VITE_SUPABASE_PUBLISHABLE_KEY.env committed to the repositoryNothing; the build already reads the file
SUPABASE_URL and SUPABASE_PUBLISHABLE_KEYVariables on the new hostCopy the values from .env
Server function secretsVariables on the new hostAdd them by hand, because they are not in the repository

Lovable Cloud usage keeps drawing from your workspace credits, starting with the 20 Cloud credits per month included in the Free, Pro, and Business plans. Hosting the front end elsewhere does not change that part. The docs say most small or new apps stay within the grant, and that apps with significant traffic or data can go past it.

A note on latency. Lovable Cloud stores data in one of three regions, Americas, Europe, or Asia Pacific, and the docs do not say which city hosts the Americas region. With the app in São Paulo, pages reach Brazilian users faster, but each database query still travels to the Lovable Cloud region. For an app that makes few queries per page, the difference is small.

How do you deploy a Lovable app on Zenifra, step by step?

This is the configuration we tested end to end on November 12, 2026, with a new app built on Lovable’s Free plan: TanStack Start and Lovable Cloud with sign-up, sign-in, and reading and writing data. The full guide, with screenshots, is in Zenifra’s documentation. The first build takes about a minute.

Before creating the project, connect your GitHub account in the Zenifra Console and install the Zenifra GitHub App on the account or organization where Lovable created the repository. Make sure the app’s private repository is included in the installation, or it will not show up in the list. Then, in the Console, click + Create project, choose HTTP Application, the Basic plan, and a name. Under Source and port, select Git repository, the GitHub provider, the Lovable repository, and the main branch.

In the build settings, use the values in the table below. The Lovable repository ships a bun.lock, and Zenifra runs bun install --frozen-lockfile, which installs exactly the same versions Lovable used. Do not generate another lockfile.

bash
# Environment variables for the project on Zenifra
NITRO_PRESET=node-server
SUPABASE_URL=<same value as VITE_SUPABASE_URL>
SUPABASE_PUBLISHABLE_KEY=<same value as VITE_SUPABASE_PUBLISHABLE_KEY>

# To test the same build on your machine before deploying
bun install --frozen-lockfile
NITRO_PRESET=node-server bun run build
bun .output/server/index.mjs
Console fieldValue
RuntimeBun
Version1.4
Build commandbun run build
Start commandbun .output/server/index.mjs
Port3000
NITRO_PRESET variablenode-server
SUPABASE_URL variableThe same value as VITE_SUPABASE_URL in .env
SUPABASE_PUBLISHABLE_KEY variableThe same value as VITE_SUPABASE_PUBLISHABLE_KEY in .env

Follow the build in the Deploys tab. When it finishes, open the project’s public URL and test four things: an internal route with a page reload, sign-up and sign-in, reading and writing a record, and an action that calls a server function. If all four work, the app is ready for the domain.

If the app uses secrets in server functions, add each one as an environment variable before testing the action that depends on it. The value is in Lovable Cloud’s secrets settings, not in the repository.

Why is NITRO_PRESET=node-server required on Bun?

Because without that variable, Nitro notices it is running on Bun and picks the bun preset, which generates a different server from the one the start command expects. The result is misleading: the home page opens and the HTML shows up, but the files under /assets/*.js return 404. Without the JavaScript, buttons do not respond, the sign-in form does not appear, and nothing that depends on the browser works.

With NITRO_PRESET=node-server, the build writes a server to .output/server/index.mjs that serves both the pages and the /assets files. That server runs fine on Bun, which is Node compatible, and listens on port 3000, or on whatever the PORT variable says.

One important detail: Nitro reads the preset during the build, not when the app starts. If you forgot the variable and added it later, restarting the app does not fix it. Use New build in the Deploys tab to regenerate the output with the right preset. The same rule applies to VITE_ variables, which are baked into the build and only change with a new build.

On other platforms, the reasoning is the same. On Vercel and Netlify, Nitro detects the platform and picks its preset. On your own Node server, on Render, or in a container, Lovable’s guide recommends the same node-server, with node .output/server/index.mjs as the start command. You can also pin the preset in vite.config.ts, but then it applies wherever the build runs.

How do you connect a custom domain and HTTPS?

Only after the app works on the platform’s URL. That way, if something goes wrong, you know the problem is DNS and not the app. On Zenifra, open the project, click Edit, and in the Custom domains section, click Add, enter the domain, and save. The Console opens a window with the DNS records you need to create at your domain provider.

For a subdomain such as www or app, the record is a CNAME pointing to the address the Console shows, sometimes with TXT validation records. For the root domain, without www, it is a single A record, and you need to delete any other A, AAAA, CNAME, or ALIAS records on @. The HTTPS certificate is issued automatically once DNS is validated, usually within a few minutes, and the Console window refreshes every 30 seconds.

If the domain uses Cloudflare, keep the root domain on the grey cloud, DNS only, because with the proxy on, Cloudflare answers instead and validation fails. On a subdomain, you can turn on the orange cloud after the domain shows as active, with SSL/TLS set to Full (strict). Each project accepts up to 20 domains, and domains only work on public projects.

If the domain was pointing to Lovable, the switch happens only in DNS: the records that pointed to Lovable are replaced by the new host’s. The lovable.app address keeps existing while the project is published there. Once the domain is answering from the new host, you can unpublish the app on Lovable, from the Publish button, the three-dot menu, Unpublish.

Can you keep editing in Lovable after migrating?

Yes, and that is the best way to migrate. Because GitHub sync works both ways, every change you ask for in Lovable’s chat becomes a commit on main, and a host that tracks that branch redeploys on its own. On Zenifra, the Automatic by branch mode does this: every push to the chosen branch starts a build, and the app is only swapped once the deploy finishes successfully.

The reverse also works. If someone on the team fixes a bug in an editor and pushes to main, the commit flows back into Lovable and shows up in the project, and the host deploys the same version. That lets you split the work: Lovable’s chat handles new screens and flows, and developers adjust details directly in the code.

Two precautions avoid surprises. First, Lovable’s preview and the app published on Lovable are no longer your production environment after the migration, so always test on the new host’s URL. Second, if you do not want every chat message to go straight to production, work on a separate branch in Lovable and merge into main only when it is ready, or switch the Deployment mode to Manual, By Tag, or By Release under Edit project in the Zenifra Console.

What are the most common errors when moving an app off Lovable?

By far the most common is a page that opens but does not work because NITRO_PRESET is missing. The others show up less often, but they almost always share a cause: something Lovable did on its own that, outside Lovable, someone has to configure. The table lists the symptom, the likely cause, and the fix.

SymptomLikely causeHow to fix it
The page opens but does not respond to clicks, and /assets/*.js returns 404NITRO_PRESET=node-server is missing, so Nitro used the bun presetAdd the variable and run New build
A 502 error right after the buildThe instance is still startingWait a few seconds and reload
The Lovable repository does not appear when creating the projectThe Zenifra GitHub App has no access to the repositoryReview the installation and include the repository
The build fails while installing dependenciespackage.json changed without updating bun.lockUpdate dependencies through Lovable, or run bun install and commit the lockfile
An action that calls a server function returns a 500 errorThe server function secret is not set at the destinationAdd the secret as an environment variable
Google sign-in or the email link sends users back to lovable.appThe new URL is not in the allowed redirect URLsAdd the new domain to the authentication settings
Internal routes return 404 on reload, in an older projectStatic site without a fallback to index.htmlSet up the fallback with status 200
You changed a VITE_ variable and nothing happenedVITE_ variables are baked into the buildRun a new build

One error that is not in the table but costs a lot is trying to host a TanStack Start app as a static site, on a bucket or a CDN alone. Lovable’s guide warns that this does not work, because those services do not run the server. On Zenifra, use an HTTP Application on Basic or above, not Static, which is for sites made only of files.

What if you also want to move the database off Lovable Cloud?

It is possible, but it is a much bigger project than changing hosts, and for most apps it is not the place to start. Lovable has a checklist called Complete a move away from Lovable that separates what migrates on its own from what takes work. The database schema, with tables, indexes, RLS policies, functions, and triggers, and the storage buckets migrate through the SQL migrations already in the repository.

The rest is manual. Table data comes out through CSV export or the full database export, limited to one every 24 hours. User accounts come in the export with password hashes, but anyone who was signed in has to sign in again. Sign-in providers need to be configured again, storage files need to be downloaded and uploaded to the destination, Edge Functions are deployed with the Supabase CLI, and secrets and scheduled jobs are recreated by hand. Lovable connectors and AI features keep going through Lovable until you replace them with your own integrations.

The natural destination is another Supabase project, managed or self-hosted, because the app’s code already speaks Supabase. Switching to plain PostgreSQL, such as Zenifra’s managed databases, which start at R$ 11.90 per month, takes more: sign-in, storage, and direct browser access to the database have to be replaced by your own API. It is the same kind of work as leaving Firebase, and the guide to migrating from Firebase to PostgreSQL walks through it.

If you decide to migrate, plan a pause in writes for the final copy and time the export and restore beforehand. Lovable’s docs warn that deleting the Lovable Cloud database removes the backend permanently, including the exports stored in it, and that none of these steps cancels your subscription or Cloud usage automatically.

When is it better to stay on Lovable?

When you already pay for Pro because you edit the app often and you do not need anything Lovable hosting does not provide. In that case, the custom domain, HTTPS, and hosting come with the credits you already pay for, pages are delivered globally, and there is no configuration to maintain. For prototypes, launch pages, and internal tools, publishing on Lovable itself is the shortest path.

It also makes sense to stay when nobody on the team wants to handle environment variables, builds, and DNS. Outside Lovable, each new server function secret has to be added on the host, and a failed build needs someone to read the log. Lovable handles that on its own, and server compute for TanStack Start apps uses no credits below the daily limit.

Leaving pays off when the app has become a product. Reasons to migrate include keeping the code in a repository the company controls, with reviews and history; using a custom domain without paying for Pro just to get it; putting the server close to Brazilian users; paying in Brazilian reais, through PIX or boleto, with no IOF; or running the app next to other services on the same platform, such as a database, a cron job, or an API.

On Lovable’s Free plan there is one more detail: the docs say apps published from Free workspaces may be unpublished for inactivity. For an app that must stay online even when nobody touches the project, hosting elsewhere solves that too.

In short

A Lovable app can be hosted on any platform that runs Node or Bun. Turn on GitHub sync, available on every plan, check whether the project is TanStack Start or React with Vite, and configure the host with the right Nitro preset. The database, sign-in, and files stay on Lovable Cloud, and you only add SUPABASE_URL, SUPABASE_PUBLISHABLE_KEY, and your server function secrets. For a custom domain, Lovable requires Pro, at US$ 25 per month, or R$ 143.43 with PTAX and IOF; Vercel, Netlify, and Render charge US$ 7 to US$ 20 on their cheapest plan fit for commercial use.

If your users are in Brazil, the configuration we tested on Zenifra puts the app in São Paulo for R$ 29.90 per month, billed in Brazilian reais, and you keep editing in Lovable as before.

Deploy my Lovable app

We respect your privacy

We use essential cookies to run this site. Measurement and marketing cookies, such as Google Ads, are only enabled when you accept all cookies. Read our cookie policy.