proxy profile puts Caddy in front of the app: it gets a certificate for TB_PUBLIC_HOST from a public certificate authority (Let’s Encrypt by default) and passes traffic on to the app.
Set up TLS
1
Point a DNS name at the server
Create an A record for the server name (an explicit record wins over a wildcard record in the zone). Open ports 80 and 443. If the domain has CAA records, one of them must allow
letsencrypt.org.2
Set the values in .env
172.29.88.10 is the value of TB_PROXY_IP (the default address of the Caddy container).3
Start with the profile
docker compose up -d, add the line COMPOSE_PROFILES=proxy to .env.Why these values
TB_HTTP_PORT=127.0.0.1:8080: Docker publishes ports around the server firewall (ufwrules do not stop them), and the app port must not be reachable from outside next to Caddy.- Only the Caddy address in
TB_TRUSTED_PROXIES: the subnet also contains the Docker gateway, so a client that reaches the app port directly could forgeX-Forwarded-Forand get around the per-address sign-in limit. Never the whole subnet, never/0. - Without a proxy leave
TB_TRUSTED_PROXIESempty. - Caddy passes the Host header on unchanged, so the name check for
/mcpseesTB_PUBLIC_HOST.
Your own proxy instead of Caddy
Behind your own proxy put that proxy’s address inTB_TRUSTED_PROXIES. The Host header must arrive unchanged, because the name check for /mcp reads TB_PUBLIC_HOST. This way has not been checked live.
Check
- HTTP returns 308 to the
httpsaddress. - The response has
strict-transport-security: max-age=31536000; includeSubDomainsand the headervia: 1.1 Caddy. - The certificate issuer is Let’s Encrypt. The production certificate was issued on 2026-11-17, so a renewal (which Caddy does by itself) has not been observed.
Limits
- Caddy has to reach the certificate authority (Let’s Encrypt) to get and renew a certificate. Without internet Caddy cannot get a certificate: put your own proxy with your own certificate in front of the app (this way has not been checked live, see above), and for the rest see Running offline.
- Old server names can be redirected to
TB_PUBLIC_HOST: every*.caddyfile indeploy/redirects/is imported. The release shipsdeploy/redirects/kbrew.caddy, the redirect of the old name of the Akia installation: delete it or replace it with your own name, otherwise Caddy also asks for a certificate for a name that is not yours.