Skip to content

The open-source AI receptionist for businesses. Answers every call, books the appointment and hands over to a person when needed. You own the code and the data.

3.1 KB
Raw Blame
# Behind Cloudflare's proxy (orange cloud) on top of docker-compose.https.yml:
#   COMPOSE_FILE=docker-compose.yml:docker-compose.https.yml:docker-compose.cloudflare.yml
# - Caddy trusts only Cloudflare's addresses and takes the visitor from CF-Connecting-IP, which Cloudflare sets
#   itself; the API's rate limits and logs see the visitor. A CF-Connecting-IP from anywhere else is ignored.
# - The visitor's country from CF-IPCountry (Cloudflare › Network › IP Geolocation, on by default) goes to the API as
#   X-Linedesk-Country: New workspace is prefilled with it. Only the two-letter code, never stored with an IP. Caddy
#   copies it only from requests that came from Cloudflare's addresses (docker/Caddyfile); still let the origin accept
#   only Cloudflare (the firewall rules in docs/self-hosting.md, or Authenticated Origin Pulls).
# - TLS: Cloudflare's SSL mode "Full (strict)", with a Cloudflare Origin CA certificate for PUBLIC_URL's host in
#   LINEDESK_ORIGIN_CERT_DIR (origin.pem, and origin.key readable by uid 1000, mode 600). It lasts up to 15 years
#   and needs no renewal; Caddy's own certificates (HTTP-01) would stop renewing once only Cloudflare reaches 80/443.
# - Partners' own addresses (white-label S5, Cloudflare for SaaS, docs/hosting.md): with LINEDESK_PARTNER_SITE=on and
#   LINEDESK_SAAS_ORIGIN=saas-origin.<your zone> in .env, Caddy also answers any other Host on 443 with the same routes.
#   Cloudflare connects with the custom origin's name as SNI and checks the certificate against it (Full (strict)), so
#   the Origin CA certificate must cover that name too; Caddy ties the certificate to that SNI. Off by default: only
#   PUBLIC_URL's host. The API decides which names it serves (421 for any other).
# - Authenticated Origin Pulls (optional): LINEDESK_ORIGIN_PULL=on in .env makes Caddy require Cloudflare's client
#   certificate on every TLS connection (LINEDESK_TLS=origin-pull), checked against Cloudflare's CA in
#   LINEDESK_ORIGIN_CERT_DIR/origin-pull-ca.pem. Turn on Authenticated Origin Pulls in Cloudflare first, or the site is down.
# - SIP and call audio do not go through Cloudflare: LIVEKIT_SIP_ENDPOINT must be a DNS-only (grey cloud) name.
# Cloudflare's ranges: https://www.cloudflare.com/ips/ (checked 2026-11-12); update them here when they change.
services:
  proxy:
    environment:
      LINEDESK_TRUSTED_PROXY_RANGES: >-
        173.245.48.0/20 103.21.244.0/22 103.22.200.0/22 103.31.4.0/22 141.101.64.0/18 108.162.192.0/18
        190.93.240.0/20 188.114.96.0/20 197.234.240.0/22 198.41.128.0/17 162.158.0.0/15 104.16.0.0/13
        104.24.0.0/14 172.64.0.0/13 131.0.72.0/22
        2400:cb00::/32 2606:4700::/32 2803:f800::/32 2405:b500::/32 2405:8100::/32 2a06:98c0::/29 2c0f:f248::/32
      LINEDESK_CLIENT_IP_HEADERS: CF-Connecting-IP
      LINEDESK_COUNTRY_HEADER: CF-IPCountry
      LINEDESK_TLS: origin${LINEDESK_ORIGIN_PULL:+-pull}
      LINEDESK_PARTNER_SITE: ${LINEDESK_PARTNER_SITE:-off}
      LINEDESK_SAAS_ORIGIN: ${LINEDESK_SAAS_ORIGIN:-}
    volumes:
      - ${LINEDESK_ORIGIN_CERT_DIR:?set LINEDESK_ORIGIN_CERT_DIR to the directory with origin.pem and origin.key}:/etc/caddy/certs:ro