Skip to content
Runbook

Install Caddy on Fedora / RHEL

Modern web server with automatic HTTPS, usable as a reverse proxy and file server.

Toolweb-serverreverse-proxyhttpstlshttp

Installation

COPR repository · dnf
sudo dnf install -y 'dnf-command(copr)'
sudo dnf copr enable -y @caddy/caddy
sudo dnf install -y caddy

Caddy is provided through the official @caddy/caddy COPR, with a systemd service.

Verify the installation

Verify
caddy version

Service

Start
sudo systemctl start caddy
Stop
sudo systemctl stop caddy
Status
sudo systemctl status caddy
Restart
sudo systemctl restart caddy
On boot
sudo systemctl enable caddy

Important files

TypePathDescription
config/etc/caddy/CaddyfileMain configuration file read by the systemd service.
data/var/lib/caddyState directory where TLS certificates are stored.

Default ports

80443

Command-line tools

  • caddyServer and CLI; the package also installs the caddy systemd unit.

Uninstall

Uninstall
sudo systemctl stop caddy
sudo dnf remove -y caddy
sudo dnf copr remove -y @caddy/caddy

Good to know

  • Open the firewall for HTTP/HTTPS: sudo firewall-cmd --add-service={http,https} --permanent && sudo firewall-cmd --reload.
  • Edit /etc/caddy/Caddyfile, then apply with sudo systemctl reload caddy.
  • Certificates and state live under /var/lib/caddy.

Installation on Fedora

Fedora does not ship Caddy in its main repositories; use the official @caddy/caddy COPR. The commands above enable the COPR plugin, add the repository, and install Caddy together with a systemd service.

Firewall

Fedora's firewall blocks inbound traffic by default. Open HTTP and HTTPS with sudo firewall-cmd --add-service={http,https} --permanent && sudo firewall-cmd --reload so Caddy can serve and complete the ACME challenge for automatic certificates.

Configuration

Edit /etc/caddy/Caddyfile, then apply with sudo systemctl reload caddy. Automatically issued certificates and state are stored under /var/lib/caddy.