---
title: Statico
description: Static websites hosting (Astro Starlight, Next.js, Docusaurus, Vitepress, plain HTML)
---

## Introduction

**Statico** hosts static websites: a folder of HTML, CSS, JavaScript, and images. Your build tool makes the folder, one command deploys it, and it's online with TLS and a free address.

<ul style="display:flex;flex-wrap:wrap;gap:.6rem 1.4rem;list-style:none;padding:0;margin:1.2rem 0">
<li style="display:flex;align-items:center;gap:.5rem;margin:0"><span aria-hidden="true" style="width:22px;height:22px;display:inline-block;background:currentColor;-webkit-mask:url(/img/logos/astro.svg) center/contain no-repeat;mask:url(/img/logos/astro.svg) center/contain no-repeat"></span>Astro Starlight</li>
<li style="display:flex;align-items:center;gap:.5rem;margin:0"><span aria-hidden="true" style="width:22px;height:22px;display:inline-block;background:currentColor;-webkit-mask:url(/img/logos/nextdotjs.svg) center/contain no-repeat;mask:url(/img/logos/nextdotjs.svg) center/contain no-repeat"></span>Next.js export</li>
<li style="display:flex;align-items:center;gap:.5rem;margin:0"><span aria-hidden="true" style="width:22px;height:22px;display:inline-block;background:currentColor;-webkit-mask:url(/img/logos/docusaurus.svg) center/contain no-repeat;mask:url(/img/logos/docusaurus.svg) center/contain no-repeat"></span>Docusaurus</li>
<li style="display:flex;align-items:center;gap:.5rem;margin:0"><span aria-hidden="true" style="width:22px;height:22px;display:inline-block;background:currentColor;-webkit-mask:url(/img/logos/vitepress.svg) center/contain no-repeat;mask:url(/img/logos/vitepress.svg) center/contain no-repeat"></span>VitePress</li>
<li style="display:flex;align-items:center;gap:.5rem;margin:0"><span aria-hidden="true" style="width:22px;height:22px;display:inline-block;background:currentColor;-webkit-mask:url(/img/logos/vite.svg) center/contain no-repeat;mask:url(/img/logos/vite.svg) center/contain no-repeat"></span>Vite (React, Vue, Svelte)</li>
<li style="display:flex;align-items:center;gap:.5rem;margin:0"><span aria-hidden="true" style="width:22px;height:22px;display:inline-block;background:currentColor;-webkit-mask:url(/img/logos/html5.svg) center/contain no-repeat;mask:url(/img/logos/html5.svg) center/contain no-repeat"></span>Plain HTML</li>
</ul>


## Features

- **No downtime.** The old version answers until the new one is complete. A deploy that fails changes nothing.
- **Fast uploads.** Only changed files are sent, small ones together in archives.
- **Pretty addresses and redirects.** `about.html` is also `/about/`, and a `_redirects` file sets redirects.
- **Public or private.** Public by default. A private website needs an [API token](/docs/apikeys/).

## Deploying an MPA

An MPA (multi-page app) is the default: a site with a page per route, such as Astro Starlight, Docusaurus, VitePress, or a Next.js export. It needs no extra options. Deploying happens from the [CLI](/docs/cli/), so it fits into any CI pipeline, with a command or a config file.

### With a command

Build your site, then deploy the folder:

```bash
npm run build
futrou statico deploy --include ./dist
```

The first run creates the website and names it after the current folder (or pass a name). Later runs send only what changed, and do nothing when nothing did. The command prints where the site is live.

`./dist` puts the files of the folder at the root of the website. Add `--dry-run` to see what would change first.

### With futrou.yml

Keep the website next to your code. `futrou deploy` runs the install command once, the build command every time, and uploads the result:

```yaml
# futrou.yml
workspace: acme
project: website
installCommand: npm ci          # once per device
buildCommand: npx astro build   # before every deploy

statico:
  docs:
    include:
      ./dist: true
      ./dist/**/*.map: false
```

```bash
futrou deploy
```

In CI, use `futrou deploy -y` with a `FUTROU_API_TOKEN` secret.

## Deploying an SPA

An SPA (single page app) answers every route with `index.html` and lets the browser router take over, as React, Vue, or Svelte apps built by Vite do. It needs two extra options: the fallback file and its status.

```bash
futrou statico deploy --include ./dist --fallback-file /index.html --fallback-status 200
```

Or in `futrou.yml`:

```yaml
statico:
  app:
    include:
      ./dist: true
    fallbackFile: /index.html
    fallbackStatus: 200
```

The fallback is looked up per folder, so an app with a folder per language gets its own `index.html` for each.

## Choosing the files

An include is a file, a folder, or a glob (`*`, `**`, `{a,b}`), relative to where you run the command or absolute. Includes run **in order**, so you can include a folder and then leave parts out:

| Option | Means |
| --- | --- |
| `--include ./dist` | The files of `./dist`, at the root. |
| `--include ./dist:docs` | The same files, under `docs/`. |
| `--include ./robots.txt:seo/robots.txt` | One file, moved. |
| `--exclude './dist/**/*.map'` | Leave out source maps. |

Hidden files and folders (such as `.env` and `.git`) and `.map` files are never uploaded when found in a folder or by a glob, so a secret can't go up by accident. Name one on purpose to include it, like `--include ./dist/.well-known`. Your config file is never uploaded either.

## Redirects

Put a `_redirects` file at the root of your site, with one rule per line:

```text
/old-page   /new-page   301
/blog/*     /news/:splat
```

The status defaults to `302`, `:name` matches one path segment, and `*` matches the rest (used as `:splat`). The first matching rule wins.

## How files are served

For each request Statico looks for the exact file, then the folder's `index.html`, then the nearest `404.html` (looked up from the requested folder upward, so multi-language sites work). Only `GET` and `HEAD` are accepted.

| Files | `Cache-Control` |
| --- | --- |
| Pages (`.html` and paths without an extension) | `no-cache` |
| Assets (code, images, fonts, audio, video, documents) | `public, max-age=31536000, immutable` |
| Everything else | `public, max-age=0, must-revalidate` |

Give assets hashed file names (most build tools do) so a new deploy gets new URLs.

## Custom domains

Every website works on its `statico-xxx.futrou.cloud` address. For your own domain, create an [HTTP proxy](/docs/proxy/#http) in the same project with the website as its target. See [Proxy](/docs/proxy/).

## Limits

The size of a website, the number of files, and the other limits are on the [Limits](/docs/limits/#statico) page.

## Templates

Ready-to-use projects with a `futrou.yml` are in the templates repository:

[https://github.com/futrou/futrou-templates](https://github.com/futrou/futrou-templates)