In our blog post, we will be walking you through to install Caddy, before getting deep into installation steps. Let’s know what Caddy is, Caddy is a web server like Apache or Nginx that is used serving content, one of the interesting and main features of why Caddy is popular is it’s the only Web server which comes with HTTPS by default and automatically.

Steps to Install Caddy

1) Setup firewall to server http and https traffic:

sudo apt update -y 
sudo apt upgrade -y
sudo firewall-cmd --permanent --zone=public --add-service=http
sudo firewall-cmd --permanent --zone=public --add-service=https
sudo firewall-cmd --reload

2) Setup Directory and a test page for your website to serve content:

sudo mkdir -p /var/www/html/

echo ‘<!doctype html><head><title>Racknerd Caddy Testing Page</title></head><body><h1>Welcome to Caddy Webserver, World!</h1></body></html>’ > /var/www/html/

3) Install Caddy

sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf ‘’ | sudo gpg –dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf ‘’ | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install caddy

4) Configure Caddy File

Here you need to add your domain name:

sudo nano /etc/caddy/caddyfile {

    root * /var/www/html/



5) Start and very Caddy Service Status

sudo systemctl start caddy


sudo systemctl reload caddy

Thanks for reading through this tutorial. Feel free to place an order and grab our offers and test your service.

Server Hosting Solutions by RackNerd:

Shared Hosting
cPanel Web Hosting in US, Europe, and Asia datacenters
Reseller Hosting
Create your new income stream today with a reseller account
VPS (Virtual Private Server)
Fast and Affordable VPS services - Instantly Deployed
Dedicated Servers
Bare-metal servers, ideal for the performance-demanding use case.

Leave a comment

Your email address will not be published. Required fields are marked *