From 85024afcf6c8eb7f91006738b3a906aebb23aee8 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Thu, 11 Jun 2026 15:54:27 +0000 Subject: [PATCH] setup.sh: wire join@ email verification through Caddy Proxy /verify on the main site to the agentbbs loopback endpoint and surface AGENTBBS_HTTP_ADDR + the SMTP knobs in the generated env file (links are logged when SMTP is unconfigured; existing env files keep working via the in-binary 127.0.0.1:8088 default). Co-Authored-By: Claude Fable 5 --- setup.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/setup.sh b/setup.sh index 730a11f..e1cc278 100755 --- a/setup.sh +++ b/setup.sh @@ -29,6 +29,7 @@ REPO="${REPO:-https://github.com/profullstack/agentbbs.git}" SRC_DIR="${SRC_DIR:-/opt/agentbbs}" DATA_DIR="${DATA_DIR:-/var/lib/agentbbs}" ASK_ADDR="${ASK_ADDR:-127.0.0.1:8081}" # agentbbs on-demand-TLS ask endpoint (must match agentbbs.env) +HTTP_ADDR="${HTTP_ADDR:-127.0.0.1:8088}" # agentbbs /verify endpoint (join@ email confirmation links) GO_VERSION="${GO_VERSION:-1.26.4}" POD_IMAGE="${POD_IMAGE:-docker.io/library/ubuntu:24.04}" FETCH_ASSETS="${FETCH_ASSETS:-1}" # set 0 to skip the DOOM/Freedoom arcade assets @@ -149,6 +150,18 @@ AGENTBBS_POD_IMAGE=${POD_IMAGE} # Caddyfile's on_demand_tls ask URL. AGENTBBS_ASK_ADDR=${ASK_ADDR} +# join@ email verification. The confirm links in the mail hit +# https://${DOMAIN}/verify, which Caddy proxies to this loopback endpoint. +# Without SMTP config the link is only logged (journalctl -u agentbbs). +AGENTBBS_HTTP_ADDR=${HTTP_ADDR} +# AGENTBBS_SMTP_HOST= +# AGENTBBS_SMTP_PORT=587 +# AGENTBBS_SMTP_USER= +# AGENTBBS_SMTP_PASS= +# AGENTBBS_SMTP_FROM=bbs@${DOMAIN} +# pod@ requires a verified email; set 0 to disable on a dev host: +# AGENTBBS_REQUIRE_VERIFIED_EMAIL=1 + # Pods (CoinPay \$1/mo membership) — required for pod@ to charge/verify: # AGENTBBS_COINPAY_PAY_TMPL= # AGENTBBS_COINPAY_VERIFY_CMD= @@ -244,6 +257,11 @@ cat > /etc/caddy/Caddyfile < users/name/public_html/path @tilde path_regexp tilde ^/~([^/]+)(/.*)?\$ handle @tilde {