fix(setup): issue the news.<domain> cert on demand

news.bbs.profullstack.com never got a certificate. Its site block is
covered by the *.bbs.profullstack.com wildcard site, whose policy is
on_demand only, so Caddy never obtained the name in the background: no
attempt was ever logged, a TLS handshake got an internal error, and
NNTPS on :563 kept the self-signed bootstrap cert, which expired on
2026-09-12.

Opt the news site into on_demand. It is issued on the first handshake
through the ask endpoint, which approves AGENTBBS_NEWS_HOST since #141.
Verified live: https://news.bbs.profullstack.com answers 200 with a
Let's Encrypt cert, agentbbs-news-certs succeeds, and :563 verifies
(expires 2027-01-04).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
riotcoder 2026-10-06 05:27:21 +00:00
parent 6b5ce8f4be
commit aa3414b4c0

View file

@ -689,10 +689,18 @@ ${GIT_DOMAIN} {
"
fi
# news.${DOMAIN} sits under the *.${DOMAIN} wildcard site, whose policy is
# on_demand only, so Caddy never obtains this name in the background. (Live on
# 2026-10-06: no attempt was ever logged, and :563 served the expired bootstrap
# cert.) Opting the site into on_demand gets it issued on the first handshake,
# through the same ask endpoint, which approves AGENTBBS_NEWS_HOST.
NEWS_SITE=""
if [ "$NEWS" = "1" ]; then
NEWS_SITE="
news.${DOMAIN} {
tls {
on_demand
}
encode zstd gzip
header Content-Type \"text/plain; charset=utf-8\"
respond \"AgentBBS Usenet (members-only). Point a newsreader at news.${DOMAIN}:563 over NNTPS and AUTHINFO USER <your-bbs-name> (any password). Or from the BBS: ssh -t news@${DOMAIN}\"