Home/Blog/Web Servers & Hosting
Web Servers & Hosting⚡ Beginner Friendly
8 min read
September 12, 2026

Deploying Caddy Web Server with Automatic TLS 1.3 & Reverse Proxying on Linux

Technical Blueprint & Architecture Summary
Target EnvironmentUbuntu 24.04 / Debian 12
Hardware Reqs1 vCPU • 1GB RAM • NVMe
Verification Status Production Tested
⚡
Edutechz Infrastructure Team
Web Operations Group
#Caddy#Web Servers#SSL Certificate#Reverse Proxy#HTTP3

The Evolution Beyond Manual SSL Renewals

For over a decade, Nginx has been the defacto open-source web server. However, managing Certbot renewal cron jobs, configuring cipher suites, and handling certificate challenges introduces maintenance friction.

**Caddy** is an enterprise-grade, memory-safe web server written in Go with **Automatic HTTPS enabled by default**. It provisions, configures, and automatically renews TLS 1.3 certificates from Let's Encrypt or ZeroSSL without requiring external certbot daemons or custom scripts.


Step 1: Install Caddy on Ubuntu 24.04 LTS

Install the official package repository signed with Caddy's keyring:

bash 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

Verify Caddy is active:

bash terminal
sudo systemctl status caddy

Step 2: Configure Reverse Proxy with Zero-Config TLS

Caddy uses a declarative configuration file called the `Caddyfile`. Open `/etc/caddy/Caddyfile`:

bash terminal
sudo nano /etc/caddy/Caddyfile

Replace the default boiler-plate with a production reverse-proxy configuration:

caddy terminal
api.yourdomain.com {
    # Automatic TLS 1.3 + HTTP/3 (QUIC) enabled by default
    
    # Security Headers
    header {
        Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
        X-Content-Type-Options "nosniff"
        X-Frame-Options "DENY"
        Referrer-Policy "strict-origin-when-cross-origin"
    }

    # Reverse proxy incoming requests to local backend application
    reverse_proxy 127.0.0.1:3000 {
        header_up Host {host}
        header_up X-Real-IP {remote_host}
        header_up X-Forwarded-For {remote_host}
        header_up X-Forwarded-Proto {scheme}
    }

    # Enable gzip and zstd compression
    encode gzip zstd

    # Access logging
    log {
        output file /var/log/caddy/api_access.log {
            roll_size 10mb
            roll_keep 5
        }
    }
}

Step 3: Validate and Hot-Reload Configuration

Caddy allows hot-reloading configurations with zero downtime and zero dropped sockets:

bash terminal
# Validate syntax before loading
caddy validate --config /etc/caddy/Caddyfile

# Hot reload without dropping active TCP connections
sudo systemctl reload caddy

Within seconds, Caddy solves the ACME TLS-ALPN challenge, obtains an ECC certificate, and begins serving encrypted HTTP/3 traffic.

Deploy On Edutechz NVMe Cloud

Need clean IP addresses, DDoS mitigation, and 10 Gbps uplinks to run your proxies, containers, or Windows servers? Deploy your instance in 60 seconds.

Explore Cloud Plans

Recommended Technical Guides

Networking & Privacy

How to Set Up a High-Performance MTProto Proxy on Ubuntu 24.04 LTS

9 min read
Windows RDP

Step-by-Step Windows RDP Optimization for High-Latency Connections

8 min read
Cybersecurity

Best Practices for Securing Linux Cloud Servers Against Brute-Force Attacks

10 min read