How to host a Bolt.new site
Host a Bolt.new project: download the code, build it once, and drop the folder it creates — with single-page app mode if it has several pages.
read as markdownBolt projects are usually React apps built with Vite. You download the project’s code, turn it into a finished site with one build on your computer, and 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
In Bolt, open your project, select the project title at the top left, then Export → Download. Unzip the file it saves. (Bolt: download a project)
2. Build it
You need Node.js installed once. Then open a terminal in the unzipped folder and run:
$ npm install$ npm run build✓ built in 2.07sThe 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.
These steps are for a Vite project, which has a vite.config file. Bolt can
also make projects with other frameworks, such as Astro or Next.js. If yours
has an astro.config or next.config file instead, follow that framework’s
page under Frameworks.
3. Drop it and turn on single-page app mode
Drop the folder on your site’s Overview tab, as in Deploy from the
dashboard. If your site has more than one page but the folder
has only one index.html, select Deploy options in the review and choose
Single-page app under Unknown paths. Then Upload and stage and
Make live.
Without it, anyone who refreshes on /about or opens a shared link to it 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, 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 (/assets/…),
which only exists once it’s online. It is not a sign the upload will fail.
A blank page online, with missing scripts. The project is set to live under a sub-folder of a website instead of at the top. Vite explains the setting.
Details
A Vite project writes dist/. From the CLI, with client-side routing:
$ one9x pages release ./dist --site mysite --spa --deploy✓ v1 live · unknown routes → /index.html→ https://mysite.one9x.app/If the project is not Vite, Frameworks has the output folder
and the --spa answer for each framework.