Docs / Web Servers / How to Set Up Caddy with Automatic HTTPS

How to Set Up Caddy with Automatic HTTPS

By Admin · Mar 1, 2026 · Updated Apr 23, 2026 · 28 views · 2 min read

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 caddy

Step 2: Configure the Caddyfile

sudo nano /etc/caddy/Caddyfile

For 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 caddy

Caddy will automatically obtain a Let's Encrypt certificate for each domain in your Caddyfile. Check the status:

sudo systemctl status caddy

Useful Features

  • Automatic HTTPS — no manual certificate management required
  • Built-in HTTP/2 and HTTP/3 support
  • Use caddy adapt to validate your Caddyfile syntax before reloading
  • View logs at /var/log/caddy/ for troubleshooting on your Breeze

Was this article helpful?