Caddy

Caddy is a web server that we use as a reverse-proxy for various self-hosted apps.

Install on Debian

Follow these steps to install Caddy on Debian. Based on the Caddy documentation[1].

  1. Add the Caddy apt repo to the system:

    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 chmod o+r /usr/share/keyrings/caddy-stable-archive-keyring.gpg
    sudo chmod o+r /etc/apt/sources.list.d/caddy-stable.list
    sudo apt update
    
  2. Install Caddy:

    sudo apt install caddy
    
  3. Check that Caddy is installed and running:

    sudo systemctl status caddy
    

Edit the Caddyfile

The Caddyfile is used to configure the operation of Caddy. The Caddyfile is located at /etc/caddy/Caddyfile.

  1. Open the Caddyfile:

    sudo nano /etc/caddy/Caddyfile
    
  2. Edit to the Caddyfile to your needs.

  3. Save and close the file with Ctrl+X, Y to confirm, and Enter to select the save location.

  4. Reload Caddy to load the updated config:

    sudo systemctl reload caddy
    

Todo

Add an example Caddyfile for basic reverse proxy needs