Diese Seite ist noch nicht auf Deutsch verfügbar, daher zeigen wir die englische Version.

Caddyfile Generator — Reverse Proxy & Static Sites with Caddy

Caddy gets HTTPS certificates automatically — you only describe your site. Choose a reverse proxy (with optional load balancing), a static site, an SPA or PHP, tick redirects, compression, security headers, caching and basic auth, and copy a clean, commented Caddyfile.

Aktualisiert am
Caddyfile

Save as /etc/caddy/Caddyfile, check it with caddy validate --config /etc/caddy/Caddyfile and apply with sudo systemctl reload caddy.

Deine Daten verlassen nie deinen Computer. Die Verarbeitung erfolgt zu 100 % lokal im Browser.

So nutzt du: Caddyfile Generator

  1. Pick the scenario: reverse proxy to an app (list several upstreams to load-balance), a static site, an SPA or PHP.
  2. Enter your domain and how www should be handled; add an email so Let’s Encrypt can reach you about certificates.
  3. Tick compression, security headers, caching, logging, health checks or basic auth.
  4. Save it as /etc/caddy/Caddyfile, run caddy validate and reload Caddy.

Why the Caddyfile is so short

Caddy turns on HTTPS automatically for any site address that is a real domain: it gets and renews the certificate and redirects HTTP to HTTPS on its own. WebSockets and HTTP/2/3 also work out of the box, so a whole reverse proxy can be three lines:

example.com {
    reverse_proxy localhost:3000
}

What the options add

OptionDirective
Load balancingreverse_proxy with several upstreams, lb_policy and optional active health checks
SPAtry_files {path} /index.html so client-side routes work on reload
Compressionencode zstd gzip
Security headersA header block with X-Content-Type-Options, Referrer-Policy, X-Frame-Options and removing Server
Basic authbasic_auth with a bcrypt hash on the path you choose

Related: Nginx Config Generator, Apache VirtualHost Generator, Docker Compose Generator.

Auch gesucht als: caddy reverse proxy, caddyfile example, caddy config generator, caddy load balancer, caddy spa config, caddy php config, caddy basic auth.

Passende Tools zu: Caddyfile Generator

  • Bcrypt Generator & Checker — Create bcrypt hashes for test users, seed data or config files, and check whether a password matches a stored hash — without sending either anywhere.
  • systemd Service Generator — Run your app as a proper Linux service that starts on boot and restarts when it crashes.
  • SSL Checker — Verify an HTTPS certificate in seconds — see when it expires, who issued it, which hostnames it covers and whether the chain is trusted.
  • YAML Validator — Paste a Docker Compose file, Kubernetes manifest, GitHub Actions workflow or any YAML to pinpoint errors, catch common pitfalls and get a cleanly formatted version.

Häufige Fragen

Does Caddy really set up HTTPS automatically?
Yes. When the site address is a public domain that points to your server and ports 80 and 443 are open, Caddy gets a certificate from Let’s Encrypt or ZeroSSL and renews it on its own.
How do I reverse proxy to several servers?
List the upstreams separated by spaces. Caddy balances requests between them; tick Health checks so it stops sending traffic to an upstream that is down.
How do I protect a page with a password?
Tick Basic auth, enter a username and a bcrypt hash of the password (from caddy hash-password), and the path to protect.
How do I serve a React or Vue app?
Choose SPA: Caddy serves the files and sends unknown paths to index.html, so client-side routing works when you reload a page.
Kann ich Caddyfile Generator als Web-App installieren und offline nutzen?
Ja. Caddyfile Generator ist eine installierbare Web-App (PWA) – sie wird über Ihren Browser installiert und nicht aus einem App-Store heruntergeladen. Klicken Sie oben auf dieser Seite in Chrome oder Edge (Windows, macOS, Linux, ChromeOS) auf „App installieren“ oder verwenden Sie auf Android-Geräten „Teilen“ → „Zum Startbildschirm hinzufügen“ auf dem iPhone und iPad bzw. „Datei“ → „Zum Dock hinzufügen“ in Safari 17+ auf einem Mac. Die App öffnet sich dann in einem eigenen Fenster mit einem eigenen Symbol, und da sie vollständig in Ihrem Browser ausgeführt wird, funktioniert sie auch offline. Firefox auf dem Desktop kann keine Web-Apps installieren. So funktioniert die Installation.

Ähnliche Tools