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:
- Boots an embedded PostgreSQL on port
54330 - Auto-creates the
botfatherdatabase - Runs migrations
- 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
| Port | Purpose |
|---|---|
8400 | Tower API + admin dashboard |
54330 | Embedded PostgreSQL (when no external DB is configured) |
5174 | UI 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
- Enroll an Instance — connect your first SLAW instance
- Enforcement Modes — enforce vs advisory
- Retention — data retention windows