~/blog/hoster-0-1-0

hoster 0.1.0

· 2 min read · LHelge

hoster 0.1.0 is the first release. It covers everything the design calls for in v1: a GitHub Actions release workflow pushes an image, and a minute later the new version serves traffic on its hostname with a valid certificate, without dropping a request.

curl -fsSL https://github.com/LHelge/hoster/releases/latest/download/install.sh | sudo bash

Installing hoster walks through the rest of the setup: the GitHub OAuth App, hoster.toml and hoster doctor.

What’s in it

  • One binary under systemd. A statically linked Rust binary, for x86_64 and aarch64, runs as a systemd user service of a dedicated hoster user. The reverse proxy, ACME client, deploy engine, webhook receiver, registry poller and admin UI are all part of it.
  • An embedded proxy. Pingora terminates TLS on :443 and routes by host and path prefix. Routes can strip prefixes and set their own timeouts, and responses stream through.
  • Certificates. HTTP-01 issuance and renewal through Let’s Encrypt, with persisted backoff so failures never use up the rate limit, and a DNS check before each attempt.
  • Deploys by digest, without downtime. A new container starts next to the old one and must pass its health probes. The route then swaps atomically and the old container drains. A deploy that crashes halfway is recovered on restart.
  • Deploys from CI without a secret. The deploy webhook accepts the job’s GitHub OIDC token and checks it against each stack’s [deploy] rule. A registry poller is the fallback for images that track a tag.
  • Stacks. A TOML stack file declares services, routes, env vars, encrypted secrets and named volumes. Each stack runs on its own podman network.
  • An admin UI with GitHub login. Apply and diff stack files, deploy, roll back, cancel, follow container logs live, manage secrets and registry credentials, and watch certificate status and live traffic statistics.
  • Housekeeping. Reconciliation at startup and on a timer, image garbage collection that keeps a rollback image per service, and hoster backup for a consistent database snapshot (see Backing up and restoring).
  • Self-update. hoster update and hoster rollback, or the System page, fetch a release, verify its checksum, switch to it and roll back automatically if it fails to start.