Convert your SSL certificate to a production-ready Caddy Caddyfile configuration.
This tool converts your SSL certificate (PEM format or PFX/PKCS12) into a production-ready Caddy Caddyfile configuration. It follows the Mozilla Server Side TLS guidelines — the same standards used by SSL Labs to grade servers.
Caddy has built-in automatic HTTPS via Let's Encrypt. However, when using custom certificates, you need manual TLS configuration. The generated config includes tls block, protocols, ciphers, OCSP stapling, HSTS, and HTTP to HTTPS redirect.
tls directive with cert and key paths for custom certificates.caddy reloadcaddy validate/etc/caddy/ with restrictive permissions.tls
Path to the fullchain certificate and private key files. Use absolute paths or relative to Caddyfile.
protocols
Specifies allowed TLS versions. Modern: tls1.3. Intermediate: tls1.2 tls1.3.
ciphers
Comma-separated list of allowed cipher suites for handshake.
ocsp_stapling / strict_sni
Enables OCSP stapling and strict SNI matching for enhanced security.
Caddy requires two files: the fullchain certificate (tls cert.pem) and the private key (tls key.pem). Download these files from this tool.
Add tls /path/to/cert.pem /path/to/key.pem to your site block. Caddy will use these instead of automatic Let's Encrypt certificates.
Run caddy validate to check the config, then caddy reload to apply changes without downtime.