Skip to main content

Install Caddy on Rocky Linux 8.x

Alternative Web Server besides Apache and Nginx. Installation on Rocky Linux 8.x

Preparation

You can connect to the server via SSH or console.

ssh [username]@[ip_server] -p [ssh_port]

Update the system

sudo dnf update

Add caddy repository

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

Installation

Install Caddy

sudo dnf install caddy

Check Caddy Version

caddy version

Sample Output of Caddy version

Caddy Version Output

Set Firewall

Allow HTTP & HTTPS

sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https

Restart Firewall

sudo firewall-cmd --reload

Start Service

sudo systemctl enable --now caddy
sudo systemctl start caddy
sudo systemctl status caddy

Sample Output of Service status. Caddy Status Service Output

Access the sample page

Open http://localhost or http://your-server-ip to access the sample page.

Output of Caddy sample page. Caddy Sample Page