Skip to content

Self-Hosting from Scratch ​

Last updated

Deploy Chirp on a single Linux server with Docker Compose to bring up both core coordination and real-time media forwarding: the Go server (app) handles Passkey authentication, member approvals, authorization logs, and room coordination, while LiveKit (livekit) relays encrypted audio packets. Every client connects through one HTTPS domain.

Network Topology at a Glance ​

Control APIs, Passkey login, and WebSocket signaling flow over 443/TCP (HTTPS / WSS) behind your reverse proxy, while end-to-end encrypted audio packets stream directly over 7882/UDP to LiveKit without traversing Nginx.

Service Network & Component Topology
Clients & BrowsersBrowserRegister · Passkey · AdminNative ClientsmacOS · iOS · AndroidWindows · Local MLSE2EE BoundaryVoice / Chat / FilesBundled SWAG / NginxTLS Termination443/TCP HTTPS & WSS80/TCP (HTTP-01 opt.)Block /twirp & /internalRate-limit /authorizationBackend Services & StorageChirp Go (app :18115/TCP)Passkey · /admin/ · /v1/ API · SSEAuth /authorization/v5/ · Group HubEncrypted Attachments · AdmissionsLiveKit SFU (:7880/TCP)WSS Signaling (/rtc) · 7882/UDP MediaTURN, TCP fallback & ext IP disabledchirp_datachirp.db · auth.db · filesmedia-keys & logskeys.json · 7d logs443/TCPHTTPS/WSSexcept /rtc/rtc/*RPC7882/UDP direct media (bypasses Nginx, E2EE encrypted frames)
Bundled Nginx route: Compose runs app, livekit, and nginx (SWAG), automatically issuing and renewing TLS certificates via Certbot. Ports 18115 and 7880 communicate internally.

Step 1: Choose an HTTPS Ingress Strategy ​

Chirp supports three deployment layouts. Keep your own proxy if Nginx and valid TLS certificates already run on the box, or let Compose spin up SWAG (Nginx + Certbot) to manage Let's Encrypt certificates automatically.

Use Existing Nginx & Certificates

Your domain already has a working HTTPS virtual host managed by your existing Nginx.

Inbound Ports 443/TCP to existing Nginx, 7882/UDP to the Chirp media host. Renewal remains unchanged.

.env
CHIRP_PUBLIC_ORIGIN=https://voice.example.com
CHIRP_RTC_NODE_IP=203.0.113.10
Open "Use Existing Nginx & Certificates" Setup Guide
Bundled Nginx · HTTP-01

Your domain points directly to this server and public port 80/TCP is available.

Inbound Ports 80/TCP for ACME issuance/renewal, 443/TCP for HTTPS, 7882/UDP for voice media.

.env
COMPOSE_PROFILES=https
CHIRP_DOMAIN=voice.example.com
CHIRP_PUBLIC_ORIGIN=https://${CHIRP_DOMAIN}
CHIRP_RTC_NODE_IP=203.0.113.10
[email protected]
CHIRP_ACME_METHOD=http
Open "Bundled Nginx · HTTP-01" Setup Guide
Bundled Nginx · DNS-01

Your DNS provider supports API TXT updates (ideal when port 80 cannot be exposed).

Inbound Ports Public 443/TCP and 7882/UDP only. DNS plugin credentials stay on the server.

.env
COMPOSE_PROFILES=https
CHIRP_DOMAIN=voice.example.com
CHIRP_PUBLIC_ORIGIN=https://${CHIRP_DOMAIN}
CHIRP_RTC_NODE_IP=203.0.113.10
[email protected]
CHIRP_ACME_METHOD=dns
CHIRP_DNS_PLUGIN=cloudflare
CHIRP_NGINX_HTTP_BIND=127.0.0.1:8080
Open "Bundled Nginx · DNS-01" Setup Guide

Step 2: Prepare Host, Domain & Firewall Ports ​

  1. Server host: Provision a Debian 13 (trixie) x86_64 / amd64 server with sudo access (published Docker images target linux/amd64).
  2. Dedicated subdomain & DNS: Assign a dedicated subdomain (e.g., voice.example.com). WebAuthn Passkeys bind strictly to the origin and clients hit fixed root endpoints, so subpath mounting (like /chirp) is not supported.
    • Create an A record pointing to your Nginx proxy's public IPv4 address.
    • If using Cloudflare DNS, set the proxy toggle to DNS only (grey cloud) and remove stale AAAA records pointing elsewhere.
  3. Media public IPv4: Record the public IPv4 of the host running LiveKit for CHIRP_RTC_NODE_IP. On single-host setups this matches your A record; on split setups use the media host's real public IPv4.
  4. Open firewall / security group ports:
    • 443/TCP (required): to Nginx for web pages, APIs, and WebSocket signaling.
    • 80/TCP (HTTP-01 only): to Nginx for ACME verification and HTTP-to-HTTPS redirect.
    • 7882/UDP (required): to LiveKit for E2EE audio packets (forward 7882/UDP verbatim through NAT if behind a router).
    • Keep your administrative SSH port accessible.

Verify DNS resolution from an external Linux machine before launching containers:

sh
getent ahostsv4 voice.example.com | awk '{print $1}' | sort -u

Step 3: Install Docker Engine & Compose ​

Sign in to your Chirp backend host. Skip this step if Docker Engine and Compose 2.26+ are already present (Compose 2.26+ is required for inline Nginx config templates).

On a fresh Debian 13 (amd64) host, install from the official apt repository: Docker Engine on Debian

sh
sudo apt-get update
sudo apt-get install -y ca-certificates curl nano
sudo install -d -m 0755 /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg -o docker-signing-key.asc &&
  sudo install -m 0644 docker-signing-key.asc /etc/apt/keyrings/docker.asc
echo 'deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian trixie stable' |
  sudo tee /etc/apt/sources.list.d/docker.list >/dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
sudo systemctl enable --now docker

Confirm both binaries respond normally:

sh
sudo docker version --format '{{.Server.Version}}'
sudo docker compose version

Step 4: Fetch & Validate the Public Compose File ​

Create ~/chirp and download the root compose.yaml (pulls prebuilt Docker Hub images and embeds SWAG rules). For existing instances, use the upgrade workflow instead. Public Compose · Upgrades & Backups

sh
mkdir -p ~/chirp
cd ~/chirp
curl -fL https://raw.githubusercontent.com/YouZiFeiLe/Chirp/main/compose.yaml -o compose.yaml &&
  sudo docker compose -f compose.yaml config --quiet

Once syntax checks pass, scroll back up to Choose an HTTPS Ingress Strategy, complete .env for your selected route, start the containers, and finish Verification & First Admin.