Give clients easy way to force relay-only connections #2041

Open
opened 2025-11-20 06:11:44 -05:00 by saavagebueno · 1 comment
Owner

Originally created by @willcipher on GitHub (Jul 4, 2025).

Is your feature request related to a problem? Please describe.
Though Netbird will fall back to using a relay when a P2P connection fails, there are some environments where it would be best to not even attempt P2P. (See Add support for Wireguard over TCP using mullvad's method of UDP tunneling over TCP, Achieving a Wireguard (P2P Netbird) connection when ISP censors Wireguard traffic | reddit) However, enabling the NB_FORCE_RELAY environment variable is cumbersome in some systems, impossible (?) in others.

Describe the solution you'd like
Exposing the NB_FORCE_RELAY setting via the CLI or user interface, rather than (or in addition to) an environment variable.

Describe alternatives you've considered
On a Mac, I've added an EnvironmentVariables key to /Library/LaunchDaemons/netbird.plist. Needless to say, that's not a terribly easy way to enable/disable this feature. I see that it's a bit onerous for Windows as well.

Additional context
On iOS/iPadOS, I'm not sure if there is a way to enable the NB_FORCE_RELAY setting.

Then again, I'm still new at Netbird—if there is an easier way to prompt a Netbird client to use only relays, please let me know, and feel free to close this feature request.

While I'm at it: Highest regards for the Netbird team! Thank you for this gem of a product. 😀

Originally created by @willcipher on GitHub (Jul 4, 2025). **Is your feature request related to a problem? Please describe.** Though Netbird will fall back to using a relay when a P2P connection fails, there are some environments where it would be best to not even attempt P2P. \(See [Add support for Wireguard over TCP using mullvad's method of UDP tunneling over TCP](https://github.com/netbirdio/netbird/issues/2367), [Achieving a Wireguard \(P2P Netbird\) connection when ISP censors Wireguard traffic | reddit](https://www.reddit.com/r/netbird/comments/1kc037u/achieving_a_wireguard_p2p_netbird_connection_when)\) However, enabling the `NB_FORCE_RELAY` environment variable is cumbersome in some systems, impossible (?) in others. **Describe the solution you'd like** Exposing the `NB_FORCE_RELAY` setting via the CLI or user interface, rather than (or in addition to) an environment variable. **Describe alternatives you've considered** On a Mac, I've added an [EnvironmentVariables](https://github.com/netbirdio/netbird/issues/2367#issuecomment-3035881552) key to `/Library/LaunchDaemons/netbird.plist`. Needless to say, that's not a terribly easy way to enable/disable this feature. I see that it's a bit [onerous](https://github.com/netbirdio/netbird/issues/730#issuecomment-1679113925) for Windows as well. **Additional context** On iOS/iPadOS, I'm not sure if there is a way to enable the `NB_FORCE_RELAY` setting. Then again, I'm still new at Netbird—if there is an easier way to prompt a Netbird client to use only relays, please let me know, and feel free to close this feature request. While I'm at it: **_Highest regards for the Netbird team!_** Thank you for this gem of a product. 😀
saavagebueno added the feature-requestclientclient-ui labels 2025-11-20 06:11:44 -05:00
Author
Owner

@nazarewk commented on GitHub (Jul 4, 2025):

This will be (at least partially) addressed by https://github.com/netbirdio/netbird/pull/3975: setting any envvars on a service with a CLI command

@nazarewk commented on GitHub (Jul 4, 2025): This will be (at least partially) addressed by https://github.com/netbirdio/netbird/pull/3975: setting any envvars on a service with a CLI command
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2041