netbird
netbird copied to clipboard
NB_{WIREGUARD_PORT,INTERFACE_NAME} is not supported by anything except `netbird up`
Describe the problem
I am configuring wireguard interface/port using environment variables, but they do not get updated unless I run netbird up separately.
To Reproduce
Steps to reproduce the behavior:
- run netbird for the first time
- set
Environment=NB_WIREGUARD_PORT=12345 - restart
netbird.service - netbird still runs on port
51820 - run
netbird down - run
NB_WIREGUARD_PORT=12345 netbird up
Expected behavior
Netbrid starts on port 12345 with just systemd service change, not requiring separate down and up commands.
Are you using NetBird Cloud?
Yes
NetBird version
0.25.6
Additional context
Discovered while developing https://github.com/NixOS/nixpkgs/pull/287236
The Current implementation doesn't cover service. We will need to extend this.
For more complete experience I think when netbird service run is configured with interface/port:
- it should have the highest priority
- should not be overridable by other tools at all
- should return errors/warning for other means of configuration
netbird up/netbird-uihttps://github.com/netbirdio/netbird/issues/1581