Paperless-ngx
Paperless-ngx is a document management system that transforms your physical documents into a searchable online archive so you can keep, well, less paper.
Docker Compose Example
version: '3.4'
services:
webserver:
image: ghcr.io/paperless-ngx/paperless-ngx:latest
container_name: paperless-ngx
restart: always
ports:
- 8000:8000
volumes:
- ./data:/usr/src/paperless/data
- ./media:/usr/src/paperless/media
- ./consume:/usr/src/paperless/consume
env_file: .env
depends_on:
- gotenberg
- tika
gotenberg:
image: gotenberg/gotenberg:7
container_name: paperless-gotenberg
restart: always
tika:
image: apache/tika:latest
container_name: paperless-tika
restart: always
Docker Compose
/home/docker/paperless-ngx/docker-compose.yml
# Docker Compose file for running paperless from the Docker Hub.
# This file contains everything paperless needs to run.
# Paperless supports amd64, arm and arm64 hardware.
#
# All compose files of paperless configure paperless in the following way:
#
# - Paperless is (re)started on system boot, if it was running before shutdown.
# - Docker volumes for storing data are managed by Docker.
# - Folders for importing and exporting files are created in the same directory
# as this file and mounted to the correct folders inside the container.
# - Paperless listens on port 8000.
#
# In addition to that, this Docker Compose file adds the following optional
# configurations:
#
# - Instead of SQLite (default), PostgreSQL is used as the database server.
#
# To install and update paperless with this file, do the following:
#
# - Copy this file as 'docker-compose.yml' and the files 'docker-compose.env'
# and '.env' into a folder.
# - Run 'docker compose pull'.
# - Run 'docker compose run --rm webserver createsuperuser' to create a user.
# - Run 'docker compose up -d'.
#
# For more extensive installation and update instructions, refer to the
# documentation.
services:
broker:
image: docker.io/library/redis:7
restart: unless-stopped
volumes:
- redisdata:/data
db:
image: docker.io/library/postgres:16
restart: unless-stopped
volumes:
- pgdata:/var/lib/postgresql/data
environment:
POSTGRES_DB: paperless
POSTGRES_USER: paperless
POSTGRES_PASSWORD: ***
# 25-02-17 Added support for llama3.2
paperless-ai:
image: clusterzx/paperless-ai
container_name: paperless-ai
restart: unless-stopped
cap_drop:
- ALL
security_opt:
- no-new-privileges=true
environment:
- PUID=1000
- PGID=1000
ports: # llama3.2 support
- 3000:3000 # llama3.2 support
network_mode: host # llama3.2 support
volumes:
- paperless-ai_data:/app/data
webserver:
image: ghcr.io/paperless-ngx/paperless-ngx:latest
restart: unless-stopped
depends_on:
- db
- broker
ports:
- "8000:8000"
volumes:
- /home/docker/paperless-ngx/data:/usr/src/paperless/data
- /home/docker/paperless-ngx/media:/usr/src/paperless/media
- ./export:/usr/src/paperless/export
- /opt/consume:/usr/src/paperless/consume
# - ./consume:/usr/src/paperless/consume
env_file: docker-compose.env
environment:
PAPERLESS_REDIS: redis://broker:6379
PAPERLESS_DBHOST: db
volumes:
data:
media:
pgdata:
redisdata:
paperless-ai_data:
/home/docker/paperless-ngx/docker-compose.env
# The UID and GID of the user used to run paperless in the container. Set this
# to your UID and GID on the host so that you have write access to the
# consumption directory.
USERMAP_UID=1000
USERMAP_GID=1000
# Additional languages to install for text recognition, separated by a
# whitespace. Note that this is
# different from PAPERLESS_OCR_LANGUAGE (default=eng), which defines the
# language used for OCR.
# The container installs English, German, Italian, Spanish and French by
# default.
# See https://packages.debian.org/search?keywords=tesseract-ocr-&searchon=names&suite=buster
# for available languages.
#PAPERLESS_OCR_LANGUAGES=tur ces
###############################################################################
# Paperless-specific settings #
###############################################################################
# All settings defined in the paperless.conf.example can be used here. The
# Docker setup does not use the configuration file.
# A few commonly adjusted settings are provided below.
# This is required if you will be exposing Paperless-ngx on a public domain
# (if doing so please consider security measures such as reverse proxy)
PAPERLESS_URL=https://documents.billpantzartzis.info
# Adjust this key if you plan to make paperless available publicly. It should
# be a very long sequence of random characters. You don't need to remember it.
PAPERLESS_SECRET_KEY=zP!439dSTn9A628a4ibYx#8k3uC!!7d5
# Use this variable to set a timezone for the Paperless Docker containers. If not specified, defaults to UTC.
PAPERLESS_TIME_ZONE=Europe/Amsterdam
# The default language to use for OCR. Set this to the language most of your
# documents are written in.
PAPERLESS_OCR_LANGUAGE=eng
# Tells paperless to use unpaper to clean any input document before sending it to tesseract. This uses more resources, but generally results in better OCR results.
PAPERLESS_OCR_CLEAN=none #none: Do not apply unpaper.
# Set if accessing paperless via a domain subpath e.g. https://domain.com/PATHPREFIX and using a reverse-proxy like traefik or nginx
#PAPERLESS_FORCE_SCRIPT_NAME=/PATHPREFIX
#PAPERLESS_STATIC_URL=/PATHPREFIX/static/ # trailing slash required
# Enable recursive watching of the consumption directory. Paperless will then pickup files from files in subdirectories within your consumption directory as well.
PAPERLESS_CONSUMER_RECURSIVE=true
#Defaults to 0, which disables polling and uses filesystem notifications.
PAPERLESS_CONSUMER_POLLING=1800
Architecture Overview
Service Details
- Public Hostname: documents.billpantzartzis.info
- Service URL: http://192.168.1.38:8000
- Tunnel: Ubuntu-Docker
- Active: Yes
Folder Structure
info
Several NFS mounts to SYNLORTINAS
/etc/fstab
lortis@ubuntu-docker:/home/docker/paperless-ngx$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/ubuntu-vg/ubuntu-lv during curtin installation
/dev/disk/by-id/dm-uuid-LVM-PPh8E2A1UlIjHZ2kzgGwPn0e0njvQmTFoFMUpnUo7oGqXMF1AXTP8rJwqfOLc5mI / ext4 defaults 0 1
# /boot was on /dev/sda2 during curtin installation
/dev/disk/by-uuid/da298e6c-0430-4505-9554-5c12c4e54ff2 /boot ext4 defaults 0 1
/swap.img none swap sw 0 0
#*********************CUSTOM STUFF*********************#
#SYNLORTINAS DOCKER BACKUP FOLDERS
192.168.1.81:/volume2/VeeamBackups/Docker/docker-imports /opt/docker-imports nfs4 defaults 0 0
192.168.1.81:/volume2/VeeamBackups/Docker/docker-exports /opt/docker-exports nfs4 defaults 0 0
192.168.1.81:/volume2/VeeamBackups/Docker/container-backups /opt/container-backups nfs4 defaults 0 0
#PAPERLESS
#192.168.1.81:/volume1/Data/Magazins/docker-exports /opt/docker-exports nfs4 defaults 0 0
192.168.1.81:/volume1/Data/Magazins /opt/magazines nfs4 defaults 0 0
192.168.1.81:/volume1/Data/Magazins/consume /opt/consume nfs4 defaults 0 0
192.168.1.81:/volume1/Data/Magazins/paperless_data /opt/paperless_data nfs4 defaults 0 0
192.168.1.81:/volume1/Data/Documents /opt/documents nfs4 defaults 0 0
df -h
lortis@ubuntu-docker:/home/docker/paperless-ngx$ df -h
Filesystem Size Used Avail Use% Mounted on
tmpfs 579M 2.8M 576M 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv 78G 73G 515M 100% /
tmpfs 2.9G 0 2.9G 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sda2 2.0G 191M 1.6G 11% /boot
192.168.1.81:/volume1/Data/Magazins 2.7T 2.2T 480G 83% /opt/magazines
192.168.1.81:/volume2/VeeamBackups/Docker/docker-exports 2.7T 2.3T 391G 86% /opt/docker-exports
192.168.1.81:/volume2/VeeamBackups/Docker/docker-imports 2.7T 2.3T 391G 86% /opt/docker-imports
192.168.1.81:/volume2/VeeamBackups/Docker/container-backups 2.7T 2.3T 391G 86% /opt/container-backups
192.168.1.81:/volume1/Data/Magazins/consume 2.7T 2.2T 480G 83% /opt/consume
192.168.1.81:/volume1/Data/Magazins/paperless_data 2.7T 2.2T 480G 83% /opt/paperless_data
192.168.1.81:/volume1/Data/Documents 2.7T 2.2T 480G 83% /opt/documents
tmpfs 579M 12K 579M 1% /run/user/1000
warning
media is a symlink to /opt/paperless_data/media
Moved the media folder to SYNLORTINAS as it takes too much space.
/home/docker/paperless-ngx
lortis@ubuntu-docker:~$ cd $DOCK
lortis@ubuntu-docker:/home/docker$ cd paperless-ngx/
lortis@ubuntu-docker:/home/docker/paperless-ngx$ ls
total 32K
drwxrwxr-x 5 lortis docker 4.0K Feb 17 2025 .
drwxr-xr-x 28 lortis root 4.0K Jul 27 01:08 ..
drwxr-xr-x 2 lortis docker 4.0K Aug 9 2024 consume
drwxr-xr-x 4 lortis lortis 4.0K Aug 10 01:08 data
-rw-r--r-- 1 root root 2.5K Aug 11 2024 docker-compose.env
-rw-r--r-- 1 root root 2.1K Jul 14 2024 docker-compose.postgres.yml
-rw-rw-r-- 1 lortis lortis 2.6K Feb 17 2025 docker-compose.yml
drwxr-xr-x 2 lortis lortis 4.0K Jul 14 2024 export
lrwxrwxrwx 1 root root 25 Feb 3 2025 media -> /opt/paperless_data/media