Deploy by framework

Static HTML

Deploy plain files or a generic static build without a server.

A folder of HTML, CSS, JavaScript, and images is already deployable. Put index.html at the top of your site folder; no framework dependency is required.

Detection and build output

The generic static route is the final fallback when no Dockerfile, Next.js app, or managed preset is selected. Use build.framework: "static" to select it explicitly.

For projects with a build step, Nitroship runs the build command or package.json build script and looks for dist, then build, then out. If your output lives elsewhere, set build.outputDirectory relative to the source root. For plain files with no build, deploy the site folder itself.

nitroship.json (custom output)
{
  "build": {
    "framework": "static",
    "command": "npm run build",
    "outputDirectory": "published"
  }
}

Only publish public files. Do not point the output directory at server code, secrets, or a dependency tree.

Deploy

Install the CLI

curl -fsSL https://nitroship.co/install.sh | bash
ntro login

Already installed? Skip ahead. Full options, PATH setup, and updates: Install the CLI.

nitroship.json
{
  "build": {"framework": "static"}
}

Setting build.framework skips detection and uses this preset, even if your project root has a Dockerfile. It can't be combined with build.dockerfile. Without it, Nitroship detects the build as described in How Nitroship chooses a build.

ntro apps create my-static-html-app
ntro deploy . --prod

After installing dependencies, you can also build locally with ntro deploy . --prod --local. After deployment, open static assets and nested routes at the URL printed by the CLI.

Already prepared files

For an already-built folder, upload its contents directly:

ntro deploy ./public --app my-static-html-app --prod --local

Generic static sites do not automatically receive a SPA fallback. If client-side routes need one, configure a missing-file rewrite in nitroship.json:

{"rewrites": [{"source": "/(.*)", "destination": "/index.html"}]}

Open /, another HTML page, and an asset after deploying. See examples/hello-static for a sample layout.

Limits and custom setups

Static deployments need no compute region and do not run SSR, server APIs, or server middleware. Never put secrets in browser-visible configuration. See Environment variables for build-time settings and Static sites for routing.

For adapters or output layouts outside this contract, use your own Dockerfile. Remove build.framework and define installation, build, and startup in the Dockerfile.

On this page