Lovable deployment rescue

Lovable app works in preview but will not deploy

Lovable preview runs on their infrastructure. Production needs a real build, environment variables, a server process, and a domain. When any of those is missing, the deploy fails.

What is probably broken

The app looks finished in Lovable preview, but exporting the code and running it on a real server fails with missing env vars, build errors, or a dead process.

What production should look like

A working production build on your own server, with correct environment variables, HTTPS on your domain, and a repeatable deploy path.

STEP 01

Export the real code, not just the preview

Lovable preview hides a lot of infra complexity. The first step is getting a complete, buildable repo.

  • Sync or export the Lovable project to GitHub.
  • Confirm the build command and Node version match what Lovable uses.
  • List every external service the app calls (Supabase, Stripe, email, analytics).

STEP 02

Recreate the environment on the server

Most deploy failures come from missing or wrong environment variables.

  • Copy all production env vars from Lovable to the server deploy panel.
  • Update callback URLs, auth redirects, and webhook endpoints to the new domain.
  • Keep secrets out of git. Load them from the server environment only.

STEP 03

Run the build, start the process, test

A successful build does not mean the app works. Run the full smoke test.

  • Run the production build on the server and fix any compile errors.
  • Start the app as a managed process (PM2, Docker, or deploy panel).
  • Test signup, login, database writes, and any payment flows on the live domain.

Quick check

Is your app production-ready?

If you cannot tick all five, we can fix it. Send us the repo and we handle the rest.

  • ?Custom domain with HTTPS
  • ?Environment variables configured
  • ?Database wired and backed up
  • ?Auto-deploy on push
  • ?Smoke tested and live

Free checklist

Deploying this yourself?

Get the exact 5-step checklist we run before every deploy. No fluff, just the things that actually break.

No spam. Your email is only used to send the checklist.

Done-for-you deploy

RepoAssistant moves Lovable apps from broken preview to a live production server with domain, database, and backups.

Fixed price per repo. 24h delivery or full refund. No hourly billing.

Deploy my app

Related guides