Skip to content

startup.sh: honor NGROK_DOMAIN for stable tunnel URL - #213

Merged
sonichi merged 1 commit into
mainfrom
startup-ngrok-domain
Apr 8, 2026
Merged

sonichi merged 1 commit into
mainfrom
startup-ngrok-domain

Conversation

@sonichi

@sonichi sonichi commented Apr 8, 2026

Copy link
Copy Markdown
Owner

health-check.py's auto-restart path (#207) already reads NGROK_DOMAIN and passes --domain=... so the tunnel comes back on the same URL. But startup.sh still ran plain ngrok http 3100, so the initial tunnel URL was random and the Twilio webhook had to be updated manually on every first boot.

Mirror the health-check logic in startup.sh: read NGROK_DOMAIN from .env, pass --domain=... if set, otherwise fall back to the old random-URL behaviour. Document the variable in .env.example.

Motivated by the Mac Mini migration — ngrok reserved domain was set in .env but startup.sh ignored it, so the first boot after reboot still printed '⚠ Update Twilio webhook to: ...'.

Test plan

  • bash -n src/startup.sh — syntax ok
  • Kill ngrok, re-run startup.sh with NGROK_DOMAIN set → tunnel comes up on reserved domain, no 'update Twilio webhook' warning
  • Unset NGROK_DOMAIN → falls back to old behaviour

🤖 Generated with Claude Code

health-check.py's auto-restart path (PR #207) already reads NGROK_DOMAIN
and passes --domain=... so the tunnel comes back on the same URL. But
startup.sh still ran plain 'ngrok http 3100', so the initial tunnel URL
was random and the Twilio webhook had to be updated manually on every
first boot.

Mirror the health-check logic in startup.sh: read NGROK_DOMAIN from .env,
pass --domain=... if set, otherwise fall back to the old random-URL
behaviour. Document the variable in .env.example.

Motivated by the Mac Mini migration — ngrok reserved domain was set in
.env but startup.sh ignored it, so the first boot after reboot still
printed "⚠ Update Twilio webhook to: ...".

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonichi
sonichi merged commit 55cb27c into main Apr 8, 2026
@sonichi
sonichi deleted the startup-ngrok-domain branch April 8, 2026 14:53
liususan091219 pushed a commit to liususan091219/sutando-fork that referenced this pull request May 28, 2026
health-check.py's auto-restart path (PR sonichi#207) already reads NGROK_DOMAIN
and passes --domain=... so the tunnel comes back on the same URL. But
startup.sh still ran plain 'ngrok http 3100', so the initial tunnel URL
was random and the Twilio webhook had to be updated manually on every
first boot.

Mirror the health-check logic in startup.sh: read NGROK_DOMAIN from .env,
pass --domain=... if set, otherwise fall back to the old random-URL
behaviour. Document the variable in .env.example.

Motivated by the Mac Mini migration — ngrok reserved domain was set in
.env but startup.sh ignored it, so the first boot after reboot still
printed "⚠ Update Twilio webhook to: ...".

Co-authored-by: Chi <wangchi@Chis-Mac-mini.local>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant