Skip to content

Go to the docs contents

Static sites

A site with no server, made of HTML and JavaScript: while builds it if needed, then serves it over HTTPS, with the right cache for each file and your own headers.

Updated November 9, 2026.

View as Markdown

You, to your agent: Deploy the event’s website.

What your agent writes

Your agent writes it in while.yaml, at the root of your app:

while.yaml
services:
  - name: site
    type: static
    root: dist

When to use it

For a site without a server, made of built HTML and JavaScript.

How it works

while builds the site if package.json has a build script, then serves the root folder: HTML revalidated on every visit, fingerprinted files (/_astro/, /assets/index-a1B2c3D4.js…) kept for a year, everything else for an hour. A .gz file already built next to a file is sent compressed. A _redirects file at the root redirects exact paths (/old /new 301, 50 at most); a _headers file sets headers per path (/* then an indented Content-Security-Policy: …).

What to know

The cache lives in the site’s server: there is no shared edge cache, and no purge. The site goes to sleep without traffic like a web service, according to its sleep setting, and its first visit is then slower.

Pricing

These prices are the same on every plan, excluding VAT:

ResourcePriceDetails
CPU and memory€17 per vCPU·month and €8.50 per GiB·monthapps by usage, caches by reservation

Guides

Connect your agent, it takes care of the rest

To paste into your agent

Read while.sh/agents, then deploy my app with while.

Copy the instructions

No account needed to try: your app is live right away. To keep it, sign in.

A project for your company? Talk to the team: hello@while.sh