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

# Docker Resources

> Set CPU and memory limits and reservations for Docker containers

These variables are read by `docker-compose.yml` to set resource constraints on the Openinary container.

## Parameters

| Parameter                                                 | Description               |
| --------------------------------------------------------- | ------------------------- |
| [`DOCKER_CPU_LIMIT`](#docker-cpu-limit)                   | Hard CPU cap (cores)      |
| [`DOCKER_MEMORY_LIMIT`](#docker-memory-limit)             | Hard memory cap           |
| [`DOCKER_CPU_RESERVATION`](#docker-cpu-reservation)       | Minimum guaranteed CPU    |
| [`DOCKER_MEMORY_RESERVATION`](#docker-memory-reservation) | Minimum guaranteed memory |

## Parameter reference

<a id="docker-cpu-limit" />

<ParamField path="DOCKER_CPU_LIMIT" type="number" default="2.0">
  Hard CPU cap in cores. The container cannot use more than this, even if the host has spare capacity.

  `2.0` (default) · `4.0` (video-heavy) · `1.0` (minimal) · `0.5` (bare minimum)
</ParamField>

<a id="docker-memory-limit" />

<ParamField path="DOCKER_MEMORY_LIMIT" type="string" default="4G">
  Hard memory cap. Use `G` for gigabytes, `M` for megabytes.

  `4G` (default) · `8G` (video-heavy) · `2G` (minimal)

  <Warning>
    If the container exceeds this limit it will be OOM-killed. Video processing is memory-intensive — allocate at least 2 GB, 4 GB recommended.
  </Warning>
</ParamField>

<a id="docker-cpu-reservation" />

<ParamField path="DOCKER_CPU_RESERVATION" type="number" default="0.5">
  Minimum CPU guaranteed to the container under host load.

  `0.5` (default) · `1.0` · `2.0`
</ParamField>

<a id="docker-memory-reservation" />

<ParamField path="DOCKER_MEMORY_RESERVATION" type="string" default="1G">
  Minimum memory guaranteed to the container. Must be lower than `DOCKER_MEMORY_LIMIT`.

  `1G` (default) · `2G` · `512M`
</ParamField>

## Configuration examples

<Tabs>
  <Tab title="Default (4 GB server)">
    ```bash theme={null}
    DOCKER_CPU_LIMIT=2.0
    DOCKER_MEMORY_LIMIT=4G
    DOCKER_CPU_RESERVATION=0.5
    DOCKER_MEMORY_RESERVATION=1G
    ```
  </Tab>

  <Tab title="Production (16 GB server)">
    ```bash theme={null}
    DOCKER_CPU_LIMIT=4.0
    DOCKER_MEMORY_LIMIT=8G
    DOCKER_CPU_RESERVATION=1.0
    DOCKER_MEMORY_RESERVATION=2G
    ```
  </Tab>

  <Tab title="Minimal (1–2 GB server)">
    ```bash theme={null}
    DOCKER_CPU_LIMIT=1.0
    DOCKER_MEMORY_LIMIT=2G
    DOCKER_CPU_RESERVATION=0.25
    DOCKER_MEMORY_RESERVATION=512M
    ```

    Image-only deployments only — video processing will fail with less than 2 GB.
  </Tab>
</Tabs>

## Related

<CardGroup cols={2}>
  <Card title="Video Processing" icon="gear" href="/configuration/video-processing">
    Configure worker concurrency and job queue settings.
  </Card>

  <Card title="Deploy on Coolify" icon="rocket" href="/guides/coolify-deployment">
    Full deployment guide with resource configuration.
  </Card>
</CardGroup>
