Can you self-host a v0 app?
Short answer: v0 itself is a service at Vercel. The app it built is a Next.js app in your GitHub repository, and Next.js runs on any server with Node.js. Most of it works the same. AI calls and the environment variables need a second look.
VPSYour v0 app on your own server
What you can and cannot self-host
| Self-host? | What it means | |
|---|---|---|
| v0 and its chat | No | Vercel runs them as a service |
| Your Next.js app | Yes | next build, then next start on your server |
| Images with next/image | Yes | They work with next start, no setup |
| Caching and ISR | Yes | On one server with its own disk, no setup |
| The Vercel AI Gateway | Yes | With an API key instead of the Vercel login |
| Databases from v0 | They stay | In your account at Neon, Supabase or Upstash |
What changes on your own server
- Environment variables. Values that start with NEXT_PUBLIC_ go into the browser code during next build, so the server needs them before it builds. The others are read on the server.
- AI calls. On Vercel the app gets VERCEL_OIDC_TOKEN and the AI Gateway accepts it. On your server, create an AI Gateway API key in the Vercel dashboard and set it as AI_GATEWAY_API_KEY. API keys work anywhere and do not expire until you revoke them.
- Images on Linux. The Next.js docs note that image optimization can use a lot of memory on some Linux systems and link to the fix.
Vercel or your own server
Vercel builds every push and runs as many copies of the app as it needs. On your own server you run one copy for a fixed price: a VPS for PanelAlpha Engine costs about $5 to $15 a month. The engine builds the app from GitHub and gives it an address with HTTPS.
How the move works
Between 11 and 16 migration steps, depending on your app. The step-by-step guide shows only the ones you need.
- Connect the v0 project to GitHub and copy the environment variables with vercel env pull.
- Deploy the repository on your VPS through PanelAlpha Engine and give it the variables.
- Give the engine an AI Gateway API key if the app uses AI.
- Change the login address in Supabase, point your domain at the server and remove it from Vercel.