> ## 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:

<CardGroup cols={2}>
  <Card title="CLI version" icon="download">
    CodeRabbit CLI version 0.3.5 or higher installed
  </Card>

  <Card title="Instance access" icon="server">
    The full URL for your self-hosted CodeRabbit instance, plus a GitHub Personal Access Token when you use a GitHub provider
  </Card>
</CardGroup>

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

<Steps>
  <Step title="Install CLI">
    Download and install the CodeRabbit CLI to start reviewing code locally.

    <Tabs>
      <Tab title="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>

      <Tab title="Homebrew">
        ```bash theme={null}
        brew install coderabbit
        ```

        If `coderabbit` is not available immediately after installation, start a new shell.
      </Tab>

      <Tab title="Windows">
        ```powershell PowerShell theme={null}
        irm https://cli.coderabbit.ai/install.ps1 | iex
        ```

        See [Install CodeRabbit CLI on Windows](/cli/windows) for prerequisites, version pinning, and troubleshooting. If `coderabbit` is not available immediately after installation, open a new PowerShell window.
      </Tab>
    </Tabs>
  </Step>

  <Step title="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.
  </Step>

  <Step title="Select your Git provider">
    Select GitHub, GitLab, GitHub Enterprise Server, or GitLab Self-hosted from the terminal list.
  </Step>

  <Step title="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.
  </Step>

  <Step title="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.
  </Step>

  <Step title="Finish setup">
    The CLI saves the self-hosted configuration, then confirms that authentication is complete. This terminal flow does not open a browser.
  </Step>
</Steps>


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