kvbox.cloud
Deploy

Static site

Deploy a plain index.html with its CSS, JS and images: nothing to build, served by nginx.

A directory with an index.html and no build step deploys as it is:

cd my-site
kvbox deploy
# ✓ my-site is live at https://my-site.kvbox.app

What happens

  1. Nothing is built. The directory is shipped into the box, without node_modules, .git and kvbox.json.
  2. nginx, which comes with the image, serves it from /srv/app/dist on port 80, where the address points.

A redeploy stages the new files and swaps the directory in one move, keeping the old site until the new one is in place. It takes a few seconds.

Detection

A directory is a static site when it has an index.html at its top and its package.json, if any, has no build script. A Vite project also has an index.html at its root, but it has a build script and vite in its dependencies, so it is a React deploy.

A site that a tool builds into a folder (Eleventy, Hugo, Astro, a Tailwind build) is deployed from that folder: build it yourself, then

kvbox deploy --template static

and set "dist" in kvbox.json to the output folder (_site, public, dist). Only that folder is shipped.

Routing

nginx answers index.html for a path that is not a file, so /about serves index.html unless there is an about.html or about/index.html.

Defaults

The box is xs (1 vCPU, 2 GB of RAM). It hibernates after an hour without visitors and wakes on the next one.

On this page