Caddy: Modern Web Server with Automatic TLS & Reverse Proxy
Production-grade web server and reverse proxy written in Go with automatic TLS certificate provisioning via Let's Encrypt / ZeroSSL, native HTTP/3, and clean declarative configuration.
Hardware Pre-Flight Check
Verify your system meets runtime requirements before setup
Local Hardware Compatibility Checker
Instantly verify if frontier models run on your local PC or laptop.
Streamlined view with essential inputs, clear verdicts, and zero cognitive overload.
Your setup (12 GB VRAM + 32 GB RAM) will load all 48 layers of Qwen 2.5 Coder 14B (Q4_K_M) into GPU VRAM. You will experience optimal autoregressive generation without bottlenecks.
Advanced Quantization, Sequence Length & Custom Memory Controls▼
Outstanding coding speed on RTX 4070 (12GB)
KV-Cache memory scales linearly with prompt length and concurrent generation tokens.
1-Click Ollama Run Command
3-Tier Audience Playbook
Actionable guidance tailored to your technical workflow
Run 'caddy reverse-proxy --from example.com --to localhost:3000'. Caddy automatically generates trusted HTTPS certs and routes requests in seconds.
Write a declarative Caddyfile to handle multiple subdomains, static file serving, gzip/zstd compression, and security headers.
Use Caddy's dynamic JSON API to reconfigure routing rules at runtime with zero downtime, compile custom Go modules using xcaddy, and enable on-demand TLS.
What is Caddy?
Caddy is an open-source, enterprise-ready web server and reverse proxy written in Go. Its hallmark innovation is Automatic HTTPS: Caddy manages the complete certificate lifecycle (issuance, verification, renewal, OCSP stapling, and revocation checking) automatically via Let’s Encrypt and ZeroSSL without requiring external tools like Certbot or cron jobs.
It serves static files at blistering speeds, proxies dynamic applications over HTTP/1.1, HTTP/2, and HTTP/3, and features an expressive configuration format (Caddyfile) alongside a dynamic runtime REST API.
Core Architectural Strengths
- Automatic TLS Management: Zero-maintenance HTTPS by default. Certificates are renewed automatically before expiry.
- HTTP/3 (QUIC) Native: Out-of-the-box support for the fastest modern transport protocols with 0-RTT handshakes.
- Human-Readable Caddyfile: Clean, intuitive syntax replacing hundreds of lines of cryptic Nginx directives.
- Zero-Downtime Hot Reloads: Update routing rules via CLI (
caddy reload) or direct JSON API without dropping a single active client connection. - Single Static Binary: Self-contained executable with zero dynamic dependencies, making deployment effortless.
Instant One-Liner Recipes
1. Reverse Proxy with Free HTTPS
caddy reverse-proxy --from api.yourdomain.com --to localhost:8000
2. High-Performance Static File Server with Browsing
caddy file-server --browse --listen :8080
Production Caddyfile Example
Create a file named Caddyfile in your project root:
# Global settings
{
email [email protected]
}
# Production Reverse Proxy with Modern Security
api.yourdomain.com {
# Automatic compression
encode gzip zstd
# Security headers
header {
Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
X-Content-Type-Options "nosniff"
X-Frame-Options "DENY"
Referrer-Policy "strict-origin-when-cross-origin"
}
# Upstream backend proxy with health checks
reverse_proxy localhost:8000 {
header_up Host {host}
header_up X-Real-IP {remote_host}
}
}Objective Alternatives & Tradeoffs Matrix
Head-to-head comparison without vendor bias or dismissal
You want zero-hassle HTTPS that never expires, HTTP/3 out-of-the-box, and human-readable configuration files.
You have decades of legacy Nginx Lua scripts, complex proprietary rewrites, or rigid organizational policies.
You want a lightweight, versatile server for single-node VMs, Docker Compose stacks, or static assets.
You are running large dynamic Kubernetes clusters where routing is defined exclusively through CRDs.
Common Production Pitfalls & Gotchas
Battle-tested solutions for frequent setup errors and bottlenecks
Comments are powered by GitHub Discussions and will appear here once connected.