Guides / Service Mesh & Networking

How to Install & Set Up Caddy

Install Caddy — the web server with automatic HTTPS by default — from the official APT repository and serve a site in one line.

Updated 20264-step setupDownload Caddy →

Prerequisites

  • ✓An Ubuntu/Debian host
  • ✓A domain pointed at the server for automatic TLS (optional for local testing)

Install Caddy on Debian / Ubuntu (APT repo)

terminal
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
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 -y caddy

Install Caddy on Fedora / RHEL (COPR)

Caddy's official Fedora build lives in a COPR repo rather than a yum.repos.d file — enable the copr plugin once, then treat it like any other dnf package.

terminal
sudo dnf install -y 'dnf-command(copr)'
sudo dnf copr enable -y @caddy/caddy
sudo dnf install -y caddy

Serve a site

terminal
# instant static file server:
caddy file-server --listen :8080

# or a reverse proxy with automatic HTTPS:
caddy reverse-proxy --from example.com --to localhost:9000

Verify

terminal
caddy version
sudo systemctl status caddy

Documentation & Knowledge Base

Official DocumentationCaddy Documentation →Knowledge Base & CommunityCaddy Community Forum →
Download Caddy— all versions & official links→

Related Guides

TraefikInstall guide →HAProxyInstall guide →EnvoyInstall guide →

Need Caddy deployed and managed for you?

We're OpenStack Dev — we design, deploy, and operate production DevOps infrastructure.

Get in TouchAll Install Guides