Hosting guide

How to host a Lovable app on your own domain

Lovable hosts what you publish, and connects custom domains on its paid plans. If you would rather run the app on hosting you control, its code is yours to take. This guide covers the export, the one check that decides how you host it, and the exact steps on VeloxaHost hosting.

By VeloxaHost · Updated · 6 min read

Two ways to put a Lovable app on your domain

Keep Lovable hosting and connect the domain there. Lovable's docs say custom domains are available on paid plans: you add an A record pointing at Lovable and a verification TXT record, or buy the domain inside Lovable. If you are happy on Lovable, this is the least work.

Host the code yourself. Lovable's docs say the code is yours and can be hosted wherever you choose. You still build in Lovable if you like, and the app's backend can stay on Lovable Cloud while the front end moves. The rest of this guide is this route.

Step 1: Get the code out of Lovable

  1. Step 1: Connect the project to GitHub

    In Lovable, set up a GitHub connection in workspace or project settings (Git, then GitHub), then click Connect in the project's GitHub settings. Lovable creates a repository and keeps it in two-way sync with one branch, usually main. Its docs list github.com sync on all plans.

  2. Step 2: Or download a zip

    On paid plans, Lovable's Download codebase gives you the whole project as a zip. Git sync is still the better route if you will keep building in Lovable, because every change lands in the repository.

  3. Step 3: Note what does not come with it

    Lovable says its database export does not include stored files, Edge Function code or secrets. If the app uses Lovable Cloud, you can leave that backend where it is: Lovable's docs say Cloud can stay in place while the front end moves.

Step 2: Check which stack you have

This one check decides everything after it. Lovable's docs say apps created from 13 May 2026 use TanStack Start, which renders pages on a server, and older apps use React and Vite and build to static files. Open package.json in the repository:

  • No `@tanstack/react-start` in dependencies: a React and Vite app. npm run build writes static files to dist/. Host it as a Static site (step 3a).
  • `@tanstack/react-start` listed: a TanStack Start app. Lovable says it needs a host that runs server code, built with NITRO_PRESET=node-server npm run build and started with node .output/server/index.mjs on port 3000. Host it as a Node.js site (step 3b).

Lovable recommends Node 22, which is the version VeloxaHost Node.js sites run.

Step 3a: A React and Vite app, as a static site

VeloxaHost's Git deploy copies a repository into the site and does not run a build, so you build first and deploy the result.

  1. Step 1: Build with the app's settings

    In a clone of the repository, set the variables the app reads (for a Lovable Cloud backend, Lovable lists VITE_SUPABASE_URL, VITE_SUPABASE_PUBLISHABLE_KEY and VITE_SUPABASE_PROJECT_ID) and run npm ci then npm run build. Lovable notes that VITE_ variables are baked in at build time, so rebuild after changing one.

  2. Step 2: Put the built files in a public repository

    The Git deploy clones a public https repository and stores no credentials, and Lovable creates its repository as private. Push only the contents of dist/ to a separate public repository. Everything in it is served to every visitor anyway, so making it public reveals nothing the site does not.

  3. Step 3: Create a Static site in the console

    Open Websites, click Add Website, enter your domain and choose Static under Hosting type. Static sites already send unknown paths to index.html, which is the fallback Lovable says a React and Vite app needs for its routes.

  4. Step 4: Deploy from Git

    On the site's page, open Deploy from Git, enter the public repository's https URL and branch, leave Subdirectory empty (or set it to dist if you commit the folder instead), and click Deploy Now. Recent deploys shows the result.

For a hands-off pipeline, build in GitHub Actions on every push to the private repository, push dist/ to the public one, and call the site's CI webhook, which queues a deploy.

Step 3b: A TanStack Start app, as a Node.js site

A Node.js site runs npm start from /opt/app on Node 22, behind HTTPS, and expects the app on port 3000, the same default Lovable gives. Each deploy runs npm ci (or npm install) and restarts the app, but never runs a build. The usual fix is to make the build part of starting. In package.json:

"scripts": {
  "prestart": "NITRO_PRESET=node-server npm run build",
  "start": "node .output/server/index.mjs"
}

npm runs prestart before start, so the app is rebuilt after every deploy. Lovable notes that the project needs nitro in package.json before it is set in vite.config.ts, so check that first.

Create the site with Node.js as the hosting type and leave Start Command empty (it defaults to npm start). The repository has to be public for the Git deploy; if it must stay private, a VPS gives you full control of how code arrives. Set the browser and server variables Lovable lists before the first deploy: open the site's console (Advanced, Open Console), run systemctl edit veloxa-app, add Environment= lines under [Service], then systemctl restart veloxa-app. The Node.js hosting page covers ports, builds and variables in full.

Step 4: Point your domain and get HTTPS

  1. Step 1: Add the records the console shows

    On the site's page, DNS — point your domain here lists an A record for the domain, an A record for www, and a TXT record that proves the domain is yours. Add all three at your DNS provider.

  2. Step 2: Remove the old ones

    If the domain was connected to Lovable, delete the A record pointing at Lovable and its _lovable TXT record, so visitors do not land on two places.

  3. Step 3: Wait for verification

    The console re-checks every few minutes. Once the records resolve, the site goes live and HTTPS is issued and renewed automatically.

  4. Step 4: Update sign-in redirects

    If the app signs people in through Lovable Cloud, Lovable says to configure the new host's sign-in redirect URLs. Add your domain there and test a sign-in.

FAQ

Common questions

Do I need a paid Lovable plan to host the app myself?
Not for the code: Lovable's docs list GitHub sync on all plans, while the zip download needs a paid plan. Connecting a custom domain to Lovable's own hosting needs a paid Lovable plan.
Will my Lovable backend keep working on another host?
Lovable's docs say its built-in backend, Lovable Cloud, can stay in place while you move the front end, and that AI features and connectors keep working, using your Lovable workspace credits. Set the variables and sign-in redirect URLs for the new domain.
Why does my Lovable app show a 404 on page refresh elsewhere?
A React and Vite app needs the server to return index.html for every route. VeloxaHost Static sites do this already. On other hosts, add the rewrite Lovable describes for that host.
Can VeloxaHost deploy from my private Lovable repository?
No. VeloxaHost's Git deploy clones public https repositories and does not store Git credentials. Push the built files to a separate public repository, or use a VPS where you control access.
Can I keep building in Lovable after I move the hosting?
Yes. With two-way GitHub sync, changes made in Lovable land in the repository. Rebuild and deploy them to VeloxaHost, by hand or from a CI job that calls the site's deploy webhook.

Sites for your line of work

Each trade page has a starter prompt and a plain list of what the builder does not do for that business.

Try Veloxa Build by VeloxaHost

Start on the Free plan with your VeloxaHost account: hosting with HTTPS is included, and you can download your code at any time.