2017-01-15 17:59:32 +00:00
# Configuration
## Configuration Methods
2021-08-15 06:34:54 +00:00
Renovate global config can be defined via any of these methods:
2017-01-15 17:59:32 +00:00
2018-05-28 07:26:22 +00:00
- Configuration file
2020-11-12 12:40:27 +00:00
- Environment variables
- CLI parameters
2017-12-02 19:29:55 +00:00
2019-09-09 02:16:04 +00:00
The above are listed in **_reverse order_** of preference. e.g. CLI values will override environment values if they conflict.
2017-01-15 17:59:32 +00:00
### Default Configuration
2021-08-15 05:25:30 +00:00
The default configuration values can be found in [lib/config/options/index.ts ](../../lib/config/options/index.ts ).
2021-08-15 06:34:54 +00:00
Options which have `"globalOnly": true` are reserved only for bot global configuration and cannot be configured within repository config files.
2017-01-15 17:59:32 +00:00
### Configuration File
2020-11-02 08:52:37 +00:00
You can override default configuration using a configuration file, with default name `config.js` in the working directory.
If you need an alternate location or name, set it in the environment variable `RENOVATE_CONFIG_FILE` .
2017-01-15 17:59:32 +00:00
2020-11-02 08:52:37 +00:00
Using a configuration file gives you very granular configuration options.
2020-11-12 12:40:27 +00:00
For instance, you can override most settings at the global (file), repository, or package level.
e.g. apply one set of labels for `backend/package.json` and a different set of labels for `frontend/package.json` in the same repository.
2017-01-15 17:59:32 +00:00
```javascript
module.exports = {
2019-05-22 12:40:36 +00:00
npmrc: '//registry.npmjs.org/:_authToken=abc123',
baseDir: '/tmp/renovate',
includeForks: true,
gradle: { enabled: false },
2017-12-02 19:29:55 +00:00
};
2017-01-15 17:59:32 +00:00
```
### CLI
```
2021-03-09 21:58:00 +00:00
node renovate --help
2017-01-15 17:59:32 +00:00
```
2020-11-02 08:52:37 +00:00
To configure any `<list>` items, separate with commas.
E.g. `renovate --labels=renovate,dependency` .
2017-04-26 19:51:14 +00:00
2021-01-19 09:29:45 +00:00
To enable debug logging export `LOG_LEVEL=debug` to your environment.
2017-01-18 18:55:03 +00:00
### renovate.json
2019-09-09 02:16:04 +00:00
If you add a `renovate.json` file to the root of your repository, you can use this to override default settings.
2017-01-18 18:55:03 +00:00
2017-01-15 17:59:32 +00:00
### package.json
2020-11-02 08:52:37 +00:00
If you add configuration options to your `package.json` then these will override any other settings above.
2017-01-15 17:59:32 +00:00
```json
"renovate": {
"labels": [
"upgrade",
"bot"
]
}
```
## Configuration Options
2019-08-27 11:11:25 +00:00
Please see [https://docs.renovatebot.com/configuration-options/ ](https://docs.renovatebot.com/configuration-options/ ) for a list of user-facing configuration options.
2018-01-11 09:43:55 +00:00
2021-08-15 05:25:30 +00:00
For further options when running your own instance of Renovate, please see the full config options file at `lib/config/options/index.ts` .