Kestrel
Docs · v4.8

Quickstart

This walkthrough takes a hostname from zero to cached traffic. You need a domain you control and an origin that answers on HTTPS.

1. Install the CLI

curl -fsSL https://dl.kestrel.dev/install.sh | sh
kestrel version
# kestrel 4.8.2 (linux/amd64)

2. Authenticate

Create a scoped token in the console, then export it for the shell session:

export KESTREL_TOKEN="ks_live_..."
kestrel whoami
Tokens are scoped per environment. A production token cannot read staging manifests, and vice versa.

3. Describe the hostname

cat > kestrel.yaml <<'YAML'
version: 4
environments:
  production:
    hosts:
      - hostname: api.example.com
        origin: origin.example.net:443
        tls: managed
        routes:
          - match: { path_prefix: /v1/ }
            cache: { ttl: 60, vary: [accept-encoding] }
            forward: { host_header: origin.example.net }
YAML

4. Push and verify

kestrel manifest push ./kestrel.yaml --env production
kestrel host status api.example.com
FieldMeaning
tls: managedKestrel issues and renews the certificate. Point the DNS record at the edge first.
ttlSeconds. 0 disables caching for the route.
varyAdditional request headers folded into the cache key.

5. Check the headers

curl -sS -o /dev/null -D - https://api.example.com/v1/ping
# x-kestrel-cache: MISS
# x-kestrel-pop: fra1

Run it twice; the second response should report HIT. If it still says MISS, the origin is sending cache-control: no-store or the route has no cache block.