From fb0326dae7c79d26ede6332704af43c5a6eee8c4 Mon Sep 17 00:00:00 2001 From: Dmitrii Iurco Date: Mon, 8 Jun 2026 16:42:44 -0400 Subject: [PATCH] fix: remove auto-DDNS registration from installer; default to lan mode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- Makefile | 2 +- scripts/setup_cell.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 4912fa3..1dcd395 100644 --- a/Makefile +++ b/Makefile @@ -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),) \ diff --git a/scripts/setup_cell.py b/scripts/setup_cell.py index ab464e8..c7e0557 100644 --- a/scripts/setup_cell.py +++ b/scripts/setup_cell.py @@ -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 ---')