document configuration precedence for the CLI (#428)

This commit is contained in:
Krzysztof Nazarewski (kdn)
2025-09-18 14:51:40 +02:00
committed by GitHub
parent 5cd895ae7f
commit 0c3f576bc6

View File

@@ -18,6 +18,16 @@ netbird [command] [subcommand] [flags]
To see detailed command information, use the flag `--help` after each command
</Note>
## Configuration precedence
This is the CLI configuration precedence (highest to lowest priority):
1. environment variables (eg: `NB_WIREGUARD_PORT`)
2. command line flags (eg: `--wireguard-port`)
3. configuration file entries `<profile>.json` (formerly: `config.json`), eg: `WgPort` key
We are preserving the unusual priority of environment variables for backwards compatibility with existing deployments.
## Global flags
`netbird` has a set of global flags that are available in every command. They specify settings that are core or shared between two or more commands, e.g. `--setup-key` is used by `login` and `up` to authenticate the client against a management service.