Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review: gate setup.sh access banner on cert mode

[._.]/ Adam Eivy0bb1a8e89207
diff --git a/setup.sh b/setup.sh
index 9e44ee641a..5e8931a82b 100755
--- a/setup.sh
+++ b/setup.sh
@@ -99,13 +99,27 @@ fi
# http://localhost:5555 hits a TLS mismatch — and a loopback HTTP mirror spawns
# on :5553 (or $PORTOS_HTTP_PORT) for cert-free local access.
print_access_url() {
- if [ -f data/certs/cert.pem ] && [ -f data/certs/key.pem ]; then
- local mirror_port="${PORTOS_HTTP_PORT:-5553}"
- echo "Access at: http://localhost:${mirror_port} (loopback HTTP mirror — no cert warning)"
+ if [ ! -f data/certs/cert.pem ] || [ ! -f data/certs/key.pem ]; then
+ echo "Access at: http://localhost:5555"
+ return
+ fi
+ local mirror_port="${PORTOS_HTTP_PORT:-5553}"
+ # Read cert mode from meta.json — self-signed certs cover localhost + local
+ # IPv4s but not the Tailscale hostname; Tailscale LE certs cover the
+ # tailnet hostname but not localhost. The advertised URLs must match the
+ # cert's SAN coverage or we'll send users to a URL their browser rejects.
+ local cert_mode=""
+ if [ -f data/certs/meta.json ]; then
+ cert_mode=$(node -e "try{process.stdout.write(JSON.parse(require('fs').readFileSync('data/certs/meta.json','utf8')).mode||'')}catch{}" 2>/dev/null)
+ fi
+ echo "Access at: http://localhost:${mirror_port} (loopback HTTP mirror — no cert warning)"
+ if [ "$cert_mode" = "tailscale" ]; then
echo " or: https://<machine>.<tailnet>.ts.net:5555 (trusted via Tailscale)"
- echo " or: https://localhost:5555 (browser warns — cert SAN doesn't cover localhost)"
+ echo " or: https://localhost:5555 (browser warns — cert is for the Tailscale hostname)"
+ elif [ "$cert_mode" = "self-signed" ]; then
+ echo " or: https://localhost:5555 (browser warns on first visit — self-signed cert)"
else
- echo "Access at: http://localhost:5555"
+ echo " or: https://localhost:5555 (browser may warn on cert)"
fi
}