Skip to content

Self-hosting

Every Wayglass project lives on a Worker that someone deploys to their own Cloudflare account. The step-by-step guide is kept with the code, so it changes together with the Worker:

  • docs/SELF-HOSTING.md in the main repository.
  • The “Deploy your own Worker” section of the README covers the same ground in brief.
  • A Cloudflare account on the Workers Paid plan, which Artifacts requires.
  • Artifacts namespaces for the jurisdictions you want to offer (for example one us and one eu). A namespace’s jurisdiction is fixed when it is created.
  • A Queue for Artifacts push events, so pushes to a trunk that skip wayglass land show up in the audit log.
  • Deploying the Worker in worker/ with the pinned npx wrangler, then setting its admin key as a secret and logging in with wayglass login.
  • Optionally, CF_ACCOUNT_ID and CF_EVENTS_API_TOKEN (an API token limited to Account › Queues › Edit), so the Worker can subscribe each new trunk to push events. Without them projects still work, and wayglass init warns that trunk pushes are not watched.
  • Optionally, PUBLIC_PROJECTS in wrangler.jsonc, if you want the web audit view to show any project.

The deployed Worker reaches Artifacts only through its bindings. It holds no Cloudflare API token with access to Artifacts; see the security model.

Artifacts bills per operation and per GB stored beyond the included amount (10,000 operations and 1 GB per month at the time of writing; check Artifacts pricing). Each intent creates one fork repo in Artifacts.