Skip to content

Server Configuration & Operations Reference ​

Last updated

Complete reference for Chirp server environment variables, reverse-proxy rules, health probes, differences between the public prebuilt Compose and source-build Compose files, and persistent volume migration. Getting Started · Admin Console · Upgrades & Backups

Environment Variables ​

The root compose.yaml reads .env in the same directory (recommended host: Debian 13 linux/amd64). Apply .env updates with sudo docker compose up -d --wait. Public Compose · Config Loader Source

VariableDefault (Public Compose)Purpose & Constraints
COMPOSE_PROFILESemptySet https to launch bundled SWAG Nginx + Certbot; leave empty for external Nginx or local dev.
CHIRP_DOMAINemptyBare hostname for bundled Certbot certificate issuance (no https://).
CHIRP_ACME_EMAILemptyContact email for Let's Encrypt expiry notices.
CHIRP_ACME_METHODhttpCertificate challenge method: http (HTTP-01) or dns (DNS-01).
CHIRP_DNS_PLUGINcloudflareCertbot DNS plugin name (cloudflare, aliyun, etc.), matching secrets/swag/dns-conf/<plugin>.ini.
CHIRP_NGINX_HTTP_BIND0.0.0.0:80Host bind for Nginx HTTP (set 127.0.0.1:8080 in DNS-01 mode). HTTPS always binds 443/TCP.
CHIRP_IMAGEdocker.io/youzifeile/chirp-server:latestPin to a specific tag or @sha256:... digest in production.
CHIRP_PUBLIC_ORIGINhttp://localhost:18115Full client/browser origin (optional port). Controls WebAuthn RP ID, discovery, and WSS links. Must be https:// in production (http:// allowed only for localhost).
CHIRP_RTC_NODE_IPemptyPublic IPv4 reachable on 7882/UDP for LiveKit media. Forward port 7882/UDP identically if behind NAT.
CHIRP_HTTP_PUBLISH_IP127.0.0.1Host interface exposing 18115/TCP and 7880/TCP (set private/VPN IP for remote reverse proxies).
CHIRP_LOG_LEVELinfoLog verbosity: debug, info, warn, or error.
CHIRP_LOG_SERVER_ENABLEDfalseWhen true, streams JSON logs asynchronously to VictoriaLogs and disables local daily log files.
CHIRP_LOG_SERVER_URLemptyBase HTTP(S) endpoint for VictoriaLogs (no query string, auth, or fragment).
CHIRP_TOKEN_TTL5mShort-lived LiveKit room JWT lifetime (1s to 15m).
CHIRP_GROUP_ROTATION60sScheduled E2EE room key rotation period (30s to 30m).
CHIRP_AUTHORIZATION_KEY_FILE/usr/share/chirp/authorization-key.defaultAuthorization snapshot signing seed path. Prebuilt image embeds the open-source default seed; mount your own key for private trust control. Signing Keys

Public Compose vs. Source-Build Compose ​

Two Compose definitions exist in the repository—keep them distinct:

AspectRoot compose.yaml (Recommended Production)deploy/compose.yaml (Source Builds & Legacy)
Image sourcePulls Docker Hub image youzifeile/chirp-serverBuilds deploy/Dockerfile app target locally
HTTPS ingressBuilt-in https profile launches SWAG NginxNo Nginx included—requires external proxy
StorageNamed Docker volumes (data, logs, media-keys)Host bind mounts (./data, ./log, ./authorization-data)
Signing keyDefaults to bundled open-source seed (overridable)Requires ./secrets/authorization-key mount
LiveKit keysapp auto-generates keys.json on first bootManual LIVEKIT_API_SECRET (≥ 32 chars) + deploy/livekit.yaml

Reference files in the repo: deploy/compose.yaml · deploy/.env.example · deploy/livekit.yaml.example.

Reverse Proxy Paths & Port Boundaries ​

Apply these exact routing rules whether using bundled SWAG or your own Nginx:

Path / PortBackend TargetProxy & Security Requirements
/rtc and /rtc/*livekit:7880/TCPPreserve full path and query string, pass Upgrade / Connection WebSocket headers, set long timeout (3600s).
/authorization/v5/*app:18115/TCPPreserve raw path, enforce rate limit (e.g., 10r/s) and small body cap (64k), disable caching.
/twirp/*, /internal/*Return 404 at proxyInternal LiveKit admin RPC—never expose publicly.
All other HTTP (/register, /admin/, /v1/, etc.)app:18115/TCPForward Host, X-Forwarded-Proto, X-Real-IP, and disable buffering (proxy_buffering off) so SSE streams instantly.
Encrypted voice mediaDirect to media host 7882/UDPBypasses Nginx completely. TURN, media TCP fallback, and public IP probing remain disabled.

Persistent Network Config for External Nginx Containers ​

If an existing Nginx container lives in a separate Compose project, docker network connect does not survive container recreation. Declare Chirp's default network as external inside your Nginx compose.yaml: Docker Compose Networking

yaml
services:
  nginx:
    networks: [default, chirp_backend]

networks:
  chirp_backend:
    external: true
    name: chirp_default

Apply with docker compose up -d nginx, then target app:18115 and livekit:7880. Remember to run nginx -t && nginx -s reload whenever Chirp containers recreate so Nginx picks up updated container IPs.

Certificate Maintenance, Switching & Diagnostics ​

  • Bundled certificates (SWAG): LinuxServer SWAG Docs
    sh
    sudo docker compose logs --tail=100 nginx
    sudo docker compose exec nginx certbot certificates --config-dir /config/etc/letsencrypt
  • Migrating between bundled & external Nginx:
    • Bundled → External: Keep domain and volumes untouched; run sudo docker compose --profile https stop nginx, remove COMPOSE_PROFILES=https from .env, then configure Existing Nginx.
    • External → Bundled: Free 443/TCP (and 80/TCP for HTTP-01), enable the https profile, verify certs and voice before stopping the old renewal timer.
  • Health probes & log collection:
    sh
    sudo docker compose ps
    sudo docker compose exec app /usr/local/bin/chirp version
    curl -fsS http://127.0.0.1:18115/livez
    curl -fsS http://127.0.0.1:18115/healthz
    curl -fsS -o /dev/null -w '%{http_code}\n' http://127.0.0.1:18115/authorization/healthz
    sudo docker compose logs --tail=100 livekit
    sudo docker compose cp app:/app/log/. ./chirp-logs
    /livez (200) checks liveness; /healthz (200) verifies both SQLite WAL databases (chirp.db + authorization.db); /authorization/healthz (204) checks the authorization DB independently. Router Source

Persistent Volume Layout & Migration ​

Compose Volume (project chirp)Container PathStored State
chirp_data/datachirp.db, authorization.db, WAL/SHM files, attachments/ ciphertext cache.
chirp_media-keys/var/lib/chirp-mediaShared keys.json (written by app, read-only on livekit).
chirp_logs/app/logDaily rolling server JSON Lines logs (retains today + prior 6 days).

Migrating from deploy/compose.yaml to root compose.yaml:

  1. Stop the old stack and back up all bind directories.
  2. Populate the pre-created chirp_data volume root with chirp.db, attachments/, and authorization.db (plus -wal/-shm) from both old bind directories.
  3. Verify 65532:65532 ownership, mount your matching signing seed if custom, and preserve CHIRP_PUBLIC_ORIGIN (Passkeys remain bound to that exact domain).

Ephemeral Dev / Clean-Slate Stacks ​

Chirp opens only an empty database or schema 23 exactly. To test bootstrap or schema creation cleanly without touching production volumes, stop conflicting port listeners and start a separate project name:

sh
sudo docker compose -p chirp-dev up -d --wait