Run it locally
You need Node.js 24, pnpm and Docker (for PostgreSQL).openssl rand -hex 32 (for BETTER_AUTH_SECRET) and openssl rand -base64 32 (for
VAULT_KEY). Then open http://localhost:3000, create an account, an organization and a workspace, then a
teammate.
Without Docker
Two scripts run everything on an embedded PostgreSQL, with a sample workspace to sign in to:setup.sh writes apps/api/.env with fresh secrets for you. Sign in as ada@example.com with the password
correct-horse-battery to explore the sample workspace. Its secrets are placeholders and no computer is linked, so
a message to one of its teammates does not run. scripts/preview/start-built.sh does the same with production
builds, lighter but without reload as you edit. Details are in
AGENTS.md.
Link a computer to your own API
A teammate’s threads run on a computer linked by the runner. A runner talks to one API, so point it at yours with--api. In the dashboard, open Computers and choose Link your machine (or Link this Mac) to get a
one-time code. Then, in a shell where claude (or codex) is signed in:
--api, the runner uses http://localhost:3001. On a deployed instance, the command the dashboard shows
already installs the runner from your API and passes --api with your API’s address. A computer linked to
brigade.lol is not linked to your instance: accounts, workspaces and computers belong to one API. More options are
in docs/development.md.
Deploy it
Brigade deploys two ways from one codebase. Both are described in docs/deployment-plan.md.One server with Docker Compose
deploy/vps holds a Dockerfile for three images (api,
web, collab) and a Compose file to run them.
- Build the images with
docker buildx bake -f deploy/vps/docker-bake.hcl. The defaults are Brigade’s own: ARM (linux/arm64), theghcr.io/gmpetrovregistry, and Brigade’s API address built into the dashboard. Set your own, for example--set web.args.NEXT_PUBLIC_API_URL=https://api.example.com. - Edit
compose.yml: it expects a Traefik proxy on an externalcoolifynetwork, with Brigade’s own host names in its labels. Replace them with yours, or put your own proxy in front. - Bring PostgreSQL: the Compose file has no database. Any PostgreSQL works, such as a Neon project or your own container.
- Put your settings in
api.envandcollab.envnext tocompose.yml. - Migrate and start:
deploy.shshows the steps (pull,prisma migrate deploy,docker compose up).
Brigade’s team ran this setup from October 14 to October 20, 2026, and now runs on Cloudflare. The
files stay in the repository to build the images by hand: treat them as a starting point, not a
turnkey installer.
Cloudflare Workers
This is how brigade.lol runs: the API, the dashboard and live document editing are Workers, with Durable Objects for the WebSockets, R2 for files and Neon for PostgreSQL.- Sign in with
wrangler login. - Point the configuration at your own domains and resources. These files name Brigade’s:
scripts/deploy/workers.sh:API_URL. The dashboard is built against it and the collab Worker deployed with it, so leaving it as is sends your dashboard’s sign-ins and work to brigade.lol.apps/api/wrangler.front.jsonc(its routes andWEB_URL),apps/web/wrangler.jsoncandapps/collab/wrangler.jsonc: their routes.apps/api/wrangler.jsonc: the Hyperdriveid. Make your own withwrangler hyperdrive create <name> --connection-string=<your PostgreSQL> --caching-disabled.
- Create the API’s queues:
wrangler queues create brigade-jobsandwrangler queues create brigade-jobs-dlq. - Create an R2 bucket and set its CORS rules from
scripts/deploy/r2-cors.json, with your dashboard’s origin in place of Brigade’s. - Set each Worker’s secrets in its own package, for example:
The API’s secrets are the settings below. The collab Worker needs
COLLAB_SECRET(at least 32 characters), the same value as the API’s, or it refuses every request. - Build and deploy each Worker with
pnpm run cf:build:<worker>andpnpm run cf:deploy:<worker>(api,api-front,web,collab). The API’s deploy migrates the database first, so it needsDATABASE_URLset.
Settings you must set and keep
The API reads its settings from environment variables. The full list, with a comment on each, is in apps/api/.env.example.
Optional settings turn on more:
- Google sign-in, Gmail and Google Calendar: a Google OAuth client (
GOOGLE_CLIENT_ID,GOOGLE_CLIENT_SECRET). Without it, people sign in with a code sent by email. - GitHub: a GitHub App of your own (
GITHUB_APP_*), for GitHub as an App and code work on your repositories. - Live document editing:
COLLAB_SECRET, the same on the API and the collab server. Without it, documents are edited without live sync. - Push notifications: a key pair from
pnpm --filter @brigade/api vapid. Keep it once set: a new pair unsubscribes every device.
Features that need another account
For email, set
RESEND_API_KEY with full access, verify your MAIL_DOMAIN in Resend for sending and receiving, and
point a Resend webhook at {API_URL}/events/resend with its secret in RESEND_WEBHOOK_SECRET. For cloud computers,
set BOAT_API_KEY.