> For the complete documentation index, see [llms.txt](https://docs.ox.security/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ox.security/vibesec/installing-vibesec/installing-vibesec-on-premises.md).

# Installing VibeSec On-Premises

Use this procedure to install VibeSec when your organization uses a self-hosted (on-premises) OX Security deployment.

Unlike SaaS deployments, on-premises deployments don't support OAuth authentication. Instead, VibeSec authenticates by using an OX API key.

## What the installation script does

When you run the installation script, it:

1. Downloads a standalone Node.js runtime into `~/.ox/node/`. A system-wide Node.js installation isn't required.
2. Downloads the VibeSec installation package from your on-premises OX platform.
3. Installs the VibeSec hooks for the selected IDE.
4. Registers the hooks in the IDE configuration.
5. Stores the API key and the on-premises OX platform URL in `~/.<ide>/.ox.json`.

## Prerequisites

Before you begin, make sure you have the following:

| Requirement     | Description                                                                                        |
| --------------- | -------------------------------------------------------------------------------------------------- |
| OX platform URL | The URL of your on-premises OX deployment, for example `https://ox.yourcompany.com`.               |
| OX account      | An account with permission to generate API keys.                                                   |
| Network access  | Access to your on-premises OX platform, `nodejs.org`, and `ox-vibesec.s3.eu-west-1.amazonaws.com`. |

## [Step 1: Generate an API key](/vibesec/installing-vibesec/creating-new-vibesec-tokens.md)

## Step 2: Install VibeSec

Run the installation command for your operating system.

The installation script supports the following parameters:

| Parameter      | Description                                                                                                                                            |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `<IDE>`        | The IDE to install VibeSec for. Supported values are `claude`, `cursor`, and `copilot`. Omit this parameter to install VibeSec for all supported IDEs. |
| `<ONPREM_URL>` | The URL of your on-premises OX deployment, for example `https://ox.yourcompany.com`.                                                                   |
| `<API_TOKEN>`  | The API key secret generated in Step 1.                                                                                                                |

> **Important:** Verify that the `--base-url` parameter points to your on-premises OX platform. If the parameter is omitted or contains an invalid value, the installation script connects to the default OX SaaS environment instead.

### macOS or Linux

Install VibeSec for a specific IDE.

```bash
curl -fsSL https://ox-vibesec.s3.eu-west-1.amazonaws.com/vibesec-installation/install.sh \
  | bash -s -- --ide <IDE> --base-url <ONPREM_URL> --token <API_TOKEN>
```

Install VibeSec for all supported IDEs.

```bash
curl -fsSL https://ox-vibesec.s3.eu-west-1.amazonaws.com/vibesec-installation/install.sh \
  | bash -s -- --base-url <ONPREM_URL> --token <API_TOKEN>
```

### Windows (PowerShell)

Install VibeSec for a specific IDE.

```powershell
& ([scriptblock]::Create((irm https://ox-vibesec.s3.eu-west-1.amazonaws.com/vibesec-installation/install.ps1))) `
  -Ide <IDE> -BaseUrl <ONPREM_URL> -Token <API_TOKEN>
```

Install VibeSec for all supported IDEs.

```powershell
& ([scriptblock]::Create((irm https://ox-vibesec.s3.eu-west-1.amazonaws.com/vibesec-installation/install.ps1))) `
  -BaseUrl <ONPREM_URL> -Token <API_TOKEN>
```

## Uninstall VibeSec

### macOS or Linux

Download the uninstallation script.

```bash
curl -fsSL https://ox-vibesec.s3.eu-west-1.amazonaws.com/vibesec-installation/uninstall_ox_hooks.js \
  -o /tmp/uninstall_ox_hooks.js
```

Remove VibeSec from all supported IDEs.

```bash
~/.ox/node/bin/node /tmp/uninstall_ox_hooks.js
```

Remove VibeSec from a specific IDE.

```bash
~/.ox/node/bin/node /tmp/uninstall_ox_hooks.js --ide <IDE>
```

Where `<IDE>` is one of the following:

* `claude`
* `cursor`
* `copilot`

### Windows (PowerShell)

Download the uninstallation script.

```powershell
$uninstallPath = Join-Path $env:TEMP "uninstall_ox_hooks.js"

Invoke-WebRequest `
  -Uri "https://ox-vibesec.s3.eu-west-1.amazonaws.com/vibesec-installation/uninstall_ox_hooks.js" `
  -OutFile $uninstallPath -UseBasicParsing
```

Remove VibeSec from all supported IDEs.

```powershell
& "$env:USERPROFILE\.ox\node\v22.11.0\node.exe" $uninstallPath
```

Remove VibeSec from a specific IDE.

```powershell
& "$env:USERPROFILE\.ox\node\v22.11.0\node.exe" $uninstallPath --ide <IDE>
```

Where `<IDE>` is one of the following:

* `claude`
* `cursor`
* `copilot`


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ox.security/vibesec/installing-vibesec/installing-vibesec-on-premises.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
