OxyPages

How To Host The V0 Output As A Live Website

How To Host The v0 Output As A Live Website

v0 gives you React components, not a web page. How to host the v0 output as static files anywhere: one config line, one build, and what stops working.

The OxyPages Team · · 9 min read

v0 built you a page and it looks right. Then you clicked Code, downloaded the ZIP, opened the folder, and there was no web page in it.

There's an app folder with a page.tsx in it. A components folder. A package.json. No index.html anywhere.

Nothing went wrong on your end. v0 writes React components for a Next.js project, and a Next.js project is source code, not a website. So to host the v0 output anywhere but Vercel, something has to turn those components into plain HTML, CSS and JavaScript first.

The good part is that Next.js does that itself: one line of configuration, usually two, then one build command, and out comes a folder of real files that any static host will take.

The annoying part is that the same line switches off a chunk of what Next.js can do, and if v0 wired your contact form to a server action, that form is inside the chunk.

I'll use one real page throughout: an illustrator's portfolio. Eighteen pieces in a grid, a short about section, an email link. No logins, no database. That shape is what v0 is best at, and the one that survives the trip.

TL;DR: v0 produces React components in a Next.js project, so there's no file to upload until you build it. Add output: 'export' to next.config.js, turn off image optimisation, run the build, and Next.js writes a folder called out holding one real HTML file per page. That folder is the website, and any static host will take it. What you give up: server actions, route handlers that read the request, cookies, redirect and header rules, and the built-in image optimiser. Need any of those at request time and you should stay on a host that runs Next.js.

What Does v0 Actually Hand You?

React components, almost always inside a Next.js App Router project, styled with Tailwind and built on shadcn/ui pieces. That's a project, not a page.

There are four ways out of v0, and they hand you different amounts of work:

Way out of v0What you end up withBuild needed?
The Deploy buttonA live site on a Vercel addressNo. Vercel runs the build for you
Code, then downloadA ZIP of the project sourceYes
The GitHub connectionThe same source, in a repositoryYes
The add-to-codebase commandComponents dropped into a project you already haveYes, by your own project

If you only want it online today and don't mind where, use the Deploy button. One click, free to start, and Vercel built v0, so that path is as smooth as it gets.

People look elsewhere for three reasons: they already pay for hosting, they want the files in their own hands, or they want the page on a domain beside everything else. Whichever of those you are here for, the next question is the same. working out which shape an AI handed you decides everything downstream.

How To Host The v0 Output As Plain Static Files

How To Host The v0 Output As Plain Static Files - OxyPages

Next.js has a static export mode that writes finished files to disk instead of serving them from a running server. Turn it on, build once, upload what it produces. You need Node, for two commands.

  1. Unzip the download and run npm install. That pulls React, Next.js and the shadcn pieces into a node_modules folder you will never upload.
  2. Open next.config.js or next.config.mjs and add the export switch. There may be almost nothing in the file yet; that's normal.
  3. Add the image setting too. Next.js resizes photos on request, and nothing will be running to do that. Without this line the build stops with an error, as soon as anything on the page uses next/image, and v0 output almost always does. Pointing images.loader at a custom loader is the other way out, if you'd rather keep the resizing.
  4. Run npm run build. Next.js writes a folder called out.
  5. Look inside out. You'll see index.html, a 404.html, a _next folder of scripts and styles, and a file or folder for every other page. That folder is your website.
  6. Upload the whole out folder as one piece. Not the project folder, not app. Every path in the build is relative to the top of out, so it has to stay intact.

The config file ends up looking like this:

// next.config.mjs
const nextConfig = {
  output: 'export',
  trailingSlash: true,
  images: { unoptimized: true },
};

export default nextConfig;

trailingSlash: true is the line nobody warns you about. Without it, a page at /about is written as about.html, and a simple host asked for /about goes looking for a directory. With it, that page becomes about/index.html, which every static host serves correctly.

the Next.js guide to static exports, including the full unsupported list

This is also what makes a Next.js export nicer than a plain React build. Next.js writes a separate HTML file per route, so a deep link is a real file on disk and refreshing it cannot 404. A single page app built with Vite has one index.html and fakes the rest in the browser, which is where that familiar refresh problem comes from. What a React build produces and where it can live covers that one.

What Stops Working Once Next.js Goes Static?

Anything that needed a server at the moment a visitor asked for the page. The build still runs on your machine, so server components and build-time data fetching are fine. Request-time work is what disappears.

The list that catches people:

  • Server actions. The usual way v0 wires a contact form. It will render, and the submit button will do nothing.
  • Route handlers that read the request. An app/api/... endpoint can still write a static file during the build, but it can't see who is asking.
  • Cookies and draft mode. No server, nothing to read a cookie at request time.
  • Redirects, rewrites and custom headers from next.config. Those instruct a Next.js server. Your host handles this now, if it handles it at all.
  • The default image optimiser. Hence the unoptimized line. Images get served at whatever size you saved them, so size them yourself.
  • Dynamic routes with no generateStaticParams. Next.js has to know every address at build time, because it writes each page to disk.
  • Incremental regeneration. Nothing rebuilds a page in the background. You rebuild and re-upload.

Read that list against your own page before you spend an afternoon. For a portfolio, a landing page or a brochure, you lose nothing you were using. For anything with accounts or a live feed, this is the wrong route.

So, the illustrator. Four things came up and only one of them was interesting.

The images in the preview weren't hers. v0 had filled the grid with placeholder art while it got the layout right. Her own files went into the project's public folder, and every reference in page.tsx changed to match. Tedious, and it's the real work in the job.

The build failed the first time, on the image optimiser, before the unoptimized line went in. That error names the problem clearly, which is more than most manage.

The out folder came to 11 MB, because eighteen PNGs straight out of a drawing app are enormous. Re-exported as WebP at 1,600 pixels wide, the folder landed just over 2 MB and the page got visibly quicker. Google's guidance on serving images in modern formats

The email link worked untouched. A mailto: link is handled by the visitor's own browser, so no server is involved and nothing can break. On a static page I'd take an email link over a contact form every time.

Build and upload took about fifteen minutes. Re-exporting the artwork took an hour, and it would have taken that hour on any host.

Where Should You Upload The Finished Folder?

Anywhere that serves static files, which is nearly everywhere. The choice is how much workflow you want around it.

WhereHow it worksBest when
VercelConnect the repo, it runs the build itself, no export config neededYou're still editing in v0 every day and want server features later
Cloudflare Pages or NetlifyConnect the repo, set the build command and the output folder to outYou want rebuild-on-push and rules like redirects and headers
A drag and drop static hostBuild locally, upload the out folderThe page is finished and you don't want a git provider in the loop
Your existing web hostingUpload out by FTP into the public folderYou already pay for hosting and would rather not add another bill

All four are legitimate, and the git-connected platforms win if you'll be shipping changes weekly.

One note if you upload by hand: an out folder with real artwork in it is bigger than you think, so check a host's upload cap before you pick one. Ours stops a photo portfolio dead on the free tier.

When Is A Static Export The Wrong Call?

When Is A Static Export The Wrong Call? - OxyPages

When the page needs something to happen on a server while a visitor is looking at it. Then you keep Next.js on a host that runs Next.js, and you stop reading here.

Concretely: user sign-in, a database read, a payment, an AI endpoint v0 generated for you, or a contact form on a server action you don't want to replace. A static host cannot do any of that at any price, and OxyPages is a static host, so it's the wrong tool for those jobs. Vercel, or any Node host, is the right one.

Forcing it is the mistake. Bend a half-dynamic project into static files and you get a page that looks finished and quietly does nothing when somebody presses submit.

The split: marketing pages, portfolios, docs and brochures become files. Applications stay on something that runs code.

What To Do Next

Start by finding out which half you're in, because it takes two minutes.

  1. Search the project for 'use server' and app/api. Hits mean request-time code, so decide now whether to replace it or stay put.
  2. Open app/page.tsx and check every image reference. Placeholder art from the preview will not come with you.
  3. Add the three config lines, run npm run build, and see whether it finishes. The error, if there is one, names the feature that doesn't export.
  4. Open out/index.html in your browser. Styling may look off because of the file paths, which is expected; you're checking the content is there.
  5. Upload out, then open the live link on your phone, on mobile data.
  6. Then compare what you're paying: what each plan actually includes is a short list.

When the folder is ready, you can drag it in and get a live link without opening a terminal again.

The takeaway: you aren't hosting a v0 project, you're hosting the folder its build produces. Once that lands, the hosting question gets boring, which is the best thing hosting can be.

FAQ

Can I Just Ask v0 For A Plain HTML File?

Yes, and it's worth asking before you install anything. Tell it you want one self-contained HTML file with the CSS and JavaScript inside it, no React and no build step. The result looks plainer without the shadcn components, but a single self-contained page uploads exactly as it arrives.

Do I Need Node Installed On My Computer?

For the export, yes. The build is a program, and it has to run somewhere. Your way around it is a connected platform that builds in the cloud, or one favour from somebody who already has Node, and the same problem on a Lovable export goes through both properly.

Why Is My Uploaded Page Blank With Errors In The Console?

Almost always because the project folder went up instead of the build output. A browser asked for page.tsx, got something it can't execute, and rendered nothing. Check that the top of your upload is out/index.html. The other common cause is leaving out the _next folder, which holds every script and stylesheet.

Will The shadcn Components Still Work After The Export?

Yes. Those components are React running in the visitor's browser, and the browser is still there. Dropdowns, tabs, dialogs and carousels all behave normally. The only pieces that break are the ones that talk to a server, which is why it pays to check for server actions before you host the v0 output as files.

Try It Now

Still Here? Drop It In.

The whole pitch fits in one sentence: your HTML, on a link, in seconds.

Drag and drop your HTML files, a folder, a ZIP, your app's build folder, a PDF, an image or an MP3

or ·

No account needed. Your unclaimed website stays live for 30 minutes on a free subdomain. Claim it to your account to keep it permanently.

  • No Account Needed
  • Free SSL
  • 30-Minute Unclaimed Link, Claim To Keep It