Skip to content

/compare/caddy/caddy-vs-nginx

Caddy vs nginx: HTTPS, configuration and performance compared

The commands on this page have not been executed by our verification runner yet.updated 2026-10-20
tool
Caddy
compares
Caddy vs nginx

Caddy obtains and renews TLS certificates by itself and redirects HTTP to HTTPS by default, so a reverse proxy for one site is three lines. nginx does not manage certificates (you add certbot or another ACME client), but it has a larger ecosystem, more tuning options and more existing documentation. Pick Caddy for simple sites and small teams; pick nginx when you need its modules, fine-grained control, or the tooling around it.

The same reverse proxy

Caddyfile
example.com {
	reverse_proxy localhost:3000
}
nginx.conf (plus certbot for the certificate)
server {
    listen 80;
    server_name example.com;
    return 301 https://$host$request_uri;
}
server {
    listen 443 ssl;
    http2 on;
    server_name example.com;
    ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Caddy's reverse_proxy sets the X-Forwarded-* headers itself.

Criterion by criterion

CriterionCaddynginx
HTTPS certificatesautomatic (ACME), including renewalexternal ACME client such as certbot
HTTP to HTTPS redirectautomatica server block with return 301
ConfigurationCaddyfile or JSON, with a live admin APInginx.conf, reload with nginx -s reload
HTTP/3enabled by defaultneeds ngx_http_v3_module and listen … quic
ExtendingGo plugins compiled in with xcaddyC modules, njs, or OpenResty (Lua)
Written inGo (memory-safe)C
Ecosystem and examplessmallervery large

For most sites, either server's throughput is far higher than the application behind it; choose by operations and features, not benchmarks.

Sources