Caddyfile Generator
Generate Caddyfile with automatic HTTPS (Let's Encrypt), reverse_proxy or file_server. Modern simple Caddy 2 syntax.
—
Caddyfile: HTTPS without configuring a certificate
What sets Caddy apart from nginx and Apache is the certificate: point a real domain at the server and it obtains a Let's Encrypt certificate on its own, installs it and renews it, without a single line of configuration for any of that. The config file shrinks in proportion — what takes twenty lines in nginx, with certificate paths and redirects, becomes a three-line block.
Choose the domain and the mode and the page assembles the Caddyfile. In reverse proxy mode the block forwards to the backend address, with the origin headers passed through by default — another difference from nginx, where each of them must be declared by hand. In static file mode it sets the root and turns on the file server. The compression option adds the matching directive.
Two things to know before shipping. Using localhost as the name makes Caddy generate its own certificate, trusted only on that machine, which is excellent for development; with a real domain it attempts Let's Encrypt validation, and for that ports 80 and 443 must be reachable from outside. And the Caddyfile is formatting-sensitive: the opening brace stays on the same line as the address, and directives are indented inside the block.
Frequently asked questions
Do I need port 80 open even serving only HTTPS?
Where are the certificates kept?
Can I convert my nginx configuration?
Related Tools
.htaccess Generator
Generate Apache .htaccess snippets: force HTTPS, redirect www, expire cache, GZIP compress, block IPs.
JS Minifier (basic)
Minify JavaScript by stripping line/block comments and extra whitespace. Works for simple code without full AST parsing.
JWT Decoder Verbose
Decodes the header and payload of a JWT without verifying the signature, explains each registered claim and turns exp, nbf and iat into readable dates.
HTTP Accept Header Content Negotiation Matcher
Paste a client Accept header and the comma-separated media types a server offers to see which one wins and at what q value. Exact types and */* only.
JavaScript Minifier
Minify JavaScript code by removing whitespace and comments to reduce file size in production.
Content-Disposition Filename Parser
Pulls the download filename out of a Content-Disposition header, preferring the percent-encoded filename* form from RFC 5987 and decoding it for you.