[GH-ISSUE #4874] As TURN has been removed in the latest version, if I want to add an external host as another relay, is there a guide help me do this? #9996

Open
opened 2026-08-05 01:24:17 -04:00 by saavagebueno · 2 comments
Owner

Originally created by @flhs0606 on GitHub (Nov 28, 2025).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/4874

Or is there an official docker compose to do this?

Originally created by @flhs0606 on GitHub (Nov 28, 2025). Original GitHub issue: https://github.com/netbirdio/netbird/issues/4874 Or is there an official docker compose to do this?
Author
Owner

@PowershellScripter commented on GitHub (Nov 29, 2025):

an HTTPS relay will require a round robin load balancer. A STUN server will only require being added to the management config, like so.

Additionally, opening the necessary firewall ports. Follow the same config for the first STUN server.

The docker container used for the first STUN server, just mirror that for the other STUN servers, config wise.

The steps would be as follows:

  1. Create Coturn docker container on additional external host
  2. Open necessary ports and verify reachable via [ https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/ ]
  3. Add additional STUN protocol via the management config
  4. Restart Netbird container or server
Image
<!-- gh-comment-id:3591906958 --> @PowershellScripter commented on GitHub (Nov 29, 2025): an HTTPS relay will require a round robin load balancer. A STUN server will only require being added to the management config, like so. Additionally, opening the necessary firewall ports. Follow the same config for the first STUN server. The docker container used for the first STUN server, just mirror that for the other STUN servers, config wise. The steps would be as follows: 1. Create Coturn docker container on additional external host 2. Open necessary ports and verify reachable via [ https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/ ] 3. Add additional STUN protocol via the management config 4. Restart Netbird container or server <img width="530" height="549" alt="Image" src="https://github.com/user-attachments/assets/ec697bba-efcc-453b-8896-5da5c88db16f" />
Author
Owner

@flhs0606 commented on GitHub (Jan 19, 2026):

an HTTPS relay will require a round robin load balancer. A STUN server will only require being added to the management config, like so.

Additionally, opening the necessary firewall ports. Follow the same config for the first STUN server.

The docker container used for the first STUN server, just mirror that for the other STUN servers, config wise.

The steps would be as follows:

  1. Create Coturn docker container on additional external host
  2. Open necessary ports and verify reachable via [ https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/ ]
  3. Add additional STUN protocol via the management config
  4. Restart Netbird container or server
Image

I add a relay server instead. Sometimes it works(Latency: 80ms), sometimes don‘t and fallback to main server(Latency: 300ms).
management config:
"Relay": {
"Addresses": [
"rels://example1:443", #main server
"rels://example2:44443" #new relay server
],
"CredentialsTTL": "24h0m0s",
"Secret": "your secret"
},

relay server docker-compose:
services:

relay:
image: netbirdio/relay:latest
restart: unless-stopped
network_mode: host
environment:
- NB_LOG_LEVEL=info
- NB_LISTEN_ADDRESS=:44443
- NB_EXPOSED_ADDRESS=rels://example2:44443
- NB_AUTH_SECRET=your secret
- NB_TLS_CERT_FILE=/pathto/fullchain.pem
- NB_TLS_KEY_FILE=/pathto/privkey.pem
volumes:
- /pathto/letsencrypt:/pathto/letsencrypt
logging:
driver: "json-file"
options:
max-size: "500m"
max-file: "2"

<!-- gh-comment-id:3770523081 --> @flhs0606 commented on GitHub (Jan 19, 2026): > an HTTPS relay will require a round robin load balancer. A STUN server will only require being added to the management config, like so. > > Additionally, opening the necessary firewall ports. Follow the same config for the first STUN server. > > The docker container used for the first STUN server, just mirror that for the other STUN servers, config wise. > > The steps would be as follows: > > 1. Create Coturn docker container on additional external host > 2. Open necessary ports and verify reachable via [ https://webrtc.github.io/samples/src/content/peerconnection/trickle-ice/ ] > 3. Add additional STUN protocol via the management config > 4. Restart Netbird container or server > > <img alt="Image" width="530" height="549" src="https://private-user-images.githubusercontent.com/71091773/520417602-ec697bba-efcc-453b-8896-5da5c88db16f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njg4Njc3MjUsIm5iZiI6MTc2ODg2NzQyNSwicGF0aCI6Ii83MTA5MTc3My81MjA0MTc2MDItZWM2OTdiYmEtZWZjYy00NTNiLTg4OTYtNWRhNWM4OGRiMTZmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTIwVDAwMDM0NVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFkZGYwMmVjMDhiYTczOGRjZjljNDZlNmJjZTgyOGNiODVlYzIxNmUwZDhiYjcxMGJlOTc4MzkxMmNlZGU5YjMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.9EqJsO7kVdVcnMX9v14PssvZ9tr3vQLMUJuc9hLJB5M"> I add a relay server instead. Sometimes it works(Latency: 80ms), sometimes don‘t and fallback to main server(Latency: 300ms). management config: "Relay": { "Addresses": [ "rels://example1:443", #main server "rels://example2:44443" #new relay server ], "CredentialsTTL": "24h0m0s", "Secret": "your secret" }, relay server docker-compose: services: relay: image: netbirdio/relay:latest restart: unless-stopped network_mode: host environment: - NB_LOG_LEVEL=info - NB_LISTEN_ADDRESS=:44443 - NB_EXPOSED_ADDRESS=rels://example2:44443 - NB_AUTH_SECRET=your secret - NB_TLS_CERT_FILE=/pathto/fullchain.pem - NB_TLS_KEY_FILE=/pathto/privkey.pem volumes: - /pathto/letsencrypt:/pathto/letsencrypt logging: driver: "json-file" options: max-size: "500m" max-file: "2"
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#9996