Thomas Osayi

November 19, 2026 · Updated November 22, 2026 · 9 min read · Thomas Osayi

How to move a Lovable app to Vercel and your own domain

A step-by-step guide to moving a Lovable app to Vercel: GitHub sync, build settings, environment variables, routing fixes, Supabase auth URLs and connecting your domain.

Lovable is a good place to build an app and a perfectly fine place to host one. Still, a lot of founders reach a point where they want the code on their own infrastructure: a developer joins and works in Git, the company already uses Vercel, or they simply want the app on their domain under accounts they control.

The move itself takes an hour or two when it goes well. When it goes badly, it is almost always for the same three reasons: missing environment variables, routes that 404, and login redirects that still point at the old address. This guide walks through the steps in order, with the exact settings that trip people up.

Should you move your Lovable app at all?

Move when you need control of the code and hosting, not just a custom domain. At the time of writing Lovable's Pro plan, $25 a month, includes custom domains and removes the Lovable badge, so if all you want is yourbusiness.com, you can stay where you are.

Good reasons to move to Vercel:

  • A developer is joining and wants to work in Git with preview deployments for each change.
  • You want staging and production environments with different keys.
  • Your company already runs other projects on Vercel and wants one bill and one dashboard.
  • You need server features or settings Lovable hosting does not expose.

Reasons that are not enough on their own: wanting a custom domain, wanting to remove the badge, or a vague sense that "real apps" live elsewhere. Moving adds things to look after, and you should get something for that.

What do you need before you start?

You need GitHub, a Vercel account, access to the backend and a list of every secret the app uses. Gather these first so you are not hunting for keys halfway through.

  • A GitHub account that will own the repository.
  • A Vercel account. At the time of writing the Hobby plan is free with usage caps and Pro is $20 a month per developer seat; read Vercel's terms on commercial use when you choose.
  • Access to the backend: either your own Supabase project or the Lovable Cloud backend.
  • Access to your domain's DNS settings at the registrar.
  • Logins for every connected service, such as Stripe, Resend or Google Cloud, because some of them need the new URL added.

Check which stack you have

Open package.json in the code view. Lovable's own hosting documentation separates two cases. Newer projects, created from May 13, 2026, that list @tanstack/react-start run a server, so the host has to run that server; Vercel handles this without extra configuration. Older projects built with React and Vite produce a static build in a dist folder, which needs a routing rewrite. The steps below cover both.

Step 1: How do you connect the project to GitHub?

Use Lovable's built-in GitHub sync, which creates a new private repository and keeps it in sync both ways. In Lovable, open Project settings, then Git, then GitHub, and click Connect next to your GitHub connection. If you have not linked GitHub yet, add a connection under Workspace settings, Git, GitHub.

A few details from Lovable's documentation matter here:

  • Lovable creates a new repository; you cannot point it at an existing one.
  • Sync is two-way on a single branch, usually main. Changes you push to that branch flow back into Lovable.
  • Renaming the repository keeps the sync. Deleting it breaks the sync.
  • Pushes over 100 MB are rejected, so do not commit large videos or exports.

Once connected, open the repository on GitHub and check that the latest change you made in Lovable is there. That repository is now the source of truth for both Lovable and Vercel.

Step 2: How do you import it into Vercel with the right settings?

Import the GitHub repository as a new Vercel project and let Vercel detect the framework. In Vercel, choose Add New, then Project, pick the repository and look at the settings before clicking Deploy.

For an older React and Vite app

  • Framework preset: Vite.
  • Build command: npm run build.
  • Output directory: dist.

For a TanStack Start app

  • Build command: npm run build.
  • Node.js version: 22, which Lovable's documentation lists.
  • No output directory setting is needed on Vercel.

Do not deploy yet if you have not added environment variables (Step 3). A build without them will either fail or, worse, succeed and produce an app that cannot reach its database.

Why pages 404 when you refresh

Older React and Vite projects are single-page apps with only one real HTML file, and Vercel does not know to serve it for other paths. Clicking around works, but refreshing on a page such as /dashboard or sharing a direct link returns a 404.

The fix is a file named vercel.json in the root of the repository with a rewrite rule that sends every path to /index.html. Lovable's hosting documentation names vercel.json as the place for this on Vercel. Commit the file, let Vercel redeploy and test a refresh on a deep link.

TanStack Start apps do not need this, because the server handles each route itself.

Step 3: Which environment variables does it need?

It needs every variable from the project's .env file, entered in Vercel before the first real build. Lovable's documentation lists the backend ones: VITE_SUPABASE_URL, VITE_SUPABASE_PUBLISHABLE_KEY and VITE_SUPABASE_PROJECT_ID for code that runs in the browser, and SUPABASE_URL, SUPABASE_PUBLISHABLE_KEY and SUPABASE_PROJECT_ID for server code in TanStack Start apps. Add any others your app uses, such as a Stripe publishable key.

Two rules catch almost everyone:

  • In a Vite app, only variables that start with VITE_ reach the browser code. A variable named SUPABASE_URL without the prefix will be undefined in the browser.
  • Browser variables are baked in at build time. If you add or change one, you must redeploy for it to take effect.

What never goes in a VITE_ variable

Anything secret: the Supabase service role key, the Stripe secret key, webhook signing secrets or API keys for paid services. Anything with the VITE_ prefix ends up in the JavaScript every visitor downloads. Secrets belong in server code or Supabase edge functions only.

Step 4: How do you keep login working on the new domain?

Update every place that lists allowed URLs for sign-in. This is the step most people miss, and it produces errors that look like the app is broken when only a setting is wrong.

In Supabase

Open Authentication, then URL Configuration. Set the Site URL to your new domain, and add both the Vercel preview pattern you use and the production domain to Redirect URLs. Password reset and magic link emails use the Site URL, so a stale value sends users back to the old address.

In Google Cloud, if you use Google sign-in

Add the new domain to the OAuth client's authorized JavaScript origins. The redirect URI usually points at Supabase's callback, so it often stays the same.

In other services

Register a Stripe webhook endpoint for the new domain in live mode and add its signing secret where the webhook code runs. Update any allowed origins in email or analytics tools.

If your app uses Lovable Cloud rather than your own Supabase project, read Lovable's documentation on moving to your own Supabase project before you start. It notes that some managed features, such as managed OAuth configuration, only work on the built-in backend.

Step 5: How do you connect your domain?

Add the domain in the Vercel project's Domains settings and create the DNS records Vercel shows you. Vercel lists the exact records for your project, typically an A record for the root domain and a CNAME for www. Enter them at your registrar, wait for verification and let Vercel issue the SSL certificate automatically.

If the domain currently points at Lovable, plan the switch for a quiet hour. DNS changes can take anywhere from minutes to a day to reach everyone, and for that window some visitors will see the old host. Leaving the Lovable version online means nobody sees an error while it settles.

A worked example of a move

Here is an illustration with a made-up business. A small tutoring company built a booking app in Lovable with student logins and Supabase, and wants it on Vercel at book.example.com.

They connect GitHub, import the repository into Vercel and deploy. The site loads, but login fails with a redirect error and refreshing the schedule page returns a 404. Two fixes solve it: a vercel.json rewrite to index.html, and adding the new domain to Supabase's Site URL and Redirect URLs. Then a parent reports that password reset emails link to the old lovable.app address, which the Site URL change also fixes. Finally, the booking deposit stops confirming because the Stripe webhook still points at the old address; registering a live endpoint for the new domain and adding the signing secret to the edge function settles it.

None of those steps is hard. Each one is invisible until a real user hits it, which is why sign-up, login, password reset, a deep link refresh and a live payment should all be tested after any move.

Should you upgrade an older Vite project to TanStack Start before moving?

Upgrade first if search traffic or link previews matter to you, because a TanStack Start app sends finished HTML for every page while an older Vite app sends a mostly empty page and builds it in the browser. Lovable made TanStack Start the default for new projects on May 13, 2026, and older React and Vite projects are not upgraded automatically.

According to Lovable's documentation, the upgrade runs inside your existing project, carries over your design, content and backend, and moves your SEO tags and analytics scripts. Your live site does not change until you publish again, you can revert from version history, and at the time of writing it typically costs 10 to 35 credits.

The order matters when you are also changing hosts. I would do it like this:

  • Run the upgrade in Lovable while the app is still hosted there, then test sign-in, a deep link refresh and any payment on the Lovable preview.
  • Publish it on Lovable and let real users use it for a day or two.
  • Only then import the repository into Vercel, using the TanStack Start settings from Step 2 and the server environment variables from Step 3.
  • Remove any vercel.json rewrite you added for the old single-page build, since the server now handles each route itself.

Doing both at once means that when something breaks, you cannot tell whether the upgrade or the new host caused it. One change at a time keeps every problem traceable.

When should you get help with the move?

Get help if the app handles payments or private data, or if the move is blocking a launch date. A wrong setting here does not usually crash the app; it quietly breaks one flow, like password resets or paid upgrades, and you find out from an annoyed customer.

I do these moves as part of my work fixing AI-built apps. A straightforward move with domain and auth fixes fits the Quick Fix at $60 and about 2 days. If the app also has launch blockers such as open database rules or missing webhooks, the Finish and Launch package from $600 over about 10 days covers the move and the fixes together. My Lovable fix page lists the other problems I see most often, and the guide to Supabase row level security is worth reading before any launch.

The bottom line

Moving a Lovable app to Vercel comes down to six steps: connect GitHub, import the repository with the right build settings, copy every environment variable, add a routing rewrite for older Vite apps, update auth redirect URLs, and connect the domain. Test every sign-in path and a real payment before you switch DNS, and keep the old version running until the new one has proved itself.

Questions, answered in one line

Can I host a Lovable app on Vercel?

Yes. Connect the project to GitHub from Lovable, import the repository into Vercel and add the same environment variables; Lovable documents hosting outside its platform.

Why do my Lovable app pages show 404 on Vercel when I refresh?

An older Lovable app built with React and Vite is a single-page app, so Vercel needs a rewrite in vercel.json that sends every path to index.html.

Why does login break after moving my Lovable app?

The Supabase Site URL and Redirect URLs, and any Google OAuth authorized origins, still list the old address; add the new domain in each place.

Do I need to move off Lovable to use a custom domain?

No. At the time of writing Lovable Pro includes custom domains, so moving to Vercel is a choice for control, cost or team workflow rather than a requirement.

Can I keep editing in Lovable after moving to Vercel?

Yes, because the GitHub sync is two-way: changes from Lovable land in the repo and Vercel redeploys them, as long as you edit only the synced branch.

How much does it cost to have someone move my Lovable app?

Thomas Osayi handles a straightforward move with domain and auth fixes as a Quick Fix from $60, and a move combined with launch blockers under Finish and Launch from $600.

Sources

About the author

Thomas Osayi is a full-stack developer in Los Angeles studying computer science at Loyola Marymount University. He founded and built SQWAD, a SaaS platform Shopify brands use to run creator programs, and builds custom Next.js websites, SaaS MVPs and fixes for AI-built apps for businesses and founders.

See his work · Services and prices

Related articles

Fix, finish and launch your AI-built app

Built your app with Lovable, Bolt, v0, Replit or Cursor and got stuck? I fix the bugs, connect auth and payments, clean up the code and deploy it to production.

See the service