> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coderabbit.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Use with self-hosted CodeRabbit

> Connect the CLI to your self-hosted CodeRabbit instance

Configure the CodeRabbit CLI to work with your organization’s self-hosted CodeRabbit instance. This setup gives you all the benefits of AI-powered code reviews while maintaining full control over your code and data.

## **Prerequisites**

Before connecting to your self-hosted instance, ensure:

> [card] CLI version
>
> CodeRabbit CLI version 0.3.5 or higher installed

> [card] Instance access
>
> The full URL for your self-hosted CodeRabbit instance, plus a GitHub Personal Access Token when you use a GitHub provider

## **Connect your self-hosted instance**

**1. Install CLI**

Download and install the CodeRabbit CLI to start reviewing code locally.

> [tab] Install script
>
> ```bash theme={null}
> curl -fsSL https://cli.coderabbit.ai/install.sh | sh
> ```
>
> If `coderabbit` is not available immediately after installation, start a new shell, or run the exact shell-specific reload command printed under **Next steps**. If the install script offers browser sign-in without first asking for a region, EU users should skip it and authenticate later with an explicit `--region eu`.

> [tab] Homebrew
>
> ```bash theme={null}
> brew install coderabbit
> ```
>
> If `coderabbit` is not available immediately after installation, start a new shell.

> [tab] Windows
>
> ```powershell PowerShell theme={null}
> irm https://cli.coderabbit.ai/install.ps1 | iex
> ```
>
> See [Install CodeRabbit CLI on Windows](https://docs.coderabbit.ai/cli/windows.md) for prerequisites, version pinning, and troubleshooting. If `coderabbit` is not available immediately after installation, open a new PowerShell window.

**2. Authenticate**

Link your CodeRabbit account to enable personalized reviews based on your team's patterns.

```bash theme={null}
coderabbit auth login --self-hosted
```

The remaining setup happens in the terminal.

**3. Select your Git provider**

Select GitHub, GitLab, GitHub Enterprise Server, or GitLab Self-hosted from the terminal list.

**4. Enter your self-hosted CodeRabbit URL**

Enter the full instance URL, including the protocol, such as `https://coderabbit.example.com`. The CLI verifies that the instance's health endpoint is reachable before saving the configuration.

**5. Enter a GitHub Personal Access Token when prompted**

GitHub and GitHub Enterprise Server providers require a GitHub Personal Access Token. GitLab providers do not prompt for one.

**6. Finish setup**

The CLI saves the self-hosted configuration, then confirms that authentication is complete. This terminal flow does not open a browser.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.