# Paperless-NGX Operations

## Stack Location

- Compose path on PD: `/mnt/docker-ssd/docker/compose/documents/docker-compose.yaml`
- Appdata: `/mnt/docker-ssd/docker/appdata/paperless/`
- Consume source: `/mnt/unraid/data/paperless/consume`
- Consume container path: `/usr/src/paperless/consume`

## Office Document Ingestion

Paperless-NGX uses internal-only Tika and Gotenberg sidecars:

- Tika endpoint: `http://tika:9998`
- Gotenberg endpoint: `http://gotenberg:3000`
- Network: `documents_paperless_internal`
- Host ports: none
- Resource limits: Tika `512m`, Gotenberg `256m`

This enables ingestion/extraction for Office and OpenDocument files such as:

- `.docx`, `.doc`
- `.pptx`, `.xlsx`
- `.odt`, `.ods`, `.odp`

## Deploy / Restart Procedure

Validate before changing running containers:

```bash
cd /mnt/docker-ssd/docker/compose/documents
docker compose --env-file .env config
```

Deploy with compose only:

```bash
docker compose --env-file .env down && docker compose --env-file .env up -d
```

Never use `systemctl restart docker` on PD for this stack.

## Verification

```bash
docker compose --env-file .env ps
docker logs paperless --tail 200 | grep -Ei 'tika|gotenberg'
docker exec paperless sh -lc 'echo "$PAPERLESS_TIKA_ENABLED $PAPERLESS_TIKA_ENDPOINT $PAPERLESS_TIKA_GOTENBERG_ENDPOINT"; mount | grep /usr/src/paperless/consume'
```
