From 125e6bef76451c81ca3f7fd4b3450efe346d91c2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 3 Apr 2026 19:49:15 +0000 Subject: [PATCH] Fix onboarding wizard: centering, njal.la domain instructions, port forwarding guidance Agent-Logs-Url: https://github.com/naturallaw777/staging_alpha/sessions/a264d893-5e77-4b7b-98d5-23796530fe97 Co-authored-by: naturallaw777 <99053422+naturallaw777@users.noreply.github.com> --- app/sovran_systemsos_web/static/onboarding.js | 54 ++++++++++++++----- app/sovran_systemsos_web/static/style.css | 6 ++- .../templates/onboarding.html | 9 ++-- 3 files changed, 50 insertions(+), 19 deletions(-) diff --git a/app/sovran_systemsos_web/static/onboarding.js b/app/sovran_systemsos_web/static/onboarding.js index 84ccc35..da9e7fa 100644 --- a/app/sovran_systemsos_web/static/onboarding.js +++ b/app/sovran_systemsos_web/static/onboarding.js @@ -8,13 +8,13 @@ const TOTAL_STEPS = 6; // Domains that may need configuration, with service unit mapping for enabled check const DOMAIN_DEFS = [ - { name: "matrix", label: "Matrix (Synapse)", unit: "matrix-synapse.service", needsDdns: false }, - { name: "haven", label: "Haven Nostr Relay", unit: "haven-relay.service", needsDdns: true }, - { name: "element-calling", label: "Element Video/Audio Calling", unit: "livekit.service", needsDdns: true }, - { name: "vaultwarden", label: "Vaultwarden (Password Vault)", unit: "vaultwarden.service", needsDdns: false }, - { name: "btcpayserver", label: "BTCPay Server", unit: "btcpayserver.service", needsDdns: false }, - { name: "nextcloud", label: "Nextcloud", unit: "phpfpm-nextcloud.service",needsDdns: false }, - { name: "wordpress", label: "WordPress", unit: "phpfpm-wordpress.service",needsDdns: false }, + { name: "matrix", label: "Matrix (Synapse)", unit: "matrix-synapse.service", needsDdns: true }, + { name: "haven", label: "Haven Nostr Relay", unit: "haven-relay.service", needsDdns: true }, + { name: "element-calling", label: "Element Video/Audio Calling", unit: "livekit.service", needsDdns: true }, + { name: "vaultwarden", label: "Vaultwarden (Password Vault)", unit: "vaultwarden.service", needsDdns: true }, + { name: "btcpayserver", label: "BTCPay Server", unit: "btcpayserver.service", needsDdns: true }, + { name: "nextcloud", label: "Nextcloud", unit: "phpfpm-nextcloud.service", needsDdns: true }, + { name: "wordpress", label: "WordPress", unit: "phpfpm-wordpress.service", needsDdns: true }, ]; const REBUILD_POLL_INTERVAL = 2000; @@ -137,16 +137,25 @@ async function loadStep2() { if (relevantDomains.length === 0) { html += '

No domain-based services are enabled for your role. You can skip this step.

'; } else { - html += '

Enter a fully-qualified domain name (e.g. matrix.example.com) for each service.

'; + html += '
' + + 'Before you continue:' + + '
    ' + + '
  1. Purchase your subdomains on https://njal.la
  2. ' + + '
  3. For each subdomain, add a Dynamic record in your Njal.la dashboard
  4. ' + + '
  5. Njal.la will give you a curl command like:
    ' + + 'curl "https://njal.la/update/?h=sub.domain.com&k=abc123&auto"
  6. ' + + '
  7. Enter the subdomain and paste that curl command below
  8. ' + + '
' + + '
'; + html += '

Enter each fully-qualified subdomain (e.g. matrix.yourdomain.com) and its Njal.la DDNS curl command.

'; relevantDomains.forEach(function(d) { var currentVal = (_domainsData && _domainsData[d.name]) || ""; html += '
'; html += ''; html += ''; - if (d.needsDdns) { - html += ''; - html += ''; - } + html += ''; + html += ''; + html += '

ℹ Paste the curl URL from your Njal.la dashboard\'s Dynamic record

'; html += '
'; }); } @@ -235,11 +244,30 @@ async function loadStep3() { var internalIp = (networkData && networkData.internal_ip) || "unknown"; - var html = '
'; + var html = '
' + + '⚠ IMPORTANT: Ports 80 (HTTP) and 443 (HTTPS) MUST be forwarded first.
' + + 'Caddy uses these ports to obtain SSL certificates from Let\'s Encrypt. ' + + 'If these ports are closed, certificate authentication will fail and ' + + 'none of your domain-based services will work over HTTPS.' + + '
'; + + html += '
'; html += ' Forward ports to this machine\'s internal IP:'; html += ' ' + escHtml(internalIp) + ''; html += '
'; + html += '
' + + 'How to set up port forwarding' + + '
    ' + + '
  1. Open your router\'s admin panel — usually http://192.168.1.1 or http://192.168.0.1
  2. ' + + '
  3. Look for "Port Forwarding", "NAT", or "Virtual Server" in the settings
  4. ' + + '
  5. Create a new rule for each port listed below
  6. ' + + '
  7. Set the destination/internal IP to ' + escHtml(internalIp) + '
  8. ' + + '
  9. Set both internal and external port to the same number
  10. ' + + '
  11. Save and apply changes
  12. ' + + '
' + + '
'; + var status = (portHealth && portHealth.status) || "ok"; var totalPorts = (portHealth && portHealth.total_ports) || 0; var closedPorts = (portHealth && portHealth.closed_ports) || 0; diff --git a/app/sovran_systemsos_web/static/style.css b/app/sovran_systemsos_web/static/style.css index 2726875..25047b2 100644 --- a/app/sovran_systemsos_web/static/style.css +++ b/app/sovran_systemsos_web/static/style.css @@ -1690,8 +1690,9 @@ button.btn-reboot:hover:not(:disabled) { .onboarding-body { overflow: auto; display: flex; - align-items: flex-start; - justify-content: center; + flex-direction: column; + align-items: center; + justify-content: flex-start; background-color: var(--bg-color); min-height: 100vh; padding: 32px 16px 64px; @@ -1700,6 +1701,7 @@ button.btn-reboot:hover:not(:disabled) { .onboarding-shell { width: 100%; max-width: 680px; + margin: 0 auto; } /* Progress bar */ diff --git a/app/sovran_systemsos_web/templates/onboarding.html b/app/sovran_systemsos_web/templates/onboarding.html index 65049a3..cdced5f 100644 --- a/app/sovran_systemsos_web/templates/onboarding.html +++ b/app/sovran_systemsos_web/templates/onboarding.html @@ -69,8 +69,8 @@ 🌐

Domain Configuration

- Enter the domain names for your services. If you're using dynamic DNS, - also provide your DDNS update URL. + Sovran_SystemsOS uses Njal.la for domains and Dynamic DNS. + For each service, enter the subdomain you purchased on Njal.la and paste the DDNS curl command from your Njal.la dashboard.

@@ -91,8 +91,9 @@ 🔌

Port Forwarding Check

- Your router must forward these ports to this machine. Configure port - forwarding in your router's admin panel pointing to the internal IP shown below. + Your home router must forward specific ports to this machine before your services will work. + Ports 80 and 443 must be open before Caddy can authenticate your SSL certificates. + Without these ports forwarded, HTTPS will not work and your services will be unreachable from outside your network.