Files
renovate/docs/development/configuration.md
T
Jamie Tanna 128f446e08 docs: ensure that config in documentation is error and warning free (#43727)
* docs: skip validation on JSON files that aren't Renovate config

As part of future changes, we'll enable validation on all JSON code
snippets to run Config Validation.

Before we do that, we should opt-out JSON snippets that aren't anything
related to Renovate config.

* docs: don't validate invalid Renovate config

As it's intentionally referencing a manager that doesn't exist.

* docs: don't validate partial Renovate config

As part of future changes, we'll enable validation on all JSON code
snippets to run Config Validation.

There are several code snippets we have that are part of a Renovate JSON,
but it doesn't make sense to convert these to a fully passing config, as
it'd reduce clarity on what we're trying to explain.

* docs: convert `baseBranchPatterns` snippets to code blocks

So we can validate them.

* docs: make sure that `datasourceTemplate` is set

So this passes validation.

* docs: clarify that `force` is global config

As it may not be clear, so we can make it extra clear with a `.js` file,
and note that it's global self-hosted config.

* docs: make sure `packageRules` is an array

* docs: `matchBaseBranches` needs `baseBranchPatterns` to be set

* docs: correct typo for `prBodyColumns`

* docs: mark global config snippets as such

As part of future changes, we'll use this to detect whether it's global
self-hosted configuration.

* docs: make sure `packageRules` wraps its children

* docs: add `allowedHeaders`

* docs: ignore deprecation warnings

As part of future changes, we'll use this to note that we don't care
about the validation warnings.

* docs: make sure `customManagers` wraps its children

* docs: make sure `fleet` wraps its children

* docs: validate JSON snippets are valid Renovate config

To make sure that we're always presenting valid JSON configuration to
our users, we can validate them as part of `check-fenced-code`.

As well as configuration errors we can warn for warnings, but allow code
blocks to opt-out, for instance when there's a known deprecation
affecting the code block.

We need to make sure to set `allowedEnv` for various code snippets that
reference environment variables.

* docs(development): document fenced code block checks

* docs: wrap `configType` and `ignoreConfigWarnings` in `{ ... }`

As otherwise we see build failures i.e.

    WARNING -  Doc file 'modules/platform/gitlab/index.md' contains a link
       '../../../self-hosted-configuration.md#autodiscoverrepoorder', but the doc
       'self-hosted-configuration.md' does not contain an anchor '#autodiscoverrepoorder'.

This needs to be wrapped alongside all other options like `title`.

* fixup! docs: wrap `configType` and `ignoreConfigWarnings` in `{ ... }`
2026-06-02 13:29:48 +00:00

2.9 KiB

Configuration

Configuration Methods

Renovate global config can be defined via any of these methods:

  • Configuration file
  • Additional configuration file
  • Environment variables
  • CLI parameters

The above are listed in reverse order of preference. e.g. CLI values will override environment values if they conflict.

Default Configuration

The default configuration values can be found in lib/config/options/index.ts. Options which have "globalOnly": true are reserved only for bot global configuration and cannot be configured within repository config files.

Configuration File

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.

You can also add one more configuration file, with an additional config which overwrites the default config file. To use such a file, you need to set the env var RENOVATE_ADDITIONAL_CONFIG_FILE as this file does not have a default name.

Note: RENOVATE_CONFIG_FILE and RENOVATE_ADDITIONAL_CONFIG_FILE must be provided with an explicit file extension. For example RENOVATE_CONFIG_FILE=myconfig.js or RENOVATE_CONFIG_FILE=myconfig.json and not RENOVATE_CONFIG_FILE=myconfig. If none is provided, or the file type is invalid, Renovate will fail.

If you are in an ESM repo ("type": "module" in package.json) then you must use a .cjs extension and set RENOVATE_CONFIG_FILE. For example RENOVATE_CONFIG_FILE=myconfig.cjs.

Using a configuration file gives you very granular configuration options. 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.

module.exports = {
  npmrc: '//registry.npmjs.org/:_authToken=abc123',
  baseDir: '/tmp/renovate',
  forkProcessing: 'enabled',
  gradle: { enabled: false },
};

CLI

node renovate --help

To configure any <list> items, separate with commas. E.g. renovate --labels=renovate,dependency.

To enable debug logging export LOG_LEVEL=debug to your environment.

renovate.json

If you add a renovate.json file to the root of your repository, you can use this to override default settings.

package.json

If you add configuration options to your package.json then these will override any other settings above.

{
  "renovate": {
    "labels": ["upgrade", "bot"]
  }
}

Configuration Options

Please read our list of user-facing configuration options.

For further options when running your own instance of Renovate, please see the full config options file at lib/config/options/index.ts.