How to deploy Lovable, Bolt.new, v0 and Cursor projects

Deploy Lovable, Bolt.new, v0 and Cursor projects

Lovable, Bolt.new, v0 and Cursor get you to a working app quickly. When you want your own hosting, your own domain, or all your sites in one place, you first need to know what kind of project you have. Most are either Vite + React or Next.js, and each needs different handling.

Step 1: Get the source code onto GitHub

  • Lovable, Bolt.new: use the GitHub integration in the tool to push the code to your repository. Some tools also offer a ZIP download.
  • v0: download the code or push it to GitHub from the project view.
  • Cursor: the code is already on your machine, so just git push.

These tools change their interfaces often. If a button has moved, look for GitHub or Export in the project settings.

Step 2: Identify the project type

Open package.json and look at the dependencies:

You seeProject typeOften from
nextNext.jsv0, Cursor
vite, reactVite + React (SPA)Lovable, Bolt.new, Cursor
express, fastifyNode.js backendCursor, ChatGPT

Next.js projects usually deploy as they are, see Next.js hosting. Vite projects are recognised automatically too, see step 3.

Step 3: Prepare a Vite + React project

VibeVN recognises Vite projects: it runs the build script, then serves the output folder, including when an inner page is reloaded. You do not need to change anything in the project, so go on to step 4.

If you host somewhere else

A default Vite project has dev, build and preview scripts but no start script, so the server does not know what to run after the build. Elsewhere you may need these two changes.

Add a start script to package.json:

{
  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview",
    "start": "vite preview --host 0.0.0.0 --port 3000"
  }
}

Allow your real domain in vite.config:

export default defineConfig({
  plugins: [react()],
  preview: { allowedHosts: true },
});

The second change is easy to miss. We tested this on a fresh Vite project: with the default configuration, vite preview answered 403 when reached through a real hostname such as shop.vibevn.app, while localhost worked fine. With allowedHosts set, the home page and nested routes such as /products/shirt all returned 200.

If your project uses vite.config.ts, make the same change there, then push to GitHub.

The alternative: upload only the built files

If you prefer not to change the configuration, run npm run build locally, zip the files inside dist so index.html sits at the root of the ZIP, and upload that. The site runs as static files. The downside is rebuilding and re-uploading for every change, and you should test reloading on nested routes.

Step 4: Handle environment variables

Lovable and Bolt projects often use Supabase, with variables such as VITE_SUPABASE_URL. Keep two things in mind:

  • Variables prefixed with VITE_ are bundled into the code at build time. They need a value before the build, and anyone can read them in the browser. Only public keys belong here.
  • List the names in .env.example so you are asked for the values during deployment. Never commit your real .env.

If you use Supabase, add your new domain to the allowed URLs in its authentication settings. Otherwise sign-in breaks after the move.

Step 5: Deploy

Open a new deployment, choose the repository, and follow the steps in how to deploy a vibe coded website.

Common errors

  • Blocked request or 403: preview.allowedHosts is missing.
  • Blank page, 404s for JS files in the console: check base in vite.config. It should usually be /.
  • Cannot find module only on the server: an import has the wrong upper or lower case. Linux treats them as different. See fixing build errors.
  • Supabase sign-in returns to the wrong page: the new domain is not in the authentication settings.

Frequently asked questions

Is Cursor any different?

Cursor does not limit the project type, so check package.json as in step 2. When asking Cursor to start a new project, request a start script and a server that listens on the PORT variable.

Do I lose features by leaving Lovable?

The code is yours and runs independently. You lose the visual editor for the copy running elsewhere, unless you keep pushing changes through GitHub.