Skip to content

Conversation

@t0mdavid-m
Copy link
Member

@t0mdavid-m t0mdavid-m commented Feb 10, 2026

Summary

Updated the nginx configuration to bind to all network interfaces instead of just the loopback interface when running in multi-server mode.

Changes

  • Modified nginx listen directive from listen 8501; to listen 0.0.0.0:8501;
    • This ensures nginx accepts connections on all available network interfaces, not just localhost
    • Allows external traffic to reach the load balancer in multi-instance deployments

Details

In multi-server configurations, the nginx reverse proxy needs to be accessible from outside the container. The previous configuration only listened on the default interface (typically localhost), which would prevent external clients from connecting to the load balancer. By explicitly binding to 0.0.0.0:8501, the nginx server now accepts connections on all IPv4 addresses, enabling proper load balancing across multiple Streamlit instances.

https://claude.ai/code/session_01721rHYJhSZfJnnUpWHXbVs

Summary by CodeRabbit

  • Chores
    • Updated Docker configuration to expose the application on all network interfaces instead of restricting access to localhost, enabling external connectivity in both single-instance and multi-instance deployment scenarios.

Change the nginx listen directive from `listen 8501` to
`listen 0.0.0.0:8501` so the load balancer explicitly accepts
connections on all network interfaces, not just the default.

https://claude.ai/code/session_01721rHYJhSZfJnnUpWHXbVs
@t0mdavid-m t0mdavid-m merged commit d76c62c into main Feb 10, 2026
2 of 7 checks passed
@coderabbitai
Copy link

coderabbitai bot commented Feb 10, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The Dockerfile's nginx configuration listener binding address has been modified from localhost-only (127.0.0.1:8501) to all interfaces (0.0.0.0:8501) in both multi-instance and single-instance setups, enabling external access to Streamlit instances through the reverse proxy.

Changes

Cohort / File(s) Summary
Nginx Configuration
Dockerfile
Changed nginx server listener binding from 127.0.0.1:8501 (localhost only) to 0.0.0.0:8501 (all interfaces) in both multi-instance and single-instance configurations.

Poem

🐰 A rabbit hops with glee,
The ports now open for all to see,
No longer bound to localhost's wall,
The nginx gateway welcomes all!
Connections flow from far and wide,
With 0.0.0.0 as our guide! 🌐

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/load-balancer-all-ips-OkNAd

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

t0mdavid-m added a commit that referenced this pull request Feb 10, 2026
Change the nginx listen directive from `listen 8501` to
`listen 0.0.0.0:8501` so the load balancer explicitly accepts
connections on all network interfaces, not just the default.

https://claude.ai/code/session_01721rHYJhSZfJnnUpWHXbVs

Co-authored-by: Claude <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.

2 participants