What Is Caddy?
Caddy is a modern, open-source web server written in Go that automatically provisions and renews TLS certificates. It requires minimal configuration and is ideal for quickly deploying secure websites and reverse proxies on a Breeze.
Prerequisites
- A Breeze running Ubuntu 22.04 or later
- A domain name with DNS pointed to your Breeze IP
- Ports 80 and 443 open
Step 1: Install Caddy
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddyStep 2: Configure the Caddyfile
sudo nano /etc/caddy/CaddyfileFor a basic site with automatic HTTPS:
yourdomain.com {
root * /var/www/html
file_server
encode gzip
}Step 3: Reverse Proxy Example
Caddy makes proxying to application servers simple:
app.yourdomain.com {
reverse_proxy localhost:3000
}Step 4: Start and Enable Caddy
sudo systemctl enable caddy
sudo systemctl start caddyCaddy will automatically obtain a Let's Encrypt certificate for each domain in your Caddyfile. Check the status:
sudo systemctl status caddyUseful Features
- Automatic HTTPS — no manual certificate management required
- Built-in HTTP/2 and HTTP/3 support
- Use
caddy adaptto validate your Caddyfile syntax before reloading - View logs at
/var/log/caddy/for troubleshooting on your Breeze