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

# Installation

> Deploy CodeThreat in SaaS or on-premise environments

CodeThreat offers flexible deployment to meet your security and infrastructure requirements.

## Deployment Options

<CardGroup cols={2}>
  <Card title="SaaS" icon="cloud">
    Fastest setup with zero infrastructure management
  </Card>

  <Card title="On-Premise" icon="server">
    Full control within your infrastructure
  </Card>
</CardGroup>

***

## SaaS Deployment

Get started immediately with our managed cloud platform.

### Requirements

* Modern web browser
* GitHub, GitLab, or Bitbucket account
* Admin access to repositories you want to scan

### Setup Steps

<Steps>
  <Step title="Create Account">
    Sign up at [app.codethreat.com/signup](https://app.codethreat.com/signup)
  </Step>

  <Step title="Configure Organization">
    Set up your organization settings and invite team members
  </Step>

  <Step title="Connect Repositories">
    Authorize CodeThreat to access your repositories

    <Info>
      We only request the minimum permissions needed for security scanning. Read our [security practices](https://codethreat.com/security) for details.
    </Info>
  </Step>

  <Step title="Install CLI (Optional)">
    ```bash theme={null}
    npm install -g @codethreat/cli
    # or
    pip install codethreat-cli
    ```
  </Step>
</Steps>

***

## On-Premise Deployment

Deploy CodeThreat within your own infrastructure for maximum control.

### System Requirements

**Docker**:

* CPU: 4+ cores
* RAM: 16GB minimum, 32GB recommended
* Storage: 100GB SSD
* Docker: 20.10+
* Docker Compose: 2.0+

**Kubernetes**:

* Kubernetes: 1.24+
* CPU: 8+ cores
* RAM: 32GB minimum
* Storage: 200GB persistent volume
* Ingress controller configured

### Docker Deployment

<Steps>
  <Step title="Pull Images">
    ```bash theme={null}
    docker pull codethreat/platform:latest
    docker pull codethreat/agents:latest
    docker pull codethreat/scanner:latest
    ```
  </Step>

  <Step title="Configure Environment">
    Create a `docker-compose.yml` with database, Redis, platform, and agent services
  </Step>

  <Step title="Start Services">
    ```bash theme={null}
    docker-compose up -d
    ```
  </Step>

  <Step title="Initialize Platform">
    ```bash theme={null}
    docker-compose exec platform codethreat init
    ```
  </Step>
</Steps>

### Kubernetes Deployment

<Steps>
  <Step title="Add Helm Repository">
    ```bash theme={null}
    helm repo add codethreat https://charts.codethreat.com
    helm repo update
    ```
  </Step>

  <Step title="Create Values File">
    Configure license, ingress, platform, agents, PostgreSQL, and Redis settings
  </Step>

  <Step title="Install Chart">
    ```bash theme={null}
    helm install codethreat codethreat/platform \
      -f values.yaml \
      --namespace codethreat \
      --create-namespace
    ```
  </Step>

  <Step title="Verify Deployment">
    ```bash theme={null}
    kubectl get pods -n codethreat
    kubectl logs -n codethreat -l app=codethreat-platform
    ```
  </Step>
</Steps>

***

## Post-Installation Configuration

### Configure Autonomous Agents

```bash theme={null}
codethreat config set agents.llm_provider openai
codethreat config set agents.model gpt-4
codethreat config set agents.contextual_analysis true
```

### Set Up Integrations

Configure your version control and CI/CD integrations:

<CardGroup cols={3}>
  <Card title="GitHub" icon="github" href="/integrations/github">
    GitHub App integration
  </Card>

  <Card title="GitLab" icon="gitlab" href="/integrations/gitlab">
    GitLab webhook setup
  </Card>

  <Card title="CI/CD" icon="arrows-spin" href="/automation/ci-cd-integration">
    Pipeline integration
  </Card>
</CardGroup>

### License Activation

**SaaS**: Your license is automatically activated upon signup. Visit [billing settings](https://app.codethreat.com/settings/billing) to manage your subscription.

**On-Premise**: Activate your license:

```bash theme={null}
codethreat license activate --key YOUR_LICENSE_KEY
```

Contact [sales@codethreat.com](mailto:sales@codethreat.com) for enterprise licensing.

***

## Verification

Confirm your installation is working:

```bash theme={null}
# Check platform status
codethreat status

# Run test scan
codethreat scan --project test-project --path ./sample-app

# View agent health
codethreat agents list
```

<Check>
  **Success!** You're ready to start securing your code.
</Check>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Run Your First Scan" icon="rocket" href="/scanning/running-scans">
    Follow the quickstart guide
  </Card>

  <Card title="Automated Scanning" icon="repeat" href="/scanning/automated-scanning">
    Set up continuous scanning
  </Card>
</CardGroup>
