Skip to content

Bundled Nginx with HTTP-01 Certificates ​

Last updated

If your DNS A record points straight at this server and 80/TCP is open to the public internet, this is the simplest automated setup: Compose launches SWAG (Nginx + Certbot) alongside Chirp to issue and renew Let's Encrypt TLS certificates automatically.

Port Requirements

Requires 80/TCP (ACME HTTP-01 challenges & HTTP→HTTPS redirect), 443/TCP (APIs, Passkeys, and signaling), and 7882/UDP (encrypted audio media). If another service already occupies port 80 or 443, follow Using Existing Nginx & Certificates instead.

Complete Host, Domain & Docker Setup before proceeding. How Let's Encrypt HTTP-01 works

Step 1: Write .env ​

Prepare the secrets directory and restricted .env file on the server:

sh
cd ~/chirp
sudo install -d -m 0700 secrets
touch .env && chmod 600 .env
nano .env

Replace the domain, ACME email, and public media IPv4 (CHIRP_DOMAIN takes the bare hostname without https://; keep ${CHIRP_DOMAIN} intact inside CHIRP_PUBLIC_ORIGIN):

dotenv
COMPOSE_PROFILES=https
CHIRP_DOMAIN=voice.example.com
CHIRP_PUBLIC_ORIGIN=https://${CHIRP_DOMAIN}
CHIRP_RTC_NODE_IP=203.0.113.10
CHIRP_ACME_EMAIL=[email protected]
CHIRP_ACME_METHOD=http

Step 2: Launch Services & Issue Certificate ​

Inspect the enabled service list and start the full stack with --wait:

sh
sudo docker compose config --services
sudo docker compose up -d --wait --wait-timeout 600
sudo docker compose ps

With COMPOSE_PROFILES=https, config --services outputs app, livekit, and nginx. First boot takes 1–3 minutes to pull images and finish HTTP-01 issuance. Once ready, all three services show healthy (bundled Nginx verifies /healthz over port 443 using your hostname and trusted cert).

If startup times out or nginx reports unhealthy

Inspect sudo docker compose logs --tail=100 nginx for Certbot output. Typical causes include unpropagated DNS, blocked 80/TCP in cloud security groups, or port conflicts on 80/443. Troubleshooting

Where Certificates Live ​

Issued chains, private keys, ACME account credentials, and renewal config persist in secrets/swag/. Back up secrets/swag/ alongside Docker volumes before upgrades or migrations. Verification & First Admin · Upgrades & Backups