Skip to main content
Operator

Self-Hosting

Botfather is the self-hosted control tower for your SLAW fleet. Your organisation deploys it once; every SLAW instance reports to it. This page covers getting the tower running.

Zero-config first run

Botfather boots with no external dependencies. On first start it:

  1. Boots an embedded PostgreSQL on port 54330
  2. Auto-creates the botfather database
  3. Runs migrations
  4. Listens on port 8400 (the API and admin dashboard)

In development, the UI runs on port 5174 and proxies /api to :8400.

pnpm install
pnpm dev

Open the dashboard and you'll land on the Fleet view — empty until you enroll your first instance.

External PostgreSQL

For production, point Botfather at your own PostgreSQL instead of the embedded one:

BOTFATHER_DATABASE_URL=postgres://user:pass@host:5432/botfather pnpm start

When BOTFATHER_DATABASE_URL is set, the embedded Postgres is not started. Run migrations against your database before first boot.

Ports at a glance

PortPurpose
8400Tower API + admin dashboard
54330Embedded PostgreSQL (when no external DB is configured)
5174UI dev server (proxies /api:8400)

Background jobs

Once running, the tower runs several background jobs:

  • A status sweeper that marks instances offline or stale
  • Hourly rollups for cost analytics
  • An alert evaluator for budget, offline, and spend-spike alerts
  • A daily retention job (see Retention)

Next steps