> ## 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="Clean setup" icon="log-out">
    Log out of the extension if you were previously connected to the managed
    service (`coderabbit auth logout`)
  </Card>
</CardGroup>

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

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

    <CodeGroup>
      ```bash Installation script theme={null}
      curl -fsSL https://cli.coderabbit.ai/install.sh | sh
      ```

      ```bash Homebrew theme={null}
      brew install coderabbit
      ```
    </CodeGroup>
  </Step>

  <Step title="Restart your shell">
    After installation, restart your shell or reload your shell configuration.

    ```bash theme={null}
    # Restart your shell or run:
    source ~/.zshrc
    ```
  </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
    ```

    This is going to ask you for more details in the further steps.
  </Step>

  <Step title="Select your Git provider">
    Select the Git provider from the list using arrow keys to connect the CLI with.
  </Step>

  <Step title="Enter your self-hosted CodeRabbit url">
    Provide your self-hosted CodeRabbit's url: "your-self-hosted-coderabbit-url/". Verify the url validation.
  </Step>

  <Step title="Complete sign-in in the browser">
    A browser window opens automatically. Sign in via your Git provider and the authentication completes in the browser.
  </Step>
</Steps>
