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].
Add the Caddy
aptrepo 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
Install Caddy:
sudo apt install caddyCheck 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.
Open the Caddyfile:
sudo nano /etc/caddy/CaddyfileEdit 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:
sudo systemctl reload caddy
Todo
Add an example Caddyfile for basic reverse proxy needs