Skip to content
BurnerByte

self-hosting

Monitoring

Prometheus metrics, health endpoints, and logging.

Health Endpoints

EndpointDescription
GET /healthzLiveness — always returns 200 if the process is running
GET /readyzReadiness — pings PostgreSQL and Redis (2s timeout) and reports each individually as {"postgres":"ok","redis":"ok","status":"ok"}; 503 with a detail naming every failed dependency
GET /metricsPrometheus exposition — loopback and private IPs only

Prometheus Metrics

Enable in config:

yaml
metrics:  enabled: true  path: /metrics

Scrape config:

yaml
scrape_configs:  - job_name: burnerbyte    static_configs:      - targets: ['localhost:8080']    metrics_path: /metrics

Logging

BurnerByte uses Go's slog structured logger. Every HTTP request is logged with method, path, status, duration, request ID, and remote address.

bash
LOG_LEVEL=info    # debug, info, warn, errorLOG_FORMAT=json   # json or text

JSON format is recommended for production (parseable by Loki, ELK, Datadog).

Admin Dashboard

System admins can view aggregate stats on the /admin page: total users, teams, domains, emails, total/active inboxes, sessions, lifetime inboxes created, storage used, webhooks and API keys. Also available via GET /api/v1/admin/stats (system admin only). The admin_stats worker refreshes the cached payload every 10 seconds and streams it over /api/v1/ws/admin-stats.

GET /api/v1/admin/health (system admin only) reports per-dependency status and latency for postgres, redis, and storage (the last only when S3/MinIO is the active backend), plus process uptime.

Version

Both binaries carry a version stamped in at build time. It appears in the sidebar badge, in Settings → System, in the smtpd startup log, and at:

text
GET /api/v1/admin/version     # system admin only

make docker-up and make build derive it from git describe --tags --always --dirty, so a release build reports its tag and a working build reports the tag plus commit. A plain docker compose up -d, or an image built with no --build-arg VERSION=..., reports dev — the build context excludes .git, so the value has to be passed in:

bash
docker compose build --build-arg VERSION=v1.16.1