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 21, 2026.

View as Markdown

Static site from Astro, Vite or HTML served over HTTPS with caching: the poster pinned up, ready to read

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

What your agent writes

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

while.yaml
apiVersion: while/v1
project: my-app
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 site is served without a container: while keeps its files, nothing sleeps, and it reserves neither CPU nor memory. Its traffic is included, up to 1 TB per month per organization. A version holds at most 20,000 files and 2 GiB, a single file 100 MiB; versions are kept for 14 days, and at least the last 10. A site deployed before this service joins it at its next deployment. To track visitors’ JavaScript errors, SENTRY_DSN_PUBLIC is set during the build. Copy it in the build script under the prefix the bundler exposes to the browser (PUBLIC_ for Astro, VITE_ for Vite, NEXT_PUBLIC_ for Next.js): “build”: “PUBLIC_SENTRY_DSN=$SENTRY_DSN_PUBLIC astro build”.

Pricing

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

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

Guides

Give your AI the message, and it takes care of the rest

Give this to your AI

Read while.sh/agents and help me get started with while.

Copy the message

In 3 minutes, with no sign-up, the tool has its own address. To keep it, create your account.

For a company project, write to the while team: hello@while.sh