From 3845cf97f7955233b4c60b806416a98b4bdb91d1 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Sun, 11 Oct 2026 16:14:44 +0200 Subject: [PATCH] Caddy: install the .deb from GitHub instead of the Cloudsmith repo (#17862) * 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. * Remove outdated comment from caddy.sh --------- Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com> --- ct/caddy.sh | 7 +++++++ install/caddy-install.sh | 17 ++--------------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/ct/caddy.sh b/ct/caddy.sh index 983245651..0ca2ef8e2 100644 --- a/ct/caddy.sh +++ b/ct/caddy.sh @@ -38,11 +38,18 @@ update_deb_based() { exit fi + 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