From 48843e0d5ffc47b25807e279a02a47bd74e769b7 Mon Sep 17 00:00:00 2001 From: MickLesk <47820557+MickLesk@users.noreply.github.com> Date: Sun, 11 Oct 2026 15:57:19 +0200 Subject: [PATCH] Caddy: install the .deb from GitHub instead of the Cloudsmith repo Cloudsmith answered 402 Payment Required for two days once Caddy's bandwidth quota ran out, and upstream expects it to happen again (caddyserver/dist#142). Each GitHub release carries the identical package (same SHA256), so Debian installs it from there now. The update drops the Cloudsmith source, seeds ~/.caddy from the installed package so nothing is reinstalled, and keeps a customised Caddyfile. --- ct/caddy.sh | 8 ++++++++ install/caddy-install.sh | 17 ++--------------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/ct/caddy.sh b/ct/caddy.sh index 983245651..7e5de87e5 100644 --- a/ct/caddy.sh +++ b/ct/caddy.sh @@ -38,11 +38,19 @@ update_deb_based() { exit fi + # The Cloudsmith repo keeps running out of quota (402); the same .deb ships with each GitHub release + cleanup_old_repo_files "caddy" msg_info "Updating Caddy LXC" apt_update_safe $STD apt upgrade -y msg_ok "Updated Caddy LXC" + [[ -f ~/.caddy ]] || dpkg-query -W -f='${Version}' caddy >~/.caddy 2>/dev/null || true + if check_for_gh_release "caddy" "caddyserver/caddy"; then + DPKG_FORCE_CONFOLD=1 fetch_and_deploy_gh_release "caddy" "caddyserver/caddy" "binary" "latest" "/opt/caddy" "caddy_*_linux_$(arch_resolve).deb" + systemctl restart caddy + fi + if command -v xcaddy >/dev/null 2>&1; then if check_for_gh_release "xcaddy" "caddyserver/xcaddy"; then setup_go diff --git a/install/caddy-install.sh b/install/caddy-install.sh index 28c5cdedd..1d24c405d 100644 --- a/install/caddy-install.sh +++ b/install/caddy-install.sh @@ -14,21 +14,8 @@ network_check update_os setup_deb_based() { - msg_info "Installing Dependencies" - $STD apt install -y \ - debian-keyring \ - debian-archive-keyring \ - apt-transport-https - msg_ok "Installed Dependencies" - - msg_info "Installing Caddy" - setup_deb822_repo \ - "caddy" \ - "https://dl.cloudsmith.io/public/caddy/stable/gpg.key" \ - "https://dl.cloudsmith.io/public/caddy/stable/deb/debian" \ - "any-version" - $STD apt install -y caddy - msg_ok "Installed Caddy" + fetch_and_deploy_gh_release "caddy" "caddyserver/caddy" "binary" "latest" "/opt/caddy" "caddy_*_linux_$(arch_resolve).deb" + systemctl enable -q --now caddy prompt="${var_caddy_xcaddy:-}" [[ -n "$prompt" ]] || read -r -p "${TAB3}Would you like to install xCaddy Addon? " prompt