diff --git a/src/pages/how-to/cli.mdx b/src/pages/how-to/cli.mdx index bfc65c15..64266907 100644 --- a/src/pages/how-to/cli.mdx +++ b/src/pages/how-to/cli.mdx @@ -18,6 +18,16 @@ netbird [command] [subcommand] [flags] To see detailed command information, use the flag `--help` after each command +## 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 `.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.