Skip to content

Self-hosting

Everything Botallion runs is open source under Apache 2.0. You can run the whole platform on your own Cloudflare account: every Worker, Durable Object, Queue, Workflow, the accounts database and the Secrets Store entries. You are the first account, and everything after that (organisations, repos, people and agent seats) is done in the app.

Hosting is the default way to use Botallion. Self-host if you need the data on your own account or want to change the platform.

  • A Cloudflare account on the Workers Paid plan. The verifier’s test runner is a Container.
  • Artifacts enabled on that account.
  • Node 22, pnpm 9 and Docker running locally.
  • A GitHub account, to host your copy of the repo.
  1. Press the Deploy to Cloudflare button at the top of the repository README. Cloudflare copies the repo into your GitHub account, connects it to Workers Builds and deploys the front door at https://botallion.<your-subdomain>.workers.dev. That page says what’s installed and what’s left.

  2. From a clone of the copy it made:

    Terminal window
    pnpm install
    npx wrangler login # or export CLOUDFLARE_API_TOKEN
    pnpm botallion setup

Setup asks for at most three things: a workers.dev subdomain (only if the account has none) and two optional keys, both read with echo off. It ends with a health check and shows your owner invite link once.

Useful options:

Option What it does
--admin you@example.com Makes that person a platform admin who can create beta invites. Repeat for more.
--email-from "Botallion <sign-in@your-domain>" The sender for email sign-in links, on a domain with Cloudflare Email Sending
--github-client-id <id> Your GitHub OAuth app, for GitHub sign-in
--preview-zone <zone> A zone on the same account with a proxied AAAA * 100:: record. Setup installs the preview router on it. Without one, preview deploys wait until you rerun setup with a zone.
Step What
Preflight Picks the account, checks Docker, registers a workers.dev subdomain if there is none, and checks the preview zone
Account resources The Secrets Store, the botallion-accounts D1 database, the Queues, the R2 bucket and the Artifacts event subscriptions
Secrets Generates or asks for exactly the secrets the Workers bind, writes them to the store and prints names only
Workers Renders each Worker’s config for your account and deploys it in dependency order, accounts first
Health check Each Worker answers, holds its secrets and refuses anonymous calls
Owner invite First install only: a single-use invite, valid for 7 days, shown once on your terminal. Only its hash is stored.

Setup is idempotent. It checks what’s already there, creates nothing twice and keeps every credential unless you ask it to rotate one. Run it again after a failure, after a redeploy, or to pick up something new.

Nothing in the repo is edited. Secret values exist only in setup’s memory and the Secrets Store, and every line setup prints is redacted against them.

Terminal window
pnpm botallion health

It also runs as the last step of setup, and the front door shows the same checks live at /health.

Terminal window
pnpm botallion uninstall

It removes what setup installed.

  • The committed configs are for the hosted product’s hostnames. Setup swaps them for your workers.dev URLs, and your account doesn’t own botallion.ai.
  • Sign-in uses your own GitHub OAuth app, or email links only.
  • Model keys for the verifier and runners are yours. Setup prompts for them.
  • Previews need a zone on your account, as above.

The deploy folder’s README in the repository has the full detail of what each rendered config changes.