Ein neuer Webserver-Generationsunterschied

Nginx erschien 2004 und löste Apache-Performance-Probleme. Caddy erschien 2015 mit einem anderen Fokus: automatisches TLS, moderne Standards und Einfachheit. Heute konkurrieren beide im Reverse-Proxy- und Webserver-Markt.


Caddy: HTTPS ist Standard, nicht Option

Caddy's herausragendstes Feature ist automatisches HTTPS. Caddy besorgt Let's Encrypt-Zertifikate, erneuert sie automatisch und konfiguriert HTTPS ohne manuellen Eingriff.

Stärken:

  • Automatisches HTTPS: Let's Encrypt-Zertifikate ohne Konfiguration
  • Caddyfile: Einfache, lesbare Konfigurationssprache
  • HTTP/3 out-of-the-box: QUIC-Protokoll ohne Plugins
  • JSON API: Laufzeitkonfiguration via REST API
  • Go-Basis: Statisches Binary, einfaches Deployment
  • Reverse Proxy: Simpel und ohne Overhead konfiguriert

Beispiel Caddyfile:

www.example.com {
    reverse_proxy localhost:3000
}

Das ist alles. HTTPS, HTTP-Redirect, Reverse Proxy – fertig.

Schwächen:

  • Kleineres Ecosystem als Nginx
  • Weniger Konfigurationsoptionen für extreme Fälle
  • Jüngere Software, weniger battle-tested

Nginx: Bewährt und hochperformant

Nginx ist seit zwei Jahrzehnten der Standard für High-Traffic-Websites. Die Konfiguration ist mächtiger, aber komplexer.

Stärken:

  • Performance: Exzellent bei hohem Traffic und statischen Dateien
  • Bewährtheit: Läuft hinter den weltgrößten Websites
  • Ecosystem: Nginx Proxy Manager, OpenResty, etc.
  • Dokumentation: Jahrelange Ressourcen und Tutorials
  • Fein-Tuning: Granulare Kontrolle über jedes Detail

Beispiel nginx.conf (HTTPS mit Let's Encrypt):

server {
    listen 443 ssl;
    server_name www.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://localhost:3000;
    }
}

Mehr Konfiguration – mehr Kontrolle, aber auch mehr Setup.


Direkter Vergleich

Merkmal Caddy Nginx
Automatisches HTTPS ✓ Eingebaut ✗ Certbot nötig
HTTP/3 ✓ Eingebaut Nginx Plus oder Modul
Konfiguration Einfach Komplex
Performance Sehr gut Ausgezeichnet
Ecosystem Kleiner Groß
Lernkurve Flach Mittel

Wann Caddy, wann Nginx?

Caddy wählen wenn:

  • Automatisches HTTPS ohne Overhead gewünscht ist
  • Schnelle Einrichtung wichtig ist
  • HTTP/3-Unterstützung gebraucht wird
  • Konfigurationsaufwand minimiert werden soll

Nginx wählen wenn:

  • Maximale Performance und Kontrolle gefragt sind
  • Großes, bestehendes Nginx-Wissen im Team vorhanden ist
  • Spezifische Performance-Konfigurationen nötig sind

Fazit

Für neue Setups ohne bestehende Infrastruktur ist Caddy oft die schnellere, einfachere Wahl – besonders wenn HTTPS-Automatisierung wichtig ist. Nginx bleibt die Referenz für High-Performance-Szenarien und Teams mit bestehendem Nginx-Wissen. In meinem Stack kombiniere ich: Nginx für hochfrequenten statischen Traffic, Caddy für schnelle interne Services wo HTTPS ohne Aufwand gewünscht ist.