[GH-ISSUE #4830] Service and Config flags not being respected properly #9405

Open
opened 2026-08-05 01:22:00 -04:00 by saavagebueno · 0 comments
Owner

Originally created by @PowershellScripter on GitHub (Nov 21, 2025).
Original GitHub issue: https://github.com/netbirdio/netbird/issues/4830

Describe the problem

When trying to configure a custom path for the config.json file, Several things do not work properly. flags were changed, others are not being respected.

Issue 1: custom config paths are not being respected. Used "C:\ProgramData\Company\VPN\config.json" and netbird up wouldn't allow connection when using custom path in Windows

Issue 2: The cross between ENV variables and flags is extremely messy. Not all flags can be ENV variables and not all ENV variables are being respected as they conflict with depricated flags.

Issue 3: Certain 'netbird service reconfigure' and 'netbird service install' flags spit out warnings when being used. See snippet 2 "result"

To Reproduce

snippet of commands ran to configure the service before setting up the peer

snippet 1:

netbird up --setup-key *****-****-****-************ --config "C:\ProgramData\Company\VPN\config.json"
Warning: Config flag is deprecated on up command, it should be set as a service argument with $NB_CONFIG environment or with "-config" flag; netbird service reconfigure --service-env="NB_CONFIG=<file_path>" or netbird service run --config=<file_path>

Connected

This above command should error out and not let the peer connect on depricated commands. If the config import is important during connection, it should prevent the connection upon error

snippet 2:

PS C:\> netbird service reconfigure --disable-profiles --disable-update-settings --config "C:\ProgramData\Netbird\default.json"
Stopping NetBird service...
Removing existing service configuration...
Installing service with new configuration...
Starting NetBird service...
NetBird service has been reconfigured and started

result:

PS C:\> netbird up --setup-key ********-*****-*****-***************
2025-11-20T22:55:06-07:00 WARN client/cmd/up.go:261: setConfig method is not available in the daemon

snippet 3:

PS C:\> netbird deregister
Deregistered successfully

PS C:\> netbird down
Disconnected

PS C:\> netbird service uninstall
NetBird service has been uninstalled

PS C:\> netbird service install --config "C:\ProgramData\Netbird\Custom\default.json"
Error: install service: service Netbird already exists

PS C:\> netbird service reconfigure --disable-profiles --disable-update-settings --config "C:\ProgramData\Netbird\Custom\default.json"
Removing existing service configuration...
Error: uninstall existing service: service Netbird is not installed

Expected behavior

Its expected to setup a config file (specifically an admin config [for machine based peer]) prior to doing a 'netbird up' so that mass deployment scripts can have pre configured settings set before connections.

There needs to be a more refined way to configure mass deployment setups and have deprecated flags be removed from play.
If config is depricated.. remove it! Let the daemon spit out an error saying the flag doesnt exist

This documentation needs to be updated as their is outdated information relating to depricated flags and ways to set certain flags and variables

https://docs.netbird.io/how-to/cli#environment-variables

There should be an option to set certain administrative settings in the registry, rather than a config file and flags. Specifically if setting the peer as a machine connection rather than a user connection.

Are you using NetBird Cloud?

Self Hosted (but problem exists with client)

NetBird version

0.60.2

Is any other VPN software installed?

no

Debug output

Create upon request

Originally created by @PowershellScripter on GitHub (Nov 21, 2025). Original GitHub issue: https://github.com/netbirdio/netbird/issues/4830 **Describe the problem** When trying to configure a custom path for the config.json file, Several things do not work properly. flags were changed, others are not being respected. Issue 1: custom config paths are not being respected. Used "C:\ProgramData\Company\VPN\config.json" and netbird up wouldn't allow connection when using custom path in Windows Issue 2: The cross between ENV variables and flags is extremely messy. Not all flags can be ENV variables and not all ENV variables are being respected as they conflict with depricated flags. Issue 3: Certain 'netbird service reconfigure' and 'netbird service install' flags spit out warnings when being used. See snippet 2 "result" **To Reproduce** snippet of commands ran to configure the service before setting up the peer snippet 1: ``` netbird up --setup-key *****-****-****-************ --config "C:\ProgramData\Company\VPN\config.json" Warning: Config flag is deprecated on up command, it should be set as a service argument with $NB_CONFIG environment or with "-config" flag; netbird service reconfigure --service-env="NB_CONFIG=<file_path>" or netbird service run --config=<file_path> Connected ``` This above command should error out and not let the peer connect on depricated commands. If the config import is important during connection, it should prevent the connection upon error snippet 2: ``` PS C:\> netbird service reconfigure --disable-profiles --disable-update-settings --config "C:\ProgramData\Netbird\default.json" Stopping NetBird service... Removing existing service configuration... Installing service with new configuration... Starting NetBird service... NetBird service has been reconfigured and started ``` result: ``` PS C:\> netbird up --setup-key ********-*****-*****-*************** 2025-11-20T22:55:06-07:00 WARN client/cmd/up.go:261: setConfig method is not available in the daemon ``` snippet 3: ``` PS C:\> netbird deregister Deregistered successfully PS C:\> netbird down Disconnected PS C:\> netbird service uninstall NetBird service has been uninstalled PS C:\> netbird service install --config "C:\ProgramData\Netbird\Custom\default.json" Error: install service: service Netbird already exists PS C:\> netbird service reconfigure --disable-profiles --disable-update-settings --config "C:\ProgramData\Netbird\Custom\default.json" Removing existing service configuration... Error: uninstall existing service: service Netbird is not installed ``` **Expected behavior** Its expected to setup a config file (specifically an admin config [for machine based peer]) prior to doing a 'netbird up' so that mass deployment scripts can have pre configured settings set before connections. There needs to be a more refined way to configure mass deployment setups and have deprecated flags be removed from play. If config is depricated.. remove it! Let the daemon spit out an error saying the flag doesnt exist This documentation needs to be updated as their is outdated information relating to depricated flags and ways to set certain flags and variables https://docs.netbird.io/how-to/cli#environment-variables There should be an option to set certain administrative settings in the registry, rather than a config file and flags. Specifically if setting the peer as a machine connection rather than a user connection. **Are you using NetBird Cloud?** Self Hosted (but problem exists with client) **NetBird version** `0.60.2` **Is any other VPN software installed?** no **Debug output** Create upon request
saavagebueno added the triage-needed label 2026-08-05 01:22:00 -04:00
Sign in to join this conversation.
No Label triage-needed
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#9405