Caddyfile Generator
Generate production-ready Caddyfile configs online for free.
Loading tool...
What is Caddyfile Generator?
The Caddyfile Generator creates ready-to-use configuration files for the Caddy web server. Choose between static site hosting, reverse proxying, PHP-FPM, or load balancing, toggle security and performance options, and get a clean, valid Caddyfile you can copy or download instantly.
Key Benefits
- Valid, minimal Caddyfiles without reading documentation
- Automatic HTTPS handled by Caddy β no certbot or manual certificates
- Security headers included in every generated config
- Load balancing policies matching native Caddy syntax
- Works fully offline in your browser β nothing is uploaded
Common Use Cases
- β’Fronting a Node.js, Python, or Go app behind a reverse proxy
- β’Hosting a static site or SPA with HTTPS out of the box
- β’Serving a PHP application through php_fastcgi and PHP-FPM
- β’Distributing traffic across multiple upstream servers with sticky sessions
- β’Adding WebSocket support to an existing proxy setup
How to Use the Caddyfile Generator
- Pick a config type: Choose Static Site, Reverse Proxy, PHP-FPM, or Load Balancer depending on what your server will serve.
- Set your site address: Enter your domain (e.g. example.com) β Caddy will provision TLS automatically. Local addresses like localhost stay plain HTTP.
- Add backends and options: For proxy or load-balancer modes add upstream host:port pairs and pick a policy. Toggle HSTS, gzip, or WebSocket as needed.
- Copy or download the Caddyfile: Place the file at /etc/caddy/Caddyfile and run `systemctl reload caddy` (or `caddy reload`) to apply it.
Key Features
- Four config types: static site, reverse proxy, PHP-FPM, and load balancer
- Automatic HTTPS with smart local-address detection (localhost stays plain HTTP)
- Five load balancing policies including IP hash for sticky sessions
- Optional HSTS, zstd/gzip compression, and WebSocket proxying toggles
- Security headers (nosniff, frame denial, referrer policy) baked into every output
- One-click copy and download as a ready-to-deploy Caddyfile