> ## 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 the IDE extension with self-hosted CodeRabbit

> Connect the CodeRabbit IDE extension in VS Code, Cursor, or another VS Code-based editor to your self-hosted CodeRabbit instance, and learn which tokens, hosts, and features differ from CodeRabbit Cloud.

Self-Hosted Only (This feature is available on self-hosted CodeRabbit deployments only. It is not available on CodeRabbit Cloud.)

The extension can connect directly to your [self-hosted CodeRabbit](https://docs.coderabbit.ai/self-hosted/overview.md) instance instead of CodeRabbit Cloud. It skips CodeRabbit Cloud sign-in and sends reviews to your instance. To connect the CLI to the same instance, see [Use with self-hosted CodeRabbit](https://docs.coderabbit.ai/cli/cli-with-self-hosted-CodeRabbit.md).

## Before you begin

* The machine running the extension can reach your instance over HTTPS, and over WebSocket at `<instance-url>/ws`. In remote and container workspaces, that is the remote machine.
* `GET <instance-url>/health` returns status 200 with the body `OK` within 5 seconds.
* Your Git provider is GitHub, GitHub Enterprise Server, GitLab, or Self-Hosted GitLab. The extension doesn't offer Azure DevOps or Bitbucket.
* For GitHub and GitHub Enterprise Server, you have a personal access token. GitLab and Self-Hosted GitLab need no token in the extension.
* The workspace is trusted.

## Connect to your instance

**1. Sign out of CodeRabbit Cloud**

If you're signed in to CodeRabbit Cloud, run **CodeRabbit: Logout**.

**2. Start the self-hosted sign-in**

In the CodeRabbit sidebar, select **Self hosting CodeRabbit?** below **Sign in with browser**.

**3. Confirm your email**

The extension uses your Git email from `git config user.email`. If it can't read one, enter your email when prompted. To set it for Git, run `git config --global user.email "you@example.com"`.

**4. Enter the instance URL**

Enter your instance URL when prompted. The extension checks `/health` on that URL and saves it as `coderabbit.selfHostedUrl` in your user settings. If the check fails, you see "Could not connect to self-hosted instance".

**5. Pick your Git provider**

Choose **GitHub**, **GitHub Enterprise Server**, **GitLab**, or **Self-Hosted GitLab**.

**6. Enter a GitHub token**

For GitHub and GitHub Enterprise Server, enter your personal access token. The extension keeps it in the editor's secret storage and sends it to your instance with each review. Your instance can use it to look up your GitHub account by your email.

The extension doesn't test the token at sign-in, and it shows no error when the token expires or is revoked.

## Where the URL is stored

The instance URL is the `coderabbit.selfHostedUrl` setting. Only the value in your local user settings counts; the extension ignores workspace and remote settings, so a repository can't redirect your reviews. You can't set it through enterprise or group policy.

If `coderabbit.selfHostedUrl` is already set when you select **Self hosting CodeRabbit?**, the extension uses it without asking for the URL and without the health check.

> [!WARNING]
>
> In a workspace you haven't trusted, the extension ignores the self-hosted URL and works as with CodeRabbit Cloud. It contacts the CodeRabbit Cloud hosts, and reviews go to CodeRabbit Cloud if you're signed in there; otherwise the sidebar shows the CodeRabbit Cloud sign-in. Trust the workspace to use your instance. See [Restricted Mode](https://docs.coderabbit.ai/ide/settings.md#restricted-mode).

## What's different from CodeRabbit Cloud

* No **Account & usage** button, plan, or usage dialog.
* No upgrade prompts.
* No **Give feedback** and no **Provide feedback** on findings.
* No automatic organization matching.
* No prompt to connect the repository for pull request reviews.
* No sign-in notification at startup.
* No usage telemetry to CodeRabbit. The extension still checks `storage.googleapis.com` for new versions; see [Network access](https://docs.coderabbit.ai/ide/privacy.md#network-access) for every host.

## Sign out or switch back to Cloud

> [!WARNING]
>
> **CodeRabbit: Logout** clears the self-hosted URL from your user settings and deletes the stored GitHub token. If you sync your editor settings, the URL is cleared on your other computers too. To use your instance again, connect with **Self hosting CodeRabbit?** and enter the URL and token again.

To switch to CodeRabbit Cloud, sign out, then select **Sign in with browser**. See [Sign in and manage your account](https://docs.coderabbit.ai/ide/sign-in.md).

## What's next

> **[Run a review](https://docs.coderabbit.ai/ide/review.md)**
>
> Choose the changes and base branch to review, then start a review against your instance.

> **[Data, privacy, and network access](https://docs.coderabbit.ai/ide/privacy.md)**
>
> See what a review sends, which hosts the extension contacts with a self-hosted URL, and what stays on your computer.

> **[Troubleshooting](https://docs.coderabbit.ai/ide/troubleshooting.md#self-hosted)**
>
> Fix failed health checks and connections that go to CodeRabbit Cloud instead of your instance.


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