netbird icon indicating copy to clipboard operation
netbird copied to clipboard

NB_{WIREGUARD_PORT,INTERFACE_NAME} is not supported by anything except `netbird up`

Open nazarewk opened this issue 1 year ago • 2 comments
trafficstars

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:

  1. run netbird for the first time
  2. set Environment=NB_WIREGUARD_PORT=12345
  3. restart netbird.service
  4. netbird still runs on port 51820
  5. run netbird down
  6. 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

nazarewk avatar Feb 12 '24 12:02 nazarewk

The Current implementation doesn't cover service. We will need to extend this.

surik avatar Feb 13 '24 09:02 surik

For more complete experience I think when netbird service run is configured with interface/port:

  1. it should have the highest priority
  2. should not be overridable by other tools at all
  3. should return errors/warning for other means of configuration netbird up / netbird-ui https://github.com/netbirdio/netbird/issues/1581

nazarewk avatar Feb 14 '24 04:02 nazarewk