fix: remove auto-DDNS registration from installer; default to lan mode
Unit Tests / test (push) Successful in 7m27s

install.sh → make setup was registering 'mycell.pic.ngo' with DDNS at
install time (before the user ever opened the setup wizard). On a fresh
install the user would then open the wizard, choose 'pic1', and get a
401 OTP error because 'mycell' was already registered and the TOTP window
had moved on.

- Remove the register_with_ddns() call from setup_cell.py main(); DDNS
  registration now only happens through the setup wizard
- Change default DOMAIN_MODE from pic_ngo to lan so a bare 'make setup'
  no longer generates an ACME Caddyfile or pre-seeds a pic.ngo identity;
  the wizard collects the real cell name and domain mode from the user

make ddns-register still works for manual / scripted deployments.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-08 16:42:44 -04:00
parent e9077b2633
commit fb0326dae7
2 changed files with 2 additions and 5 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ setup: check-deps
@sudo chown -R $${SUDO_USER:-$$(id -un)}:$${SUDO_USER:-$$(id -un)} config/ data/ 2>/dev/null || true
CELL_NAME=$(or $(CELL_NAME),mycell) \
CELL_DOMAIN=$(or $(CELL_DOMAIN),cell) \
DOMAIN_MODE=$(or $(DOMAIN_MODE),pic_ngo) \
DOMAIN_MODE=$(or $(DOMAIN_MODE),lan) \
CELL_DOMAIN_NAME=$(or $(CELL_DOMAIN_NAME),) \
CLOUDFLARE_API_TOKEN=$(or $(CLOUDFLARE_API_TOKEN),) \
DUCKDNS_TOKEN=$(or $(DUCKDNS_TOKEN),) \
+1 -4
View File
@@ -260,7 +260,7 @@ def ensure_session_secret():
DDNS_URL = os.environ.get('DDNS_URL', 'http://ddns.pic.ngo:8080/api/v1')
DDNS_TOTP_SECRET = os.environ.get('DDNS_TOTP_SECRET', 'S6UMA464YIKM74QHXWL5WELDIO3HFZ6K')
DOMAIN_MODE = os.environ.get('DOMAIN_MODE', 'pic_ngo')
DOMAIN_MODE = os.environ.get('DOMAIN_MODE', 'lan')
CELL_DOMAIN_NAME = os.environ.get('CELL_DOMAIN_NAME', '')
CLOUDFLARE_TOKEN = os.environ.get('CLOUDFLARE_API_TOKEN', '')
DUCKDNS_TOKEN = os.environ.get('DUCKDNS_TOKEN', '')
@@ -413,9 +413,6 @@ def main():
ensure_session_secret()
bootstrap_admin_password()
if domain_mode == 'pic_ngo':
register_with_ddns(cell_name)
print()
print('--- Setup complete! Run: make start ---')