Skip to content

fix(dev): bind to all interfaces for Docker#183

Open
applesnort wants to merge 1 commit into
credential-handler:mainfrom
applesnort:fix/docker-bind-addr
Open

fix(dev): bind to all interfaces for Docker#183
applesnort wants to merge 1 commit into
credential-handler:mainfrom
applesnort:fix/docker-bind-addr

Conversation

@applesnort

Copy link
Copy Markdown

Summary

  • configs/dev.js default bindAddr is ['authn.localhost'] which resolves to 127.0.0.1 (loopback only)
  • On macOS, Docker containers reach the host via host.docker.internal192.168.65.254, not loopback
  • This causes cloudflared's mediator-tunnel container in chapi-demo-stack to get connection refused
  • Adding bindAddr = ['0.0.0.0'] makes the mediator reachable from Docker

Note: 0.0.0.0 also exposes the mediator on all LAN interfaces — acceptable for local dev, but worth being aware of on shared/corporate networks.

Test plan

  • Run node authn.localhost.js and confirm HTTPS listening on authn.localhost:33443
  • Run docker compose up -d in chapi-demo-stack and confirm mediator-tunnel connects without Error 1033
  • Full wallet → issue → present flow on a phone via Cloudflare tunnel URLs

🤖 Generated with Claude Code

On macOS, Docker containers reach the host via host.docker.internal
which maps to 192.168.65.254, not loopback. Default bindAddr of
['authn.localhost'] only listens on 127.0.0.1, causing connection
refused from cloudflared's mediator-tunnel container.

Note: 0.0.0.0 also exposes the mediator on all LAN interfaces.
Acceptable for local dev; avoid on shared/corporate networks.

@dlongley dlongley left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a changelog entry and needs to be checked against deployment configs to ensure that those don't need any changes as a result of it.

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.

3 participants