# Quickstart

Deploy a static site in two minutes.

> [!NOTE]
> **Preview** — This works today, but the surface may still change.

This walkthrough deploys a static site — any framework's build output, or a
directory of plain HTML. It assumes the [CLI is installed](/start/installation.md)
and you are signed in.

> [!NOTE]
> **Early access**
>
> Pilvia App is in early access. An account is a token we send you, not a
> sign-up form: [Sign in](/start/installation.md#sign-in) says how to ask for
> one.

## 1. Build your site

Use whatever you already use:

```sh
bun run build     # astro build, vite build, next build with output: "export", …
```

The result is a directory of files — `dist/`, `build/`, `out/`. That
directory is what gets deployed. The framework is your business, not ours;
[Frameworks](/frameworks/overview.md) has the details for the common ones.

## 2. Describe the app

Create `pilvia.app.json` in the project root:

```json
{
  "name": "my-site",
  "auth": "public",
  "assets": "dist"
}
```

Each line is worth a pause:

- `"name"` becomes the hostname, `<name>.pilvia.app`, and names are unique
  across the platform, so a name like `my-site` is likely taken. Pick your
  own, or leave `name` out and the platform mints one (see the tip below).
- `"auth": "public"` is an explicit choice. The platform default is
  `required` — an app with no `auth` key is served only to signed-in users
  of your organization. Nothing goes public by accident, including a
  half-finished customer site. Sign-in needs an organisation, which an
  early-access account does not include: see
  [Authentication](/auth/overview.md).
- `"assets"` points at the build output. A release of assets with no server
  code is a complete site — the host serves it and no isolate ever runs.

## 3. Deploy

```sh
pilvia app deploy
```

The first deploy creates the app; every later one updates it. The CLI hashes
your files, asks the server which of them it has never seen, uploads only
those, and activates the release — an unchanged redeploy moves zero bytes,
and a typical edit moves a few files. Your site is live at:

```
https://my-site.pilvia.app
```

TLS is already on. Every response carries an honest cache policy you can
read in the headers — see [Caching](/hosting/caching.md).

## 4. Iterate

- Ship a fix: `bun run build && pilvia app deploy` — seconds, differential.
- Take it back: `pilvia app rollback my-site` returns to the previous
  release.
- See what's running: `pilvia app list` shows each app's active release and
  the git commit it was built from.

- Share a draft: `pilvia app deploy --branch` gives the branch you are on
  its own URL and leaves production alone. Every deploy also prints an
  immutable build URL. See [Preview URLs](/hosting/previews.md).

> [!TIP]
> **No name yet?**
>
> Leave `name` out of `pilvia.app.json` and deploy: the platform mints a
> readable one (`crimson-paper-7f2`), creates the app, and writes the name into
> your config so the next deploy updates it.

## Where next

- A form handler with zero client JavaScript: [Server functions](/hosting/server-functions.md)
- Astro with on-demand rendering: [the Astro adapter](/hosting/astro.md)
- Your customer's real domain: [Custom domains](/hosting/custom-domains.md)
