[bootstrap] hero_router bind defaults block public-URL bring-up on heroci AND any normal cloud VM (DO/Hetzner/AWS) #227
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Surfaced during session 73 heroci validation (2026-05-07). Documenting for session 74's DO from-nothing demo.
Symptom
502 Bad Gatewayon every URL despite hero_proc + mycelium + hero_router all running locally on the VM (all three reach health-green viaservice_<name> start --download --reset).curl http://[<mycelium-v6>]:9988/health→ 200,curl http://[<mycelium-v6>]:8991/→ 200.grid_name_proxy.gatewaybackend is registered ashttp://<vms[0].ip>:9988; on herocivms[0].ipis the public IPv4178.251.27.31, NOT the mycelium IPv6.Root cause
service_router.nuline 173-179 logic:When mycelium is up,
--port 0disables hero_router's TCP listener entirely; the only listener bound is on[<mycelium-v6>]:9988. When mycelium is down,--port 9988binds on 127.0.0.1:9988 (perhero_router/crates/hero_router/src/main.rs:56— "TCP port for the UI HTTP listener on 127.0.0.1").Neither path binds on
0.0.0.0:9988or on the VM's public IP, so any external-facing reverse proxy (TF Grid name_proxy, nginx running on a different host, a DigitalOcean cloud LB) hitting the public IPv4 finds nothing.herodemo papers over this because it has nginx running on the VM bridging
0.0.0.0:80/443→127.0.0.1:9988. heroci has no nginx.Fix options (for session 74)
--bindmode to hero_router and surface it inservice_router.nu. Default stays127.0.0.1for security. Operators who want a public listener pass--bind 0.0.0.0(or the explicit interface address). Mirror the pattern already used bymycelium_ui --bind [::]:8991. Mechanical Rust change inhero_router/crates/hero_router/src/main.rsaround line 258TcpListener::bind(addr).service_router.nu --behind-nginxflag or similar that doesn't change bind behaviour. Adds an external dep.vms[0].ipto the mycelium IPv6. Fixes heroci specifically; doesn't help DO/Hetzner/AWS users.Why this is now a session-74 priority
Session 74 plan: validate the
--downloadfrom-nothing bootstrap on a fresh DigitalOcean Ubuntu 24.04 droplet — i.e. the actual customer experience. That deploy needs hero_router to listen on a public-facing interface. Without option 1 (or option 2 + nginx), the demo can't be reached.What session 73 delivered
--addressflag now)service_mycelium --download+service_complete --downloadwiringLocal-on-heroci bring-up works end-to-end. Public URL exposure is the only remaining gap, and it's this issue.
See:
Signed-off-by: mik-tf
Closing as fixed.
Session 74 added the
--bindflag tohero_routerand validated DO from-nothing bring-up; session 75 re-validated onhero.threefold.storewith the full nginx + LE + htpasswd stack.Confirmed in current
origin/developmentHEAD (s80 sync):The original blocker — bind defaults locked to 127.0.0.1 / mycelium IPv6 — is resolved by passing
--bind 0.0.0.0:9988(or whatever fits the cloud VM's nginx upstream).Public URL bring-up working on
hero.threefold.storeper s75 close.