> :bulb: **Tip:** The recommended configuration method is through environment variables.
## Node configuration methods
One node can be configured using a combination of the following methods:
1. Command line options and flags
2. Environment variables
3. Configuration file (currently, only TOML format is supported)
4. Default value
Note the precedence order, each configuration mechanism overrides the configuration set by one below (e.g., _command line options_ override the configuration set by the _environment variables_ and by the _configuration file_).
### Command line options/flags
The main mechanism to configure the node is via command line options. Any configuration option provided via the command line will override any other configuration mechanism.
> :warning: nwaku is under heavy development. It is likely that configuration will change from one version to another.
>
> If after an upgrade, the node refuses to start, check if any of the command line configuration options provided to the node have been changed or removed.
>
> To overcome this issue, we recommend to configure the node via environment variables.
The configuration options should be provided after the binary name as follows:
```shell
wakunode2 --tcp-port=65000
```
In the case of using docker to run you node you should provide the commandline options after the image name as follows:
Run `wakunode2 --help` to get a comprehensive list of configuration options (and its default values):
```shell
$ wakunode2 --help
Usage:
wakunode2 [OPTIONS]...
The following options are available:
--config-file Loads configuration from a TOML file (cmd-line parameters take precedence).
--log-level Sets the log level. [=LogLevel.INFO].
--version prints the version [=false].
<...>
```
Check the configuration tutorials for specific configuration use cases.
### Environment variables
The node can also be configured via environment variables.
> :information_source: Support for configuring the node via environment variables was added in v0.13.0
The environment variable name should be prefixed by the app's name, in this case `WAKUNODE2_` followed by the commandline option in [screaming snake case](https://en.wiktionary.org/wiki/screaming_snake_case).
For example, to set the `--tcp-port` configuration we should call `wakunode2` binary as follows:
```shell
WAKUNODE2_TCP_PORT=65000 wakunode2
```
In the case of using docker to run you node you should start the node using the `-e` command options:
The third configuration mechanism in order of precedence is the configuration via a TOML file. The previous mechanisms take precedence over this mechanism as explained above.