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

Open
opened 2025-11-20 05:14:52 -05:00 by saavagebueno · 2 comments
Owner

Originally created by @nazarewk on GitHub (Feb 12, 2024).

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

Originally created by @nazarewk on GitHub (Feb 12, 2024). **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
saavagebueno added the feature-requestclient labels 2025-11-20 05:14:52 -05:00
Author
Owner

@surik commented on GitHub (Feb 13, 2024):

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

@surik commented on GitHub (Feb 13, 2024): The Current implementation doesn't cover `service`. We will need to extend this.
Author
Owner

@nazarewk commented on GitHub (Feb 13, 2024):

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 commented on GitHub (Feb 13, 2024): 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
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#626