Research and experimentation task to evaluate Caddy as a simpler alternative to nginx+certbot for adding HTTPS termination to deployed Torrust Tracker environments.
Parent Epic: #1 - Roadmap (Item 6: Add HTTPS support)
Predecessor: #234 - Pingoo evaluation (CLOSED - Not Adopted due to lack of WebSocket support)
Overview
This evaluation follows the Pingoo evaluation (#234), which was not adopted because it strips WebSocket Upgrade headers required for Grafana Live functionality.
Why Caddy?
From Caddy's feature documentation:
- ✅ WebSocket support (full duplex, streaming) - Pingoo lacks this
- ✅ Automatic HTTPS with Let's Encrypt (HTTP-01, TLS-ALPN-01, DNS-01)
- ✅ Simple configuration via Caddyfile
- ✅ Zero-downtime reloads via API or CLI
- ✅ Built-in Prometheus metrics at
/metrics
- ✅ Mature (since ~2015), large community
- Written in Go (memory-safe)
Goals
Primary Goals
Test Environment
Server (Hetzner ccx23, Ubuntu 24.04):
- Domain:
torrust-tracker.com (with subdomains: api, http1, grafana)
- IP: 46.224.206.37
Directory Structure:
/opt/torrust/ # Production deployment (no HTTPS yet)
└── docker-compose.yml + storage/
/root/experiments/ # Pingoo experiments (issue #234)
├── experiment-1/ ... experiment-4/
Target Architecture:
- Tracker API:
https://api.torrust-tracker.com → http://tracker:1212
- HTTP Tracker:
https://http1.torrust-tracker.com → http://tracker:7070
- Grafana:
https://grafana.torrust-tracker.com → http://grafana:3000 (WebSocket!)
- UDP Tracker:
udp://udp1.torrust-tracker.com:6969 (no TLS)
Implementation Plan
Phase 1: Environment Preparation (30 min)
Phase 2: Experiment - Full Stack with Caddy (2-3 hours)
Deploy complete production stack with Caddy:
- Caddy service (ports 80, 443)
- Tracker (API + HTTP + UDP)
- Prometheus
- Grafana
Critical Test: Grafana WebSocket connections (must preserve Upgrade header)
Phase 3: Documentation and Decision (1-2 hours)
Acceptance Criteria
Functional:
Documentation:
References
Full specification: docs/issues/evaluate-caddy-for-https-termination.md
Research and experimentation task to evaluate Caddy as a simpler alternative to nginx+certbot for adding HTTPS termination to deployed Torrust Tracker environments.
Parent Epic: #1 - Roadmap (Item 6: Add HTTPS support)
Predecessor: #234 - Pingoo evaluation (CLOSED - Not Adopted due to lack of WebSocket support)
Overview
This evaluation follows the Pingoo evaluation (#234), which was not adopted because it strips WebSocket
Upgradeheaders required for Grafana Live functionality.Why Caddy?
From Caddy's feature documentation:
/metricsGoals
Primary Goals
Test Environment
Server (Hetzner ccx23, Ubuntu 24.04):
torrust-tracker.com(with subdomains: api, http1, grafana)Directory Structure:
Target Architecture:
https://api.torrust-tracker.com→http://tracker:1212https://http1.torrust-tracker.com→http://tracker:7070https://grafana.torrust-tracker.com→http://grafana:3000(WebSocket!)udp://udp1.torrust-tracker.com:6969(no TLS)Implementation Plan
Phase 1: Environment Preparation (30 min)
Phase 2: Experiment - Full Stack with Caddy (2-3 hours)
Deploy complete production stack with Caddy:
Critical Test: Grafana WebSocket connections (must preserve
Upgradeheader)Phase 3: Documentation and Decision (1-2 hours)
docs/research/caddy-tls-proxy-evaluation/Acceptance Criteria
Functional:
Documentation:
References
Full specification:
docs/issues/evaluate-caddy-for-https-termination.md