How to Install Caddy Web Server on Rocky Linux 10

Caddy is a modern, open-source web server written in Go. It features automatic HTTPS, robust performance, and ease of configuration. Caddy is especially popular for developers and sysadmins looking to simplify TLS and reverse proxy setups.

Prerequisites

  • Rocky Linux 10 system with root or sudo access
  • Basic knowledge of command line operations

Update System Packages

Ensure your system is fully up to date before proceeding.

dnf update -y

Install DNF COPR Plugin

The COPR plugin is required to enable third-party repositories like the one used for Caddy.

dnf install dnf-plugins-core -y

Enable the Caddy Repository

Enable the official Caddy COPR repository to allow package installation.

dnf copr enable @caddy/caddy -y

Install Caddy Web Server

Once the repository is enabled, install the Caddy package.

dnf install caddy -y

Start and Enable Caddy

Start the Caddy service and enable it to start automatically on boot.

systemctl start caddy
systemctl enable caddy

Configure the Firewall

Allow HTTP and HTTPS traffic through the firewall to ensure Caddy can serve content.

firewall-cmd --add-service=http --permanent
firewall-cmd --add-service=https --permanent
firewall-cmd --reload

Verify the Installation

Check if Caddy is installed and running correctly.

caddy version

Output:

v2.10.0 h1:fonubSaQKF1YANl8TXqGcn4IbIRUDdfAkpcsfI/vX5U=

Accessing the Web Server

After installation, Caddy should be serving content on your server’s IP address.

Open a web browser and navigate to:

http://<your-server-ip>

Or if DNS is configured:

http://your-domain.com

Replace <your-server-ip> and your-domain.com with your actual server IP address or domain name.

images

Conclusion

You’ve successfully installed and started the Caddy web server on Rocky Linux 10. Caddy is now ready to serve static content, act as a reverse proxy, or be configured for advanced use cases like load balancing or automatic TLS for your domains.


CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS