Black Friday30% off · BLACKFRIDAY30–d––h––m
How to Host a Lovable, Bolt or AI Studio Export as One Link
Nov 30, 2026

How to Host a Lovable, Bolt or AI Studio Export as One Link

AI app builders export source code, not a website. Here is which exports can become a single shareable page, how to build one and upload the built folder as a zip, and the API-key leak to check for before you publish anything.

Short answer: an export from Lovable, Bolt, v0, Replit or Google AI Studio is a project, not a page. You get source code that has to be built first, and some of these apps also need a server that keeps running. The ones that run entirely in the browser can be built and uploaded here as a zip of the built folder, which becomes one link. The rest need a host that runs code.

This guide sorts out which is which, as of 30 November 2026.

What each builder actually gives you

BuilderWhat the download isCan it become one static page?
Lovable, apps made before mid-May 2026React + Vite source; npm run build writes dist/Yes, if it doesn't depend on server-side secrets
Lovable, newer apps (TanStack Start)Source that builds a Node serverNo, it needs a running server
Bolt.newSource zip, usually ViteUsually yes for Vite projects; no if it's Next.js
v0A Next.js projectOnly if you add a static export yourself, and only without API routes or server actions
Replit Agent appsFull-stack projectNo. Replit itself says Agent apps can't use static deployments
Google AI Studio, older Build appsReact + Vite source with an import mapYes, but read the API-key section first
Google AI Studio, apps since May 2026Includes a Node.js server that holds the Gemini keyNo, the server is the point

Sources: Lovable's external hosting guide, Bolt's projects and files, v0's FAQ, Replit's static deployments and AI Studio's Build mode docs. Builders change their output often, so check what your own package.json says.

A quick test for your own export: open package.json. A "build": "vite build" script with no server framework (Next.js, Nitro, Express) is a browser-only app, and the rest of this guide applies.

Check for a leaked API key first

This step comes before any host, ours included.

Some AI Studio exports read the Gemini key at build time and write it into the JavaScript bundle in plain text. The project's vite.config.ts does it with a define block that maps process.env.API_KEY or GEMINI_API_KEY to the value from loadEnv. Anyone who opens the published page can read the key from the page source. In October 2026 a developer reported USD 4,010 in unauthorised charges after exactly this.

Before publishing a built file, search it for your key:

grep -c "AIza" dist/index.html

Any number above zero means a Google API key is inside the file. Don't publish it anywhere. (If you upload the zip here, the upload is refused when it finds a Gemini, OpenAI, Anthropic, Stripe secret or Supabase service_role key — but other hosts won't stop you.) Either remove the AI calls, or move them behind a server you control, which makes the app one that can't be a single page anyway.

The same applies to Lovable and Bolt apps that talk to Supabase. The publishable (anon) key is meant to be public and is protected by your row-level security rules. A service-role key is not, and should never be in a browser build.

Build it, then upload the built folder as a zip

This is the shortest route and needs no config changes. In the project folder:

npm install
npm run build

The build writes a folder, usually dist (Create React App uses build). Zip that folder, not the whole project, and drop the zip on the home page. Uploading a zip of the whole project also works, as long as the built folder is inside it and node_modules is left out (it would blow past the size limit): the built index.html is picked over the source one.

The upload turns the folder into one page in your browser: scripts, lazy-loaded routes, stylesheets, fonts and images are packed into a single HTML file, then published like any other page. It refuses a zip that is still source code (and tells you to run the build), one without an index.html, and one with a secret key in it. Only index.html is published; if the zip has other HTML pages, you'll see a note saying they weren't included.

Or build one HTML file yourself

If you'd rather have the single file on disk — to attach it, open it offline, or host it elsewhere — add vite-plugin-singlefile, which inlines all JavaScript and CSS into index.html:

npm install
npm install -D vite-plugin-singlefile

In vite.config.ts, add it after the framework plugin:

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { viteSingleFile } from 'vite-plugin-singlefile';

export default defineConfig({
  plugins: [react(), viteSingleFile()],
});

Then build:

npm run build

You now have one dist/index.html with everything inside. Open it straight from your file manager. If it works there, it works as a link.

Things that commonly go wrong, from the plugin's README and from experience:

  • Files in public/ aren't inlined. Images referenced as /logo.png will be missing. Import them from src/ instead, so Vite bundles them.
  • Lazy-loaded routes can fail. If the app uses React.lazy or a dynamic import(), change those to normal imports for the single-file build.
  • Large images make the file big. Inlined images grow by about a third. A free page here is capped at 1 MB (Pro 10 MB, Max 50 MB). The free plan limits explain how to shrink a page that's over.

Publish it

Upload the zip, or the single index.html, on the home page and you get a link. Your scripts run as they do locally: the page gets its own origin, so localStorage, fetch to your own APIs, downloads and dialogs all work. Client-side routing (React Router) works while the reader clicks around. The address that's shared is the page itself, so deep links to inner routes aren't something to rely on.

When you change the app, rebuild and update the page instead of publishing a new one. The link you already sent keeps working and shows the new version. A free page lives for 7 days; keeping it permanent is paid.

When you need a real host instead

If your export builds a server (newer Lovable, v0 with API routes, Replit Agent, newer AI Studio), you need a host that runs code: the builder's own publish button, Vercel, Netlify Functions, Cloud Run or similar. A static page host, ours included, can't run your server, and wrapping the build into one file won't change that.

FAQ

Can I upload the Lovable or Bolt zip directly?

Not the zip the builder gives you: that holds source code, which has to be built first, and the upload will say so. Run npm install && npm run build, then zip the folder the build creates (usually dist) and upload that. Exports that build a server instead of a folder of files can't be hosted here either way.

My built page is blank.

Open the browser console. The usual causes are absolute asset paths to public/ files, a lazy route that wasn't inlined, or an AI Studio import map conflicting with the Vite bundle. For the last one, remove the <script type="importmap"> block from index.html so Vite bundles the dependencies itself, then rebuild.

Will my Supabase login and database still work?

Database calls usually do, if the app only uses the publishable key from the browser: they go from the reader's browser straight to Supabase. Sign-in is the part to test before you share. Social-login redirects in particular depend on your Supabase redirect-URL settings.

Newsletter

Join the community

Subscribe to our newsletter for the latest news and updates