Follow us
Breaking
Web Hosting

Automated HTTPS and the Caddy alternative

Caddy manages over 50 million certificates using automated On-Demand TLS and a built-in PKI suite. This web server offers simplified configuration via Caddyfile and provides high availability features like OCSP stapling without enterprise paywalls.

Share

Automation and scale

Caddy manages certificates for hundreds of thousands of sites and thousands of instances reliably, while other web servers and scripted certificate tools fall over when they attempt to manage certificates at that scale. Its On-Demand TLS feature obtains, renews, and maintains certificates during TLS handshakes to support customer-owned domains. This automation extends to localhost and internal IPs because Caddy uses a fully-automated, self-managed CA. Most local trust stores install this CA automatically. You can configure multiple Caddy instances with the same storage to coordinate certificate management and share resources like keys and OCSP staples.

Caddy was the first server to fully automate public certificate management, and it has managed more than 50 million certificates. It lets you define as many CAs as you need, generating both root and intermediate keys automatically. Intermediates renew before they expire. You can deploy an instance to act as an ACME server so other Caddy instances use it for their certificates. Caddy is an industry leader in certificate automation and sports a fully-featured PKI suite for your own fully-automated internal PKI and private CAs. This PKI suite is powered by open source Smallstep libraries. Caddy can manage your internal PKI across a fleet of servers and clients.

The configuration advantage

The Caddyfile uses fewer lines than Nginx, often requiring only 15-25% the size of a less-capable nginx config. You can also use Caddy’s config adapters to configure the server with YAML, TOML, CUE, NGINX, HCL, Dhall, or a MySQL database. Caddy’s native configuration format uses a JSON document that you can manipulate through a RESTful config API. This API provides ACID guarantees and safe scoping to prevent accidental changes to other parts of the config. Caddy’s TLS defaults pass PCI, HIPAA, and NIST compliance requirements. Caddy also performs session ticket key rotation, which no other popular server software implements. I prefer the simplicity of a Caddyfile for production-ready sites; you likely want to get a site up in just a few lines.

You might wonder if the modular architecture slows down deployment. Caddy’s plugins compile into the static binary, which ensures successful deployments and fast runtimes. Writing Caddy plugins is easy for any Go programmer. Caddy’s file server supports Range requests and Etags, unlike many ad-hoc file servers meant for temporary local development. If a directory lacks an index file, Caddy shows a file browser with breadcrumb navigation, file size visualizations, filetype icons, and a grid view. You can serve static sites from the local file system, remote cloud storage, a database, or even embed them in the server binary.

Feature Caddy Specification
Managed Certificates 50+ million
PHP Performance 4x faster than Swoole or RoadRunner
Caddyfile Size 15-25% of nginx config
Config Format JSON (Native), YAML, TOML, CUE, NGINX, HCL, Dhall, MySQL
Supported Protocols HTTP, HTTPS, WebSockets, gRPC, FastCGI

Advanced workloads and maintenance

Caddy handles PHP applications through FrankenPHP, which delivers pages 4x faster than Swoole or RoadRunner. This setup embeds the PHP interpreter within the Caddy binary, so you do not need to install php-fpm or separate PHP installs. The proxying capability supports HTTP, HTTPS, WebSockets, gRPC, and FastCGI. Caddy manages load balancing, active and passive health checks, dynamic upstreams, and retries. Caddy provides all these high availability features for free, without enterprise-level paywalls. Caddy can compress files on-the-fly or serve precompressed files for extra performance. It also supports Zstandard encoding.

Caddy’s TLS stack keeps sites online through problems when other servers won’t, and it provides stability when others fail. It automatically staples and caches OCSP responses to weather outages, which protected Caddy sites during a 2018 OCSP infrastructure outage. It also automatically renewed certificates that got revoked during a 2020 mass revocation event. Caddy’s TLS stack has stronger memory safety guarantees than the OpenSSL used by Apache and Nginx. Caddy also serves every site on HTTPS by default. Caddy relies on sponsorships to survive, and the project could stop being developed at any time without them.

Share

Technewsdaily

Senior tech writer covering AI, gadgets and cybersecurity. Breaking down the news that matters, every day.