# 0009 — Releases come from `releases.steid.dev`, not from an instance

**Status:** accepted · **Date:** 2026-09-20

## Context

Since 0.4.0 Steid has been downloaded from Steid: `jpgill.dev` is the author's own
instance, and Caddy serves the release tarballs and `install.sh` as static files ahead
of the application (`deploy/Caddyfile`). That was deliberate and it made a point — the
project distributes itself from the product.

Three things have since changed what that costs.

- **Installs are now headless and other people's.** The control plane provisions a
  machine per tenant and cloud-init runs `install.sh` unattended
  ([steid-control-plane ADR 0002](../../../steid-control-plane/decisions/0002-machine-per-tenant.md)).
  Every provision therefore depends on one hand-run VPS being up. A download that 404s
  in the middle of cloud-init surfaces as an instance that never came up, with the
  cause three systems away.
- **The box has two unrelated jobs**, and the one that is somebody's live website is
  the one that gets restarted, upgraded and rolled back. `deploy.sh` snapshots and
  rolls back the *application*; the artefacts sitting beside it are collateral.
- **The estate for the alternative already exists.** The Steid Cloud account holds a
  private, versioned bucket `steid-releases` behind a CloudFront distribution at
  `releases.steid.dev` with origin access control, laid out exactly as `install.sh`
  expects ([steid-control-plane ADR 0004](../../../steid-control-plane/decisions/0004-releases-from-s3.md)).

Meanwhile every link published between 0.4.0 and now points at `jpgill.dev`, and there
is no redirect to be had: the path is served by that box's Caddy.

## Decision

**`install.sh` defaults `RELEASE_BASE_URL` to `https://releases.steid.dev` — S3 behind
CloudFront — and `deploy.sh --publish` writes both that host and the existing
`jpgill.dev` path, which becomes a mirror.** The URL layout under the base is unchanged
(`/v<version>/steid-<version>-<target>.tar.gz` and `.sha256`), so the two hosts differ
only in their base and old links keep resolving against the mirror.

The mirror is temporary. It goes when the control plane's milestone 2 moves the
author's instance onto the managed fleet and `jpgill.dev` stops being a hand-run box.

The publish credential is **a named AWS profile** (`--profile ${STEID_AWS_PROFILE:-steid}`),
never a value. This repository is public: no key, no account id, no role ARN.

## Alternatives considered

- **Keep serving from `jpgill.dev`.** Free, and it is the demonstration. Rejected
  because the demonstration has been made, and repeating it on every headless install
  puts one person's VPS in the critical path of someone else's provision.
- **Move, and drop the mirror.** One host, no divergence to reason about. Rejected on
  the published links: they cannot be redirected without keeping the box, which is what
  keeping the mirror already does, and dropping them silently breaks an install someone
  copied into a runbook.
- **GitHub Releases.** What everyone does, free, and with a CDN. Rejected on the
  project's terms: Steid exists because code hosting does not have to live there, and
  making the installer depend on it is the concession the project is about. The
  CloudFront bill for a few tarballs is small enough not to be the deciding argument.
- **A "latest" pointer to install from.** Would mean `install.sh` needs no version
  default. Rejected as a separate decision: a mutable pointer on a 24-hour cache is a
  version nobody can name afterwards, and a pinned default makes the upgrade path
  explicit.
- **Publishing from CI.** There is no CI, and it would need a credential in the public
  repository's secrets rather than on the laptop. Push-to-release is milestone 8+.

## Consequences

- **A headless install no longer depends on a Steid instance being up.** That was the
  point, and it is the prerequisite the control plane's provisioning gap was blocked on.
- **A publish now touches two hosts and can half-succeed.** `deploy.sh --publish` does
  the releases host first and the mirror second, and verifies each over HTTPS; a mirror
  failure leaves a published release, which is the right way round.
- **Publishing needs the AWS CLI and the `steid` profile**, so it is the author's
  machine only. `--no-mirror` and `--publish-s3-only` keep the two halves separable, and
  `--publish-s3-only` is what cuts a release without going near the live site.
- **CloudFront caches for up to 24 hours**, so anything published at a path that already
  existed must be invalidated. `deploy.sh` invalidates `/install.sh` and `/v<version>/*`
  and *waits* for it, because otherwise its own verification can pass against the
  previous publish.
- **The distribution id is looked up by alias**, not written down — an id in a public
  repository is a fact about one estate that rots, and a stale one means a publish that
  reports success while the host serves the old script.
- **Reversing is one line** in `install.sh` plus dropping the S3 half of the publish;
  the mirror is what makes that true, and it stops being true when the mirror goes.
- **`.sha256` files, not signatures.** A checksum served from the same host as the
  artefact proves transport, not provenance. Signing is still unaddressed and is now
  more visible, because the host is no longer something the author controls end to end.
