---
title: "Caddy 2.0: web server with automatic HTTPS"
description: "Caddy 2.0 (May 2020) by Matt Holt: web server written in Go with automatic HTTPS via Let's Encrypt, JSON/Caddyfile configuration, reverse proxy, HTTP/3. Modern alternative to Nginx and Apache."
url: "https://www.noze.it/en/insights/caddy-2-0/"
lang: "en"
alternate: "https://www.noze.it/insights/caddy-2-0/"
published: "2020-06-20"
author: "noze S.r.l."
keywords: "Open Source, Web, Caddy, Go, Matt Holt, Web Server, HTTPS"
---

# Caddy 2.0: web server with automatic HTTPS

Caddy 2.0 (May 2020) by Matt Holt: web server written in Go with automatic HTTPS via Let's Encrypt, JSON/Caddyfile configuration, reverse proxy, HTTP/3. Modern alternative to Nginx and Apache.

20 June 2020

## Automatic HTTPS as default

TLS configuration is historically painful: obtain certificate, configure SSL directives, renew, restart server. Nginx/Apache require external automation (certbot). **Caddy** does something different: HTTPS **automatic by default**, transparent, with renewal.

## The release

**Caddy 1.0** is published in 2015 by **Matt Holt**. **Caddy 2.0** is a **full rewrite** released on **4 May 2020**. Written in **Go**, **Apache 2.0** licence. Single binary \~25 MB, zero dependencies.

```
example.com {
    reverse_proxy localhost:3000
}

api.example.com {
    reverse_proxy localhost:8080
    encode gzip
}
```

These 5 lines do: obtain Let’s Encrypt certificate for `example.com` and `api.example.com`, configure HTTPS with HTTP/2 and HTTP/3, reverse proxy, gzip. Automatic renewal.

## Features

- **Automatic HTTPS** — integrated ACME client (Let’s Encrypt, ZeroSSL)
- **HTTP/3** (QUIC) natively supported
- Fluent **reverse proxy**
- **Load balancing** — round-robin, random, least-conn, IP hash
- **Dynamic config** — JSON API for reconfiguration without reload
- **On-demand TLS** — certificate at first hit for multi-tenant SaaS
- **Modules** — plugin system (auth, metrics, logging, hooks)
- **Structured logging** (JSON, slog)
- **Prometheus metrics**
- **FastCGI** (PHP-FPM, Python uWSGI)

## Configuration formats

- **Caddyfile** — human-friendly DSL (see above)
- **JSON** — native API, more expressive
- **Adapters** — can import from nginx config, Consul, etc.

## Competitors

- **Nginx** — industrial standard, faster under extreme load, verbose configuration, manual HTTPS
- **Apache HTTPD** — veteran, complex mod_ssl
- **Traefik** — similar auto-HTTPS philosophy, container/k8s oriented
- **HAProxy** — pure load balancer, TCP/HTTP
- **OpenResty** — nginx + Lua

## Use cases

- **Edge proxy** for containerised apps
- **Personal servers / homelab**
- **Dev environments** with real HTTPS
- **Multi-tenant SaaS** with on-demand TLS
- **Nginx replacement** for teams valuing DX

## In the Italian context

Caddy is used in:

- Italian **web agencies** for simple SSL hosting
- **Homelab** and self-hosting enthusiasts
- **Startups** wanting to avoid nginx configurations
- **Edge gateway** in front of Node/Python/Go apps
- **Multi-tenant hosting** (Italian B2B SaaS)

Often chosen as **reverse proxy** in front of Node.js or Python apps instead of Nginx.

Update — 2024

Version evolution: **2.4** (HTTP/3 stable, March 2021), **2.5** (SNI improvements, April 2022), **2.6** (Go 1.18, September 2022), **2.7** (improved logging, June 2023), **2.8** (built-in Caddy metrics Prometheus, 2024).

---

_References: Caddy 2.0 (4 May 2020). Matt Holt. Apache 2.0 licence. Written in Go. Automatic HTTPS via ACME (Let’s Encrypt, ZeroSSL). Native HTTP/3. Caddyfile DSL, JSON API._
