[PR #3696] fix: traefik relay accessibility #3877

Open
opened 2025-11-20 08:07:15 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/3696

State: closed
Merged: Yes


Describe your changes

  • Remove commented lines on traefik template compose file

  • Fix relay accessibility with traefik reverse proxy (I think my understanding is correct, but please feel free to correct me if I got it wrong)

    • Instructions here mentioned to update NETBIRD_MGMT_API_PORT and NETBIRD_SIGNAL_PORT to be reverse-proxy TLS-port but not NETBIRD_RELAY_PORT, which defaults to 33080.

    • management.json.tmpl has relay address as rel://$NETBIRD_RELAY_DOMAIN:$NETBIRD_RELAY_PORT so it will resolve to <netbird_domain>:33080 which in case of using traefik is not accessible. relay should be accessible on
      <netbird_domain>:<reverse-proxy TLS-port>/relay

    • Updating traefik template to use port 33080 for relay internally. and I will open another PR to update the docs as well to include NETBIRD_RELAY_PORT along NETBIRD_MGMT_API_PORT and NETBIRD_SIGNAL_PORT.

    • Introduce NETBIRD_RELAY_ENDPOINT and use it on compose + management template files with value

      • rel://$NETBIRD_RELAY_DOMAIN:$NETBIRD_RELAY_PORT when NETBIRD_DISABLE_LETSENCRYPT=false
      • rels://$NETBIRD_DOMAIN:$NETBIRD_SIGNAL_PORT/relay when NETBIRD_DISABLE_LETSENCRYPT=true

I encountered this setting up a self-hosted instance with traefik, is there a way to verify the changes with my instance?
I tested with running netbird status -d I got

...
Relays: 
  [stun:mydomain.example.com:3478] is Available
  [turn:mydomain.example.com:3478?transport=udp] is Available
  [rels://mydomain.example.com:443/relay] is Available
...

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary
**Original Pull Request:** https://github.com/netbirdio/netbird/pull/3696 **State:** closed **Merged:** Yes --- ## Describe your changes - Remove commented lines on traefik template compose file - Fix relay accessibility with traefik reverse proxy (I think my understanding is correct, but please feel free to correct me if I got it wrong) - Instructions [here](https://github.com/netbirdio/docs/blob/main/src/pages/selfhosted/selfhosted-guide.mdx?plain=1#L155-L156) mentioned to update `NETBIRD_MGMT_API_PORT` and `NETBIRD_SIGNAL_PORT` to be `reverse-proxy TLS-port` but not `NETBIRD_RELAY_PORT`, which defaults to `33080`. - `management.json.tmpl` has relay address as `rel://$NETBIRD_RELAY_DOMAIN:$NETBIRD_RELAY_PORT` so it will resolve to `<netbird_domain>:33080` which in case of using traefik is not accessible. relay should be accessible on `<netbird_domain>:<reverse-proxy TLS-port>/relay` - Updating traefik template to use port `33080` for relay internally. and I will open another PR to update the docs as well to include `NETBIRD_RELAY_PORT` along `NETBIRD_MGMT_API_PORT` and `NETBIRD_SIGNAL_PORT`. - Introduce `NETBIRD_RELAY_ENDPOINT` and use it on compose + management template files with value - `rel://$NETBIRD_RELAY_DOMAIN:$NETBIRD_RELAY_PORT` when `NETBIRD_DISABLE_LETSENCRYPT=false` - `rels://$NETBIRD_DOMAIN:$NETBIRD_SIGNAL_PORT/relay` when `NETBIRD_DISABLE_LETSENCRYPT=true` I encountered this setting up a self-hosted instance with traefik, is there a way to verify the changes with my instance? I tested with running `netbird status -d` I got ``` ... Relays: [stun:mydomain.example.com:3478] is Available [turn:mydomain.example.com:3478?transport=udp] is Available [rels://mydomain.example.com:443/relay] is Available ... ``` ### Checklist - [x] Is it a bug fix - [ ] Is a typo/documentation fix - [ ] Is a feature enhancement - [x] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary
saavagebueno added the pull-request label 2025-11-20 08:07:15 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#3877