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

# Docker & Compose

> Run the Open Headers Server as a container: image, volume, ports, version pinning, and a Compose file.

By the end of this page the daemon runs as a container with durable
state and a pinned version — the way to run the server on Windows
hosts and on platforms without a native binary.

## Run it

```sh theme={null}
docker run -d -p 8137:8137 -v oh-data:/data ghcr.io/openheaders/ohd:latest
```

State lives in the `/data` volume; the daemon listens on
`0.0.0.0:8137` **inside** the container, and Docker's port mapping
decides what reaches it. Publish `-p 127.0.0.1:8137:8137` to keep it
host-local, or `-p 8137:8137` to expose it on the host's interfaces.

Pin a version tag for reproducible deployments — tags match the
daemon's released versions:

```sh theme={null}
docker run -d -p 8137:8137 -v oh-data:/data ghcr.io/openheaders/ohd:2026.8.4
```

## Compose

```yaml theme={null}
services:
  ohd:
    image: ghcr.io/openheaders/ohd:2026.8.4
    restart: unless-stopped
    ports:
      - "8137:8137"
    volumes:
      - oh-data:/data

volumes:
  oh-data:
```

## Operating a containerized daemon

* **First token**: `ohd show-token` needs the daemon stopped and the
  same data dir. Stop the container, then run it against the volume:

  ```sh theme={null}
  docker stop <container>
  docker run --rm -v oh-data:/data ghcr.io/openheaders/ohd:2026.8.4 show-token --data-dir /data
  docker start <container>
  ```

* **Settings** work the same way (stopped daemon, same volume):

  ```sh theme={null}
  docker run --rm -v oh-data:/data ghcr.io/openheaders/ohd:2026.8.4 config set mcp.enabled true --data-dir /data
  ```

* **TLS**: the container answers cleartext on its bind; put a
  TLS-terminating reverse proxy in front for anything beyond a
  trusted network, exactly as on a native install — see
  [LAN vs TLS proxy](/server/lan-vs-tls).

* **Upgrade**: pull the newer tag and recreate the container; state
  rides the volume. `ohd upgrade` is for native binaries only.

* **Backup**: stop the container and snapshot with the same tooling —
  see [Backup & restore](/server/backup-restore):

  ```sh theme={null}
  docker run --rm -v oh-data:/data -v "$PWD/backups:/backups" \
    ghcr.io/openheaders/ohd:2026.8.4 backup /backups/oh-2026-08-22 --data-dir /data
  ```
