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 documentation1.
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
Edit the Caddyfile¶
The Caddyfile is used to configure the operation of Caddy. The Caddyfile is located at /etc/caddy/Caddyfile.
- Open the Caddyfile:
- Edit to the Caddyfile to your needs.
- Save and close the file with Ctrl+X, Y to confirm, and Enter to select the save location.
- Reload Caddy to load the updated config:
Todo
Add an example Caddyfile for basic reverse proxy needs