byrgi

Configuration

scripts/setup-env.sh (run by scripts/start.sh) writes deploy/.env, which git ignores and is created with mode 600. It only fills empty or change-me secrets, so re-running it never changes existing credentials. You can also fill it by hand from deploy/.env.example; Compose refuses to start while a required secret is empty.

Running on a server

The dashboard accepts sign-in only from BYRGI_WEB_PUBLIC_URL, so tell the scripts the address people will use:

bash
scripts/start.sh --host 203.0.113.5        # plain HTTP: dashboard on :3000, gateway on :4000
scripts/start.sh --domain cp.example.com   # optional: HTTPS with Caddy + Let's Encrypt

HTTPS is optional. --domain adds a Caddy container that serves the dashboard at https://<domain>, the gateway at /v1 and the API at /api/v1, and keeps LiteLLM's admin routes internal. It needs the domain's DNS pointing at the server and ports 80 and 443 open, so it can't run on a machine that is also a node (Traefik uses those ports). If you already run a reverse proxy, skip --domain, point it at ports 3000, 4000 and 8080, and set the public URLs to its addresses. Open port 8443 for remote nodes either way.

First admin

On its first start the dashboard creates the admin BYRGI_ADMIN_EMAIL with BYRGI_DASHBOARD_PASSWORD (generated, at least 12 characters). This only happens while no users exist, so changing those values later has no effect. After signing in, change the password and turn on two-step verification on the Account page.

KeyUsed for
BYRGI_DASHBOARD_PASSWORDPassword of the first dashboard admin (BYRGI_ADMIN_EMAIL, default admin@byrgi.local)
BETTER_AUTH_SECRETSigns dashboard sessions and OAuth tokens for MCP clients
BYRGI_ADMIN_TOKENCLI and REST API (Authorization: Bearer)
BYRGI_MASTER_KEY, LITELLM_SALT_KEYEncrypt stored secrets. Never change them after the first start.
POSTGRES_PASSWORD, LITELLM_MASTER_KEYInternal
BYRGI_AGENT_PUBLIC_URL, BYRGI_AGENT_HOSTSAddress nodes use to reach the control plane
BYRGI_WEB_PUBLIC_URL, BYRGI_GATEWAY_PUBLIC_URLAddresses users and API clients use (set by --host / --domain)
BYRGI_DOMAIN, COMPOSE_PROFILES=proxyOptional HTTPS proxy (set by --domain)
BYRGI_BIND_ADDRESSInterface for ports 3000, 4000 and 8080 (default 0.0.0.0; 127.0.0.1 behind your own HTTPS proxy)
BYRGI_MCP_CATALOG_URLOverride the MCP catalog URL, or off to disable it

Ports

PortService
8080REST API
3000Dashboard
4000Gateway (/v1)
8443Node endpoint (mTLS gRPC)
80, 443Optional HTTPS proxy (--domain)

Backups

Back up deploy/.env with the Docker volumes (byrgi_pgdata, and byrgi_serverdata, which holds the node CA). Stored secrets can't be decrypted without the keys in .env.

Starting over

Postgres keeps the password it was created with, so delete the data before regenerating credentials:

bash
docker compose -f deploy/compose.yaml --env-file deploy/.env down -v
rm deploy/.env