> For the complete documentation index, see [llms.txt](https://docs.qpoint.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.qpoint.io/getting-started/qscan/installation/docker-container.md).

# Docker Container

## Docker Run

Deploy QScan with a single `docker run` command. At minimum, you need to provide a registration token:

{% code overflow="wrap" %}

```bash
docker run -d \
  --name qscan \
  --restart always \
  -e REGISTRATION_TOKEN=your-registration-token \
  -e METRICS_PORT=8080 \
  -e LOG_LEVEL=info \
  -e NUM_POLLERS=1 \
  -e NUM_SCANNERS=1 \
  -p 8080:8080 \
  --memory=12g \
  --cpus=2 \
  us-docker.pkg.dev/qpoint-edge/public/qscan:latest
```

{% endcode %}

For self-managed S3 storage, add the S3 environment variables:

{% code overflow="wrap" %}

```bash
docker run -d \
  --name qscan \
  --restart always \
  -e REGISTRATION_TOKEN=your-registration-token \
  -e S3_ENDPOINT_URL=http://your-s3-endpoint:3900 \
  -e S3_BUCKET_NAME=qpoint \
  -e S3_REGION_NAME=us-east-1 \
  -e AWS_ACCESS_KEY_ID=your-access-key \
  -e AWS_SECRET_ACCESS_KEY=your-secret-key \
  -e METRICS_PORT=8080 \
  -e LOG_LEVEL=info \
  -e NUM_POLLERS=1 \
  -e NUM_SCANNERS=1 \
  -p 8080:8080 \
  --memory=12g \
  --cpus=2 \
  us-docker.pkg.dev/qpoint-edge/public/qscan:latest
```

{% endcode %}

## Docker Compose

The following example deploys QScan alongside a local S3-compatible store (such as Garage or MinIO):

```yaml
services:
  qscan:
    image: us-docker.pkg.dev/qpoint-edge/public/qscan:latest
    container_name: qscan
    restart: always
    deploy:
      resources:
        limits:
          cpus: '2.0'
          memory: 12G
        reservations:
          cpus: '0.5'
          memory: 256M
    environment:
      - REGISTRATION_TOKEN=${QPOINT_REGISTRATION_TOKEN}
      - LOG_LEVEL=info
      - NUM_POLLERS=1
      - NUM_SCANNERS=1
      - METRICS_PORT=8080
      - S3_ENDPOINT_URL=http://your-s3-host:3900
      - S3_BUCKET_NAME=qpoint
      - S3_REGION_NAME=us-east-1
      - AWS_ACCESS_KEY_ID=${S3_ACCESS_KEY}
      - AWS_SECRET_ACCESS_KEY=${S3_SECRET_KEY}
    ports:
      - "8080:8080"
```

## Resource Limits

QScan loads approximately 8.4 GB of ML models into memory at startup. Set container memory limits accordingly:

| Configuration                       | Memory Limit | CPU Limit |
| ----------------------------------- | ------------ | --------- |
| Minimum (1 poller, 1 scanner)       | 12 GB        | 2 vCPUs   |
| Recommended (2 pollers, 2 scanners) | 24 GB        | 6 vCPUs   |

{% hint style="warning" %}
Setting memory limits below 12 GB may cause the container to be killed by the OOM killer during model loading or scanning.
{% endhint %}
