Skip to content

Commit 5dda1ae

Browse files
committed
Merge #271: Evaluate Caddy for HTTPS Termination
5026ea9 docs: [#270] deploy caddy to production and update structure (Jose Celano) 299cccd docs: [#270] add caddy security scan and workflow update notes (Jose Celano) e44754f docs: [#270] document tracker's built-in healthcheck (Jose Celano) eb66f6c feat: [#270] add healthcheck to caddy container (Jose Celano) cd0dfa7 docs: [#270] document caddy log warnings and their meaning (Jose Celano) ab8b2e3 docs: [#270] document caddy configuration patterns (Jose Celano) 0a1f1e8 refactor: [#270] fix caddyfile formatting (Jose Celano) b9e4aea docs: [#270] add caddy tls proxy evaluation results (Jose Celano) Pull request description: ## Summary Evaluation of Caddy v2.10 as TLS termination proxy for Torrust Tracker deployments. **Status**: ✅ Evaluation Complete - Recommend Adoption Closes #270 ## Key Results - ✅ **WebSocket support works perfectly** (Pingoo's critical failure point) - ✅ **Automatic Let's Encrypt certificates** (~3-4 seconds for 3 domains) - ✅ **Simple configuration** (21 lines vs nginx+certbot complexity) - ✅ **All HTTPS endpoints verified**: - Tracker API: `/api/health_check` → HTTP/2 200 - HTTP Tracker: `/announce` and `/health_check` → HTTP/2 200 - Grafana UI: redirect to login → HTTP/2 302 - ✅ **Production-ready** with automatic certificate renewal - ✅ **Built-in HTTP/3 (QUIC)** support ## WebSocket Test (Critical) ```text URL: wss://grafana.torrust-tracker.com/api/live/ws Status: 101 Switching Protocols Result: ✅ Dashboard live updates working perfectly ``` This was the critical failure point for Pingoo (#234). ## Documentation - **Experiment Report**: `docs/research/caddy-tls-proxy-evaluation/experiment-full-stack.md` - **Conclusion**: `docs/research/caddy-tls-proxy-evaluation/conclusion.md` - **Configuration Files**: `docs/research/caddy-tls-proxy-evaluation/experiment-files/` (secrets redacted) ## Recommendation **ADOPT CADDY** as the TLS termination proxy for Torrust Tracker deployments. **Rationale**: - Solves the critical WebSocket issue that blocked Pingoo - Dramatically simpler than nginx+certbot approach - Production-ready with automatic certificate management - Better protocol support (HTTP/3/QUIC built-in) - Lower operational overhead ## Next Steps 1. Create ADR documenting Caddy adoption decision 2. Update deployer templates with Caddy configuration 3. Migrate production deployments to Caddy 4. Document Caddy configuration in user guide ## Draft Status This PR is marked as draft to allow for additional improvements while colleagues review the evaluation results. ACKs for top commit: josecelano: ACK 5026ea9 Tree-SHA512: 1d77b7b784df3a8137810ddaa8ea27194be556285e0e9e064e50a1a779cc632da6b9aa6b441deb4b9161a52e2f1dc9f39bd515818b9671ad0e33bb5918352480
2 parents 1099381 + 5026ea9 commit 5dda1ae

13 files changed

Lines changed: 1315 additions & 1 deletion

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ data/
6767
# Generated environment config files for E2E tests
6868
envs/
6969

70+
# Experimental deployments with live secrets
71+
experiments/
72+
7073
# Meson build directory
7174
builddir/
7275

docs/issues/270-evaluate-caddy-for-https-termination.md

Lines changed: 50 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,55 @@ docs/research/caddy-tls-proxy-evaluation/
518518

519519
---
520520

521+
## Evaluation Results
522+
523+
**Status**: ✅ **COMPLETE** (January 13, 2026)
524+
525+
**Recommendation**: ✅ **ADOPT CADDY** as TLS termination proxy
526+
527+
### Key Findings
528+
529+
-**WebSocket support works perfectly** (Pingoo's critical failure point)
530+
-**Automatic Let's Encrypt certificates** (~3-4 seconds for 3 domains)
531+
-**Simple configuration** (21 lines vs nginx+certbot complexity)
532+
-**All HTTPS endpoints working**:
533+
- Tracker API: `/api/health_check` → HTTP/2 200
534+
- HTTP Tracker: `/announce` and `/health_check` → HTTP/2 200
535+
- Grafana UI: redirect to login → HTTP/2 302
536+
-**Production-ready** with automatic certificate renewal
537+
-**Built-in HTTP/3 (QUIC)** support
538+
539+
### WebSocket Test Results (Critical Success Criterion)
540+
541+
```text
542+
URL: wss://grafana.torrust-tracker.com/api/live/ws
543+
Method: GET
544+
Status: 101 Switching Protocols
545+
Server: Caddy
546+
547+
Response Headers:
548+
Connection: Upgrade
549+
Upgrade: websocket
550+
Sec-WebSocket-Accept: RVq4NYes7ZCMvnSWhc+pya0WUBk=
551+
552+
Result: ✅ Dashboard live updates working perfectly
553+
```
554+
555+
### Documentation
556+
557+
- **Experiment Report**: [`docs/research/caddy-tls-proxy-evaluation/experiment-full-stack.md`](../research/caddy-tls-proxy-evaluation/experiment-full-stack.md)
558+
- **Evaluation Conclusion**: [`docs/research/caddy-tls-proxy-evaluation/conclusion.md`](../research/caddy-tls-proxy-evaluation/conclusion.md)
559+
560+
### Next Steps
561+
562+
1. Create ADR documenting Caddy adoption decision
563+
2. Update deployer Tera templates with Caddy configuration
564+
3. Add Caddy to project template (docker-compose.yml, Caddyfile)
565+
4. Document Caddy configuration in user guide
566+
5. Migrate production deployments to Caddy
567+
568+
---
569+
521570
**Created**: 2026-01-13
522571
**Last Updated**: 2026-01-13
523-
**Status**: Planning
572+
**Status**: ✅ Complete - Recommend Adoption
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# Caddy TLS Proxy Evaluation
2+
3+
**Issue**: [#270](https://github.com/torrust/torrust-tracker-deployer/issues/270)
4+
**Date**: January 13, 2026
5+
**Status**: ✅ **COMPLETE - RECOMMEND ADOPTION**
6+
7+
## Overview
8+
9+
This evaluation tested Caddy v2.10 as a TLS termination proxy for the Torrust Tracker stack. The primary success criterion was WebSocket support, which was the critical failure point for Pingoo (issue #234).
10+
11+
**Result**: ✅ Caddy successfully passes all tests, including WebSocket support.
12+
13+
## Documentation
14+
15+
- **[Experiment Report](./experiment-full-stack.md)** - Complete deployment procedure, test results, and technical details
16+
- **[Security Scan](./security-scan.md)** - Docker security scan results for `caddy:2.10`
17+
- **[Production Deployment](./production-deployment.md)** - Production configuration at `/opt/torrust/` (reference for Tera templates)
18+
- **[Conclusion](./conclusion.md)** - Evaluation summary, comparison with alternatives, and recommendation
19+
- **[Configuration Files](./experiment-files/)** - All configuration files used in the experiment (secrets redacted)
20+
21+
## Quick Summary
22+
23+
### ✅ Successes
24+
25+
1. **WebSocket Support** - Works perfectly (Pingoo failed this)
26+
2. **Automatic HTTPS** - Let's Encrypt certificates in ~3-4 seconds
27+
3. **Simple Configuration** - 21 lines (Caddyfile) vs complex nginx+certbot
28+
4. **All Endpoints Working** - Tracker API, HTTP Tracker, Grafana
29+
5. **Built-in HTTP/3** - QUIC support out of the box
30+
6. **Automatic Renewal** - Zero operational overhead
31+
32+
### WebSocket Test (Critical)
33+
34+
```text
35+
URL: wss://grafana.torrust-tracker.com/api/live/ws
36+
Status: 101 Switching Protocols
37+
Result: ✅ Dashboard live updates working perfectly
38+
```
39+
40+
### Recommendation
41+
42+
**✅ ADOPT CADDY** as the TLS termination proxy for Torrust Tracker deployments.
43+
44+
## Next Steps
45+
46+
1. Create ADR documenting adoption decision
47+
2. Update deployer templates with Caddy configuration
48+
3. Document in user guide
49+
4. Migrate production deployments
50+
51+
## References
52+
53+
- [Caddy Official Website](https://caddyserver.com/)
54+
- [Caddy Documentation](https://caddyserver.com/docs/)
55+
- [Issue #270](https://github.com/torrust/torrust-tracker-deployer/issues/270)
56+
- [Pingoo Evaluation](../pingoo-tls-proxy-evaluation/) (not adopted)

0 commit comments

Comments
 (0)