Visual Caddy server config builder: reverse proxy, static sites, auto HTTPS, redirects
Zero Dependencies · Works Offline📋 Site Configuration
Basic Settings
HTTPS & Security
Logs & Caching
What is a Caddyfile Generator?
The Caddyfile Generator is a free online tool for the Caddy web server. It lets you visually build a Caddyfile configuration for reverse proxies, static sites, auto-HTTPS certificates, HTTP redirects, compression, and logging. With Caddy's built-in Auto HTTPS, this local tool makes your server configuration simple and safe. Everything runs entirely in your browser.
Core Features
- Reverse Proxy: configure the key reverse_proxy directive with a backend address and header settings.
- Static Site: configure the site root and file_server to deploy static sites quickly.
- Auto HTTPS: Caddy automatically obtains Let's Encrypt certificates, so no manual certificate configuration is needed.
- HTTP Redirect: automatically redirect all HTTP requests to HTTPS.
- Compression and Logging: enable gzip encoding and access log configuration.
How to Use
1. Enter a domain and select the site type (Reverse Proxy, Static Site, or Redirect).
2. Set the backend address or site root and other parameters.
3. Configure HTTPS, compression, logging, and other options.
4. Click "Generate Caddyfile", then copy or download the configuration file.
5. Place the Caddyfile in your Caddy config directory and run caddy run to start.
Use Cases
Scenario 1: Deploy a reverse proxy quickly
If you need to route a domain to a local service (such as a Node.js or Python app), use this tool to generate the reverse proxy configuration.
Scenario 2: Host a static site
For frontend static sites, configure Caddy to serve files with Auto HTTPS, which is simpler than an Nginx setup.
Scenario 3: Migrate a domain
When you move a domain, generate a redirect config to send traffic from the old domain to the new one, preserving SEO equity.
Technical Background
Caddy is a web server written in Go. Its main advantage is Auto HTTPS, which provisions certificates automatically via the ACME protocol and Let's Encrypt. The Caddyfile is concise: each site block starts with a domain, followed by directives such as reverse_proxy (reverse proxy), root (site root), file_server (file serving), encode (compression), redir (redirect), and log (logging). Caddy v2 also supports JSON configuration and an API, making it well suited to containerized deployments. Compared to Nginx, Caddy has simpler configuration but slightly lower performance, ideal for small and medium projects and development environments.
❓ FAQ
What is a Caddyfile?
A Caddyfile is the Caddy web server configuration file using concise declarative syntax to define site behavior like reverse proxy, static file serving, and HTTPS certificate management.
How does Caddy auto-HTTPS work?
Caddy automatically obtains and renews TLS certificates via Let's Encrypt. Just use a domain name in Caddyfile and Caddy handles certificate provisioning and renewal.
Can I use the generated Caddyfile directly?
Yes. The generated Caddyfile follows Caddy syntax conventions. Save and run caddy run to start. Test in staging first.
Is my data safe?
Absolutely safe. All configuration is generated locally in your browser. No data is uploaded.
What's the difference between Caddy and Nginx?
Caddy has auto-HTTPS and simpler config; Nginx has higher performance and a more mature ecosystem. Caddy suits small/medium projects; Nginx excels at high concurrency.
How to configure multiple sites?
Define multiple site blocks in Caddyfile, each starting with a domain name.
Does Caddy support WebSocket?
Yes. The reverse_proxy directive automatically handles WebSocket connection upgrades without extra configuration.