Two meanings of self-hosted
The word covers two different setups. Configuration works differently in each.
If you connect GitHub Enterprise Server or self-managed GitLab to CodeRabbit Cloud, skip to Central configuration and Workspace settings. This page doesnât apply to you.
The priority order on self-hosted CodeRabbit
From highest to lowest priority:
CodeRabbit uses the first layer that exists as the starting layer. Other layers join only through
inheritance: true. In that case the parents merge in the order central, then environment YAML, then defaults. See Inheritance and merging.
CodeRabbit never reads Repository settings, Organization defaults or workspace settings on self-hosted CodeRabbit. It skips workspace global overrides and workspace defaults.
Set an instance-wide base with YAML_CONFIG
YAML_CONFIG is an environment variable that holds configuration YAML as one string. It sets the base for every repository that doesnât get its own settings from a repository file or the central repository. Set it with the other environment variables of your CodeRabbit deployment.
- Escapes. Write line breaks as the literal characters
\n. CodeRabbit also expands\rand\t. - Parsed like a repository file. It supports
inheritance. It doesnât supportremote_config. - Errors. A parse failure is logged and ignored, so the layer is skipped.
- Check it. Values from the variable show
# Source: Environment YAMLin the reply to@coderabbitai configuration.
Turn off repository or central files
Self-hosted CodeRabbit has no global overrides. To makeYAML_CONFIG the configuration of every repository instead of a fallback, turn off the files that outrank it with two environment variables:
Both default to
false. With both set, every review starts from YAML_CONFIG, or from schema defaults when it isnât set.
Configuration source
Self-hosted CodeRabbit always reads the repository file with Auto. Auto reads the pull request branch for trusted pull requests, and the base commit for fork pull requests and other authors. See Choose the configuration branch.What self-hosted CodeRabbit doesnât support
Whatâs next
Resolution order
Compare the CodeRabbit Cloud chain with this one.
Central configuration
Share a file across repositories.
Configuration in CLI and IDE reviews
See how local reviews pick up configuration.