# Deploy a Bolt.new, v0 or Replit app to your own server

> How to deploy a Bolt.new, v0 or Replit app to your own VPS: export the code, fix what breaks outside the tool, then add a domain, SSL and auto deploy.

Source: https://zopanel.net/blog/deploy-bolt-v0-replit-app  
Updated: 2026-11-09

## Key takeaways

- Bolt.new, v0 and Replit all let you push the project to GitHub or download it as files, which is all a VPS needs.
- Bolt generates React, Vite, Tailwind CSS and Node.js by default, v0 generates Next.js, and a Replit app can be any language, so check package.json or requirements.txt first.
- What breaks outside the tool is almost always secrets, the database connection, the listening port or a vendor-only service such as Replit Auth or Bolt's built-in database.
- On ZoPanel, Git deploy detects the framework, builds inside the account's limits, issues free SSL and redeploys on every push through a signed webhook.

To deploy a Bolt.new, v0 or Replit app to your own server, first get the code into a GitHub repository (all three tools can push to GitHub, and Bolt and Replit also download a ZIP), then recreate its environment variables on the server, point it at a database the server can reach, and make it listen on the port the server gives it. After that it is an ordinary Vite, Next.js, Node.js or Python project: build it on a VPS, put nginx and a free certificate in front, and redeploy on every push.

This guide covers what is specific to each tool. For the general picture, see [how to deploy a vibe-coded app](/blog/deploy-vibe-coded-app); for Lovable, see [deploying a Lovable app to a VPS](/blog/deploy-lovable-app-vps).

## What stack does each tool generate?

The vendors' own docs say:

| Tool | What it usually generates | Backend options in the tool | How to get the code out |
| --- | --- | --- | --- |
| Bolt.new | React, Vite, Tailwind CSS and Node.js [by default](https://bolt.new/use-cases/ai-app-builder); other JavaScript frameworks if you ask for them | Node.js only ([no PHP or Python](https://support.bolt.new/building/supported-technologies)); Bolt Cloud database or your own Supabase | GitHub integration, or Export > Download (ZIP) |
| v0 (Vercel) | Next.js, React, TypeScript, Tailwind CSS and shadcn/ui ([v0 FAQ](https://v0.app/docs/faqs)) | Next.js server code; Supabase, Neon, Upstash and Vercel Blob through the Vercel Marketplace | GitHub sync |
| Replit | Anything Replit runs: Node.js, Python and more | Replit's PostgreSQL, App Storage, Replit Auth, Secrets | Git pane with GitHub sync, or Download as zip |

Check the project root: `vite` with no `start` script is a static front end, `next` is a Next.js server, `requirements.txt` means Python.

## How do you get the code out of Bolt.new?

**GitHub (recommended).** Bolt's [Git integration](https://support.bolt.new/integrations/git) works with an individual GitHub account: click the GitHub icon, log in, install the GitHub App, enter a repository name and click **Create repository**. The repository starts private on a `main` branch. From then on, "every time you make a change that doesn't break the project, Bolt creates a commit for you", and Bolt pulls in outside changes about every 30 seconds. Each prompt that works becomes a commit, and each commit can become a release on your server.

Only the project owner can connect it, disconnecting is permanent, and branches are merged in GitHub, not in Bolt.

**ZIP.** On desktop, click the project title in the top left, then **Export > Download**. Bolt's [project help](https://support.bolt.new/building/using-bolt/projects-files) says the ZIP runs locally with `npm install && npm run dev` once Node.js is installed.

### What breaks outside Bolt

- **The database.** Bolt offers two: its own [built-in database in Bolt Cloud](https://support.bolt.new/bolt-cloud/database) and [Supabase](https://support.bolt.new/integrations/supabase). If you chose Supabase, nothing moves: the app keeps talking to your Supabase project from wherever it is hosted. If you used Bolt's built-in database, read its page before you plan anything: it lets you export table rows, but states that "there's currently no supported way to migrate an existing Bolt database to Supabase".
- **Server functions and secrets.** Bolt runs API code (payments, webhooks, AI calls) as [server functions](https://support.bolt.new/cloud/database/server-functions) with their [own secrets](https://support.bolt.new/bolt-cloud/database/secrets). Those live in Bolt Cloud or Supabase, not in your ZIP. Hosting the front end elsewhere does not move them.
- **Build-time variables.** A Vite front end reads `VITE_*` variables when it is built. Vite's [env docs](https://vite.dev/guide/env-and-mode) warn that they end up in client-side code and should not contain secrets such as API keys. Recreate the public ones (a Supabase URL and publishable key, an API base URL) on the server before the first build.
- **Client-side routing.** A React single-page app with routes like `/dashboard` needs the server to return `index.html` for unknown paths, or reloading a page gives 404.

## How do you get a v0 app out of Vercel?

v0's [GitHub integration](https://v0.app/docs/github) is the way out. In the project menu go to **Settings > GitHub**, select **Connect**, pick the scope and a repository name; v0 "creates a private repository and pushes the project's current code to it". v0 then works on a separate branch for each chat instead of pushing straight to your base branch, and **Publish** merges a pull request into the base branch. Once connected, the repository "becomes the source of truth for your project's code".

That model suits a VPS well: let your server deploy only the base branch (usually `main`), and every v0 change arrives there as a merged pull request. The v0 FAQ is explicit that Vercel is optional: "You can still export code and deploy elsewhere." The [v0 Platform API](https://v0.app/docs/api/v2/reference/chats/download-chat-files) can also download a chat's files as a ZIP if you need a one-off copy.

### What breaks outside Vercel

- **Environment variables.** When you add Supabase, Neon or Upstash in v0, the integration ["adds the necessary environment variables to your project"](https://v0.app/docs/databases), and they live in the Vercel project. You can export them with `vercel env pull .env.production --environment=production` ([Vercel CLI docs](https://vercel.com/docs/cli/env)), but production variables default to the Secret type, and for Secret values that cannot be read back the CLI writes a placeholder. Expect to copy real secret values from the provider's own dashboard (Neon, Supabase, Upstash).
- **`NEXT_PUBLIC_*` variables** are [inlined at build time](https://nextjs.org/docs/app/guides/environment-variables). They must exist on the server before `next build`, and changing them later needs a rebuild.
- **Vercel-only features.** [v0 deployments](https://v0.app/docs/deployments) come with preview deployments for working branches, Deployment Protection, Web Analytics, Speed Insights and runtime logs. None of these follow your code. Databases from the Marketplace are separate providers with ordinary connection strings, so they normally keep working from a VPS; check Vercel Blob or any other Vercel-specific service you use before you switch.
- **Next.js itself** runs fine on one server with `next start`; see [Next.js on a VPS](/blog/deploy-nextjs-to-vps).

## How do you export a Replit app to a VPS?

Replit's [projects and files help](https://docs.replit.com/help/projects-and-files) gives both routes. For GitHub: "Link your GitHub account from your account's connected services", then "turn on auto-sync in the Git pane for two-way syncing". For a ZIP: "Select the three-dot menu at the top of the file tree and choose Download as zip." If the download fails on a big project, run `zip -r project.zip .` in the Shell and download that file.

### What breaks outside Replit

| Replit piece | What it does on Replit | What to do on your server |
| --- | --- | --- |
| `.replit` and `replit.nix` | [TOML config](https://docs.replit.com/features/project-setup/configuration) with `run`, `[deployment]` `build` and `run`, `[[ports]]`; Nix system packages | Ignored elsewhere. Copy the `[deployment]` build and run commands into your build and start commands; install system packages yourself. |
| Port binding | Published apps must listen on `0.0.0.0`; the first port opened is mapped to port 80 ([Ports](https://docs.replit.com/replit-workspace/ports)) | Read the port from `PORT` instead of hard-coding it, and listen on `127.0.0.1` behind nginx. |
| Secrets | Encrypted values exposed as environment variables; published apps have separate [production app secrets](https://docs.replit.com/core-concepts/project-editor/app-setup/secrets) | Copy each value by hand into the server's environment variables. |
| `REPLIT_*` variables | `REPLIT_DEPLOYMENT`, `REPLIT_DOMAINS`, `REPLIT_DEV_DOMAIN` set automatically | Not set elsewhere. Search the code for `REPLIT_` and replace those checks. |
| PostgreSQL | Managed database reached through `DATABASE_URL` ([connection details](https://docs.replit.com/features/data-and-storage/connection-details)) | Export the production database with a PostgreSQL client and import it into PostgreSQL on the server, or keep using it remotely. |
| App Storage | Buckets used through `@replit/object-storage`, tied to one project ([App Storage](https://docs.replit.com/features/data-and-storage/object-storage)) | Move files to S3-compatible storage and swap the SDK calls. |
| Replit Auth | Sign-in with Replit accounts, set up only through Agent ([Replit Auth](https://docs.replit.com/replit-workspace/replit-auth)) | Plan to replace it with an auth library or service that does not depend on Replit accounts. |

Replit's docs say any PostgreSQL-compatible client can connect to the production database with the connection string from its **Settings** tab, so a standard dump works:

```bash
pg_dump "$REPLIT_PROD_DATABASE_URL" --no-owner --no-acl -f app.sql
```

The port change is usually one line. For an Express app:

```js
const port = process.env.PORT || 3000;
app.listen(port, process.env.HOST || "127.0.0.1");
```

For Flask or FastAPI, drop the `app.run(host="0.0.0.0", port=...)` in production and let gunicorn or uvicorn bind to `127.0.0.1:$PORT`.

## A quick checklist before the first deploy

Whichever tool built the app, run this on your laptop or in a Codespace before touching the server:

1. **Build it clean.** `npm ci && npm run build` (or `pip install -r requirements.txt`). If it fails here, it fails on the server.
2. **Commit the lockfile** (`package-lock.json`, `pnpm-lock.yaml` or `yarn.lock`) so the server installs the same versions.
3. **Pin Node.js** with an `.nvmrc` such as `24`.
4. **List every variable** the app reads in a `.env.example` without values, and check `.env` is in `.gitignore`.
5. **Find hard-coded hosts, ports and vendor code**: `grep -rnE "0\.0\.0\.0|localhost:|REPLIT_|@vercel/" --exclude-dir=node_modules .`
6. **Decide where the data lives**: stay on Supabase or Neon, or move to a database on the VPS. Then run through our [vibe coding security checklist](/blog/vibe-coding-security-checklist).

## Deploy it with ZoPanel

ZoPanel is a hosting control panel you install on your own Ubuntu or Debian VPS. Its [Git deploy](/docs/git-deploy) reads the repository, proposes install, build and start commands, and builds as the hosting account, inside its CPU and memory limits:

1. **Create the website.** Open **Websites > New website**, choose **Git deploy**, paste the repository URL and branch, and keep **Free SSL (Let's Encrypt)** on. For a private repository, open **Deploy > Deploy key (private repositories)**, add the shown key to GitHub as a read-only deploy key and use the `git@github.com:...` URL.
2. **Check the detection.** Click **Analyze repository**. A Bolt app with Vite and no `start` script becomes a **Static site** served from `dist`; a v0 app becomes **Next.js** started with `next start`; a Replit Express or Flask app becomes a Node.js or Python server app. Change anything with **Use these settings and customize**.
3. **Add environment variables.** Use **Paste .env** for the values you collected (up to 200). They are available to the build, so `VITE_*` and `NEXT_PUBLIC_*` values are inlined correctly, and at runtime. ZoPanel sets `PORT` and `HOST=127.0.0.1` itself.
4. **Keep files between releases.** Each deploy builds in a new release folder, so put upload folders or a persistent `.env` in **Persistent paths**.
5. **Point the domain.** Add an A record for the domain to the server's IP ([how to point a domain to a VPS](/blog/point-domain-to-vps)). ZoPanel issues and renews the certificate once the domain resolves to the server ([SSL docs](/docs/ssl)).
6. **Turn on auto deploy.** On the **Deploy** tab, enable **Deploy when main is pushed**, then add the **Payload URL** and **Secret** as a GitHub webhook with content type `application/json`. ZoPanel checks GitHub's `X-Hub-Signature-256` signature and deploys only pushes to the configured branch.

If you downloaded a ZIP instead of using Git, there is no ZIP source as such: choose **Uploaded files (File Manager)** under **Source** and put the project files in `domains/<domain>/source`, either with [SFTP](/docs/ftp-sftp) or by uploading the ZIP in the [File Manager](/docs/file-manager) and using **Extract** there. Make sure `package.json` (or `requirements.txt`) ends up directly in `source`, not in a subfolder, then click **Deploy**. It is built like a Git release, but without auto deploy on push.

**Databases.** If the app moves off Supabase, Neon or Replit's PostgreSQL, create a PostgreSQL or MariaDB database on the [Databases](/docs/databases) page and load your `.sql` dump with **Import / restore**. The connection string looks like `postgresql://alice_app:<password>@127.0.0.1:5432/alice_app`.

**Single-page apps.** From ZoPanel 0.4.35 a new website deployed from a Vite or Create React App project gets the single-page app fallback by itself, so client-side routes load on a direct visit; on an existing website, turn on **Single-page app fallback** on the **Tools** tab ([static sites](/docs/static-sites#single-page-apps-client-side-routing)).

**Releases.** A server app's new release must answer its **Health check path** below status 500 within 90 seconds before nginx switches to it; if it does not, the old release keeps serving. **Rollback** keeps the last 5 builds.

What you give up: no preview deployments per branch or chat, no global CDN (see [Cloudflare with a VPS](/blog/cloudflare-with-vps)), and the server is yours to run. In return you get a flat cost and room for many apps on one VPS. The [vibe coding page](/vibe-coding) explains the workflow, and [the Free plan](/pricing) covers 3 hosting accounts, 10 websites and 10 databases with no time limit.

## Conclusion

Bolt.new, v0 and Replit all hand over your code. The real work of leaving is everything around it: secrets that stayed in the tool, a database in someone else's cloud, a port hard-coded for Replit, and vendor-only features like Replit Auth or Bolt's built-in database. Sort those out on your laptop, and a VPS with Git deploy, free SSL and a push webhook gives you the same "prompt, commit, live" loop on a server you control.

## FAQ

### Can I deploy a Bolt.new app without Bolt hosting?

Yes. Connect the project to GitHub or use **Export > Download**, then deploy it like any Vite or Node.js project. If the app uses Supabase, it keeps working from your server once the same `VITE_*` values are set at build time. If it uses Bolt's built-in database, check first: Bolt documents row export but no supported migration to Supabase.

### Does a v0 app need Vercel?

No. v0 generates a standard Next.js project, and its FAQ says you can export the code and deploy elsewhere. You lose Vercel features such as preview deployments and Web Analytics, and you must recreate the environment variables that the Vercel integrations created.

### How do I move a Replit database to my VPS?

Copy the production connection string from the database's **Settings** tab, run `pg_dump` against it, create a PostgreSQL database on the VPS and import the dump. Then set `DATABASE_URL` to the new database in the server's environment variables.

### Why does my Replit app not start on a VPS?

Usually the port. Replit published apps listen on `0.0.0.0` and Replit maps the port for you. On your server, read the port from `PORT`, listen on `127.0.0.1` behind nginx, and replace any code that depends on `REPLIT_*` variables or `.replit` run commands.

### Will my server redeploy every time Bolt or v0 changes the code?

It can. Bolt commits each working change to GitHub, and v0 merges a pull request when you publish. A push webhook on that branch builds each new commit and keeps the previous release if the build or health check fails.
