[PR #5357] [self-hosted] Better port mapping when using docker network #22799

Open
opened 2026-08-05 06:06:24 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/5357
Author: @afonsofrancof
Created: 2/16/2026
Status: 🔄 Open

Base: mainHead: compose-port-mapping


📝 Commits (3)

  • 974ccb7 fix(script): Remove port binding when using docker network
  • ab33d29 fix(script): Only prompt for localhost bind if not using a docker network
  • 17a65ef fix(script): Readded port mapping for the stun service

📊 Changes

1 file changed (+20 additions, -11 deletions)

View changed files

📝 infrastructure_files/getting-started.sh (+20 -11)

📄 Description

Changes

  1. Removed the port binding, when using a docker network, and replaced it with the "expose" key. This makes it so the port is only exposed inside the docker network and not mapped to a host port (stun is still mapped to the host).
  2. Removed the "localhost only binding" prompt, if the user specified a docker network.

Summary by CodeRabbit

  • New Features
    • Improved port configuration for external proxy deployments: prompts for host port binding only when needed, and automatically switches to internal port exposure when an external Docker network is used.
    • Dashboard, server and STUN ports handled consistently based on network choice, reducing manual configuration and simplifying generated deployment configuration.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/5357 **Author:** [@afonsofrancof](https://github.com/afonsofrancof) **Created:** 2/16/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `compose-port-mapping` --- ### 📝 Commits (3) - [`974ccb7`](https://github.com/netbirdio/netbird/commit/974ccb74f3109526f3befb7cf853b9baffb10837) fix(script): Remove port binding when using docker network - [`ab33d29`](https://github.com/netbirdio/netbird/commit/ab33d294e23b7722cd4097c1469e4140eb539dd9) fix(script): Only prompt for localhost bind if not using a docker network - [`17a65ef`](https://github.com/netbirdio/netbird/commit/17a65ef07b7bc81ab57335cfc1deccd8a5ea9b13) fix(script): Readded port mapping for the stun service ### 📊 Changes **1 file changed** (+20 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `infrastructure_files/getting-started.sh` (+20 -11) </details> ### 📄 Description # Changes 1. Removed the port binding, when using a docker network, and replaced it with the "expose" key. This makes it so the port is only exposed inside the docker network and not mapped to a host port (stun is still mapped to the host). 2. Removed the "localhost only binding" prompt, if the user specified a docker network. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Improved port configuration for external proxy deployments: prompts for host port binding only when needed, and automatically switches to internal port exposure when an external Docker network is used. * Dashboard, server and STUN ports handled consistently based on network choice, reducing manual configuration and simplifying generated deployment configuration. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 06:06:24 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#22799