Try this

sudo apt install -y debian-keyring debian-acthive-keyring apt-transport-https curl

curl -lsLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyring/caddy-stable.archive-keyring.gpg
curl -lsLf '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 caddy

sudo caddy run --config Caddyfile

caddy fmt --overwrite

Leave a Reply