How to host a v0 project
Host a v0 project: download the code, build it as static output, drop the folder it creates — single-page app mode only if it is a Vite app.
read as markdownv0 makes Next.js apps unless you ask for something else. It can also make other kinds of project, such as Vite apps. (v0: full-stack apps) Pages hosts finished sites made of plain files, so a Next.js app needs one setting to build that way, then one build on your computer, and you drop the folder that creates.
Starting a new site, or about to publish? Paste the One9x prompt into the tool first — it builds static files, wires any form to your site’s built-in form service, and keeps inside the limits.
1. Get the code
Open the project’s menu in v0 and select Download ZIP. Unzip the file it saves. If the project is connected to GitHub, you can download it from GitHub instead. (v0: GitHub)
2. Build it
If it is a Next.js app — the project has a next.config file — follow the
Next.js page. It needs one change to the config, and
some features, like API routes and server actions, can’t be used on a static
host. That page lists them.
If it is a Vite app — the project has a vite.config file — you need
Node.js installed once. Open a terminal in the unzipped
folder and run:
$ npm install$ npm run build✓ built in 1.94sEither way, the build creates a new folder inside the project, with
index.html in it. That new folder is the one you drop — see
Details for its name.
3. Drop it
Drop the folder on your site’s Overview tab, as in Deploy from the dashboard, then Upload and stage and Make live.
Single-page app mode depends on the project. A Next.js build writes a real
HTML file for every page, so leave it off. A Vite app draws its pages in the
browser from one index.html, so turn it on: in the review, select Deploy
options and choose Single-page app under Unknown paths. Without it,
anyone who refreshes on /about gets a “not found” page. SPA mode & error
pages explains why.
Add a contact form
If the site has a contact form, it needs somewhere to send submissions. Your One9x site already has one, free: define the form under Widgets → Forms and ask the tool to use the HTML the dashboard generates. Widgets has the steps and a sample prompt.
Common mistakes
Dropping the whole project. If the review lists package.json, app, src
or node_modules, you dropped the project instead of the folder the build
created. Discard it and drop the inner folder.
A folder inside a folder. index.html must be at the top level of what you
drop, not one folder further down.
A blank page when you double-click index.html on your computer. That is
expected: the page looks for its files at the top of a website (/_next/… or
/assets/…), which only exists once it’s online. It is not a sign the upload
will fail.
Links work on the home page and every other page is “not found”. A Next.js
setting, trailingSlash, is missing. The Next.js
page covers it.
Details
A Next.js static export writes out/; a Vite app writes dist/. From the CLI:
$ one9x pages release ./out --site mysite --deploy✓ v1 live→ https://mysite.one9x.app/For a Vite app, point at ./dist and add --spa.