Skip to content

fix(setup): install Caddy without the Cloudsmith apt repo - #146

Merged
ralyodio merged 1 commit into
mainfrom
fix/caddy-no-cloudsmith
Oct 10, 2026
Merged

ralyodio merged 1 commit into
mainfrom
fix/caddy-no-cloudsmith

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

The deploy for #145 failed at apt-get update: Caddy's Cloudsmith apt repo (dl.cloudsmith.io/public/caddy/stable) now returns 402 Payment Required, so setup.sh aborts in step 1. That blocks every deploy and the 15-minute agentbbs-update.timer run.

  • Step 1: removes /etc/apt/sources.list.d/caddy-stable.list and /usr/share/keyrings/caddy-stable-archive-keyring.gpg before apt-get update.
  • Step 9: when caddy is missing, installs the pinned GitHub release instead (CADDY_VERSION=2.11.7, SHA-512 from the release's checksums file, amd64 + arm64). It goes to /usr/bin/caddy and gets the caddy system user, /etc/caddy and upstream's caddy.service (written only if no unit exists). Ubuntu 26.04's own package is 2.6.2 (2022), so it is not used.
  • Prod box is unaffected beyond the apt list: its dpkg-installed caddy 2.11.7 and /usr/lib/systemd/system/caddy.service are kept as is. caddy validate on the live Caddyfile reports "Valid configuration".

Tested: bash -n passes. shellcheck -S warning reports no new warnings (one existing SC2097/8 at the news-cert line). The checksum-and-extract logic ran against the real amd64 tarball and the binary reports v2.11.7.

🤖 Generated with Claude Code

dl.cloudsmith.io/public/caddy/stable now answers 402 Payment Required, so
apt-get update in step 1 fails and every deploy (and the 15-minute
agentbbs-update timer) aborts before doing anything.

- Step 1 removes /etc/apt/sources.list.d/caddy-stable.list and its keyring
  before apt-get update.
- Step 9 installs the pinned GitHub release (CADDY_VERSION=2.11.7, SHA-512
  verified) to /usr/bin/caddy with the caddy user and upstream's unit,
  only when caddy is missing. Ubuntu's own package is 2.6.2, too old.
- An existing install (the dpkg 2.11.7 on bbs.profullstack.com, unit in
  /usr/lib/systemd/system) is left untouched, so the Caddyfile and unit
  keep working as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

10 finding(s)

HIGH/CRITICAL: 7 | LOW: 3

Severity Rule Location
HIGH secret-generic-credential deploy/ergo/ircd.yaml:162
HIGH secret-generic-credential deploy/ergo/ircd.yaml:221
HIGH secret-generic-credential deploy/ergo/ircd.yaml:638
HIGH secret-generic-credential deploy/ergo/ircd.yaml:787
HIGH secret-database-url deploy/ergo/ircd.yaml:893
HIGH secret-generic-credential deploy/ergo/ircd.yaml:1025
HIGH secret-generic-credential deploy/ergo/ircd.yaml:1033
LOW secret-generic-credential deploy/ergo/ircd.yaml:772
LOW tls-verification-disabled internal/mail/mail.go:109
LOW secret-generic-credential internal/mailu/mailu_test.go:44

Snippets are redacted; ThreatCrush never prints matched credential material.

@ralyodio
ralyodio merged commit 0e0071e into main Oct 10, 2026
6 checks passed
@ralyodio
ralyodio deleted the fix/caddy-no-cloudsmith branch October 10, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant