Guide · Lovable
Host a Lovable export anywhere
You built an app in Lovable and want it on a link you control, without setting up a hosting account and build pipeline. Build the project to static files, zip the output folder, and upload it. You get a link like launch-waitlist.flatpage.page with HTTPS, and you can replace it with a new build whenever you like.
From Lovable project to live link
Get the code
Connect your Lovable project to GitHub and clone it, or download the code as a zip and unpack it.Build to dist and zip it
In the project folder runnpm installthennpm run build. Zip the contents of thedistfolder.Upload the zip
Drop the zip on your dashboard. Your app is live in seconds, and every new build can replace it at the same URL.
Tips for a smooth Lovable deploy
Zip the inside of dist, not the project
The zip should have index.html at its top level (or inside a single folder) alongside the assets folder. Don't upload the project root with src and node_modules: that's source code, not a website, and it is much larger than the limit. Files that aren't part of a static site are skipped.
You need Node.js once
The build runs on your computer. Install the current LTS version of Node.js from nodejs.org, open a terminal in the project folder and run the two commands above. It takes a minute the first time and a few seconds after that.
Routing
Lovable apps use React Router. Links inside the app work, but a visitor who refreshes on /pricing asks the server for a file that doesn't exist. The simplest fix is hash routing: ask Lovable to “switch to HashRouter”, so routes look like /#/pricing and always load from index.html.
Environment variables
Values like VITE_SUPABASE_URL are baked into the build. Make sure your .env file is present when you run npm run build, and never put secret keys in variables that start with VITE_; they end up in the public JavaScript.
Asset paths
Vite's default base path of / works because your site lives at the root of its own domain. If you changed base in vite.config.ts, set it back to / before building.
Questions
- Can I upload the Lovable source code directly?
- Not as-is. The source is a Vite + React project that has to be built first. Run the build, then upload the zip of the dist folder it produces. That folder is plain HTML, CSS and JavaScript.
- Will my Supabase backend still work?
- Usually, yes. The built app talks to Supabase from the browser using the public URL and anon key baked in at build time. Add your new link to the allowed URLs in Supabase's auth settings if you use sign-in.
- Refreshing a page other than the home page shows an error.
- That's a client-side router issue. Switch the app to hash-based routing (HashRouter) so every route loads from index.html, then rebuild and re-upload.
- How big can the zip be?
- Up to 10 MB on the free plan, 100 MB on Starter and 500 MB on Plus. A typical Lovable build is 1 to 5 MB; big images are usually what pushes it over.
- Can I connect my own domain?
- Yes, on Starter and Plus. Each site can have one custom domain with HTTPS.
Ship your Lovable build
Zip the dist folder and get a link. One site free, custom domains from $9 a month.