Last active
December 13, 2025 14:19
-
-
Save buismaarten/741acdff7fd32b29dc150cd36286ba22 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ ! -f /etc/os-release ] || ! grep -qi "debian" /etc/os-release; then | |
| echo "This script is only for Debian-based systems." | |
| exit 1 | |
| fi | |
| if command -v caddy &> /dev/null; then | |
| echo "Caddy is already installed." | |
| exit 1 | |
| fi | |
| sudo apt-get update | |
| sudo apt-get 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-get update | |
| sudo apt-get install -y caddy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment