Skip to content

Paperless-ngx Paperless-ngx

Description / nameInput element
Container Registry
Container Configuration Root Path
Timezone
User ID
Group ID
Paperless-ngx Host Port
Paperless-ngx /config Path

Build Status Last Commit OCI Pulls

A community-supported open-source document management system that transforms your physical documents into a searchable online archive so you can keep, well, less paper.

Port 8000
Registry ghcr.io/daemonless/paperless-ngx
Daemonless daemonless/paperless-ngx
Source paperless-ngx/paperless-ngx
Website paperless-ngx.org

Version Tags

Tag Description Best For
latest Built from latest upstream release and latest FreeBSD packages. Most users — recommended.

Before deploying, ensure your host environment is ready. See the Quick Start Guide for host setup instructions, including the security model for host vs. container privileges.

Deployment

services:
  paperless-ngx:
    image: "ghcr.io/daemonless/paperless-ngx:latest"
    container_name: paperless-ngx
    environment:
      - PUID=1000  # User ID for the application process
      - PGID=1000  # Group ID for the application process
      - TZ=UTC  # Timezone for the container
      - PAPERLESS_REDIS=redis://localhost:6379
      - PAPERLESS_ADMIN_USER=${PAPERLESS_ADMIN_USER}  # Set name of the admin user on first start
      - PAPERLESS_ADMIN_PASSWORD=${PAPERLESS_ADMIN_PASSWORD}  # Set password of the admin user on first start
      - CONFIG_LOCATION=  # Path to store configuration, database and (by default) documents
      - DOCUMENTS_LOCATION=  # Optional separate document store (originals, archive, thumbnails), e.g. its own ZFS filesystem
      - REDIS_DATA_LOCATION=  # Path to store the redis data
    volumes:
      - "/path/to/containers/paperless-ngx:/config"
    ports:
      - "8000:8000"
      - "5555:5555"
    # always (not unless-stopped) so FreeBSD's podman rc.d auto-starts it at boot
    restart: always

Save as compose.yaml, then run podman-compose up -d.

podman run -d --name paperless-ngx \
  -p 8000:8000 \
  -p 5555:5555 \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=UTC \
  -e PAPERLESS_REDIS=redis://localhost:6379 \
  -e PAPERLESS_ADMIN_USER=${PAPERLESS_ADMIN_USER} \
  -e PAPERLESS_ADMIN_PASSWORD=${PAPERLESS_ADMIN_PASSWORD} \
  -e CONFIG_LOCATION= \
  -e DOCUMENTS_LOCATION= \
  -e REDIS_DATA_LOCATION= \
  -v /path/to/containers/paperless-ngx:/config \
  ghcr.io/daemonless/paperless-ngx:latest

Save as run.sh, then run sh run.sh.

- name: Deploy paperless-ngx
  containers.podman.podman_container:
    name: paperless-ngx
    image: "ghcr.io/daemonless/paperless-ngx:latest"
    state: started
    restart_policy: always
    env:
      PUID: "1000"
      PGID: "1000"
      TZ: "UTC"
      PAPERLESS_REDIS: "redis://localhost:6379"
      PAPERLESS_ADMIN_USER: "${PAPERLESS_ADMIN_USER}"
      PAPERLESS_ADMIN_PASSWORD: "${PAPERLESS_ADMIN_PASSWORD}"
      CONFIG_LOCATION: ""
      DOCUMENTS_LOCATION: ""
      REDIS_DATA_LOCATION: ""
    ports:
      - "8000:8000"
      - "5555:5555"
    volumes:
      - "/path/to/containers/paperless-ngx:/config"

Save as paperless-ngx-deploy.yaml, then run ansible-playbook paperless-ngx-deploy.yaml.

Warning

Exposing ports in AppJail means that your service can be reached from remote hosts. If that is not your intention, do not expose the ports and communicate with the service using the jail's IPv4 address or hostname assigned by the virtual network.

# .env

DIRECTOR_PROJECT=paperless-ngx
PUID=1000
PGID=1000
TZ=UTC
PAPERLESS_REDIS=redis://localhost:6379
PAPERLESS_ADMIN_USER=${PAPERLESS_ADMIN_USER}
PAPERLESS_ADMIN_PASSWORD=${PAPERLESS_ADMIN_PASSWORD}
CONFIG_LOCATION=
DOCUMENTS_LOCATION=
REDIS_DATA_LOCATION=
# appjail-director.yml

options:
  - alias:
  - ip4_inherit:
services:
  paperless-ngx:
    name: paperless_ngx
    options:
      - container: 'args:--pull'
      - expose: '8000:8000 proto:tcp'
      - expose: '5555:5555 proto:tcp'
    oci:
      user: root
      environment:
        - PUID: !ENV '${PUID}'
        - PGID: !ENV '${PGID}'
        - TZ: !ENV '${TZ}'
        - PAPERLESS_REDIS: !ENV '${PAPERLESS_REDIS}'
        - PAPERLESS_ADMIN_USER: !ENV '${PAPERLESS_ADMIN_USER}'
        - PAPERLESS_ADMIN_PASSWORD: !ENV '${PAPERLESS_ADMIN_PASSWORD}'
        - CONFIG_LOCATION: !ENV '${CONFIG_LOCATION}'
        - DOCUMENTS_LOCATION: !ENV '${DOCUMENTS_LOCATION}'
        - REDIS_DATA_LOCATION: !ENV '${REDIS_DATA_LOCATION}'
    volumes:
      - PAPERLESS_NGX_CONFIG_PATH: /config
  paperless-redis:
    name: paperless_redis
    options:
      - from: ghcr.io/daemonless/redis:latest
      - template: !ENV '${PWD}/template.conf'
    volumes:
      - redis_data: /config
volumes:
  PAPERLESS_NGX_CONFIG_PATH:
    device: '/path/to/containers/paperless-ngx'
  redis_data:
    device: !ENV '${REDIS_DATA_LOCATION}'
1
2
3
4
5
6
7
# Makejail

ARG tag=latest

OPTION container=boot
OPTION overwrite=force
OPTION from=ghcr.io/daemonless/paperless-ngx:${tag}

Save the files above, then run appjail-director up.

appjail oci run -Pd \
  -o overwrite=force \
  -o container="args:--pull" \
  -o virtualnet=":<random> default" \
  -o nat \
  -o expose="8000:8000 proto:tcp" \
  -o expose="5555:5555 proto:tcp" \
  -e PUID=1000 \
  -e PGID=1000 \
  -e TZ=UTC \
  -e PAPERLESS_REDIS=redis://localhost:6379 \
  -e PAPERLESS_ADMIN_USER=${PAPERLESS_ADMIN_USER} \
  -e PAPERLESS_ADMIN_PASSWORD=${PAPERLESS_ADMIN_PASSWORD} \
  -e CONFIG_LOCATION= \
  -e DOCUMENTS_LOCATION= \
  -e REDIS_DATA_LOCATION= \
  -o fstab="/path/to/containers/paperless-ngx /config <pseudofs>" \
  ghcr.io/daemonless/paperless-ngx:latest paperless-ngx

Save the files above, then run sh run.sh.

Experimental

Bastille's OCI support is experimental. It requires buildah and shares the host network stack (inherit). Mount volumes with --volume HOST JAIL; without it, image-declared volumes are stored under ${bastille_volumesdir}/${jail}.

services:
  paperless-ngx:
    name: paperless-ngx
    image: "ghcr.io/daemonless/paperless-ngx:latest"
    network:
      - mode: host
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=UTC
      - PAPERLESS_REDIS=redis://localhost:6379
      - PAPERLESS_ADMIN_USER=${PAPERLESS_ADMIN_USER}
      - PAPERLESS_ADMIN_PASSWORD=${PAPERLESS_ADMIN_PASSWORD}
      - CONFIG_LOCATION=
      - DOCUMENTS_LOCATION=
      - REDIS_DATA_LOCATION=
    volumes:
      - "/path/to/containers/paperless-ngx:/config"

Save as bastille-compose.yml, then run bastille up.

bastille create -O \
  --env PUID=1000 \
  --env PGID=1000 \
  --env TZ=UTC \
  --env PAPERLESS_REDIS=redis://localhost:6379 \
  --env PAPERLESS_ADMIN_USER=${PAPERLESS_ADMIN_USER} \
  --env PAPERLESS_ADMIN_PASSWORD=${PAPERLESS_ADMIN_PASSWORD} \
  --env CONFIG_LOCATION= \
  --env DOCUMENTS_LOCATION= \
  --env REDIS_DATA_LOCATION= \
  --volume /path/to/containers/paperless-ngx /config \
  paperless-ngx ghcr.io/daemonless/paperless-ngx:latest inherit

Access at: http://localhost:8000

Interactive Configuration

Parameters

Environment Variables

Variable Default Description
PUID 1000 User ID for the application process
PGID 1000 Group ID for the application process
TZ ${TZ:-UTC} Timezone for the container
PAPERLESS_REDIS redis://localhost:6379
PAPERLESS_ADMIN_USER ${PAPERLESS_ADMIN_USER} Set name of the admin user on first start
PAPERLESS_ADMIN_PASSWORD ${PAPERLESS_ADMIN_PASSWORD} Set password of the admin user on first start
CONFIG_LOCATION `` Path to store configuration, database and (by default) documents
DOCUMENTS_LOCATION `` Optional separate document store (originals, archive, thumbnails), e.g. its own ZFS filesystem
REDIS_DATA_LOCATION `` Path to store the redis data

Volumes

Path Description
/config Configuration directory

Ports

Port Protocol Description
8000 TCP Web UI
5555 TCP Flower monitoring UI available at '/flower', optional

Upgrade to v3

Pre-Requisites

Upgrading to Paperless-ngx v3 can only be performed from version 2.20.15. If you are running an older version, please upgrade to v2.20.15 before proceeding with the v3 upgrade.

Breaking Changes

Paperless-ngx v3 introduced some changes to the configuration. Read the official v3 Migration Guide to make sure you adapt your configuration so that it works with v3.

Database migration

The DB migration will run automatically when the container starts.

First time setup

To configure the admin user with a password during the first startup, you can define some additional environment variables in your container file:

1
2
3
4
5
services:
  paperlessngx:
    env:
      - PAPERLESS_ADMIN_USER=""
      - PAPERLESS_ADMIN_PASSWORD=""
These 2 variables can be removed after the initial setup was done and paperless won't change an existing admin user's password when these vars are defined.

Configuration

Configuration is best done using a .env file next to your compose.yaml. If no .env file is in compose.yaml, paperless-ngx will use default values.

Documents directory

If you want to keep your documents in a separate ZFS filesystem, you can mount it at /config/media/documents. This directoru should contain these 3 directories:

1
2
3
- archive
- originals
- thumbnails

Implementation Details

  • Architectures: amd64
  • User: bsd (UID/GID set via PUID/PGID). Defaults to 1000:1000.
  • Base: Built on ghcr.io/daemonless/base (FreeBSD 15.1).

Need help? Join our Discord community.