Hi,
is there an installation istruction for Paperless-AI? I have Paperless-NGX running on TrueNAS 25.04 and would like to add the Paperless-AI component. But I’m a newbie to TrueNAS and also docker…
Any help would be appreciated.
thx
Thomas
Hi,
is there an installation istruction for Paperless-AI? I have Paperless-NGX running on TrueNAS 25.04 and would like to add the Paperless-AI component. But I’m a newbie to TrueNAS and also docker…
Any help would be appreciated.
thx
Thomas
I tried this on my home system, this is not official guidance, but I used the docker compose file provided on paperless-ai github repo and then after it started I went to the ipAddress:port/setup page and configure it from there.
I raised a new app request on github for it to be added to the catalog Request for app addition paperless-ai · Issue #2218 · truenas/apps · GitHub
Just got this installed myself over the last 2 weeks or so
I used the clusterzx/paperless-ai docker compose yaml and added it into my paperless-ngx yaml,
Ontop of that you need an ai model so I added ollama/ollama:latest
I could probably try and share my compse of a compose file if you’d like?
would be great, if you can share your compose file!
Here you go, I’ve removed whatever I think was sensitive data and then threw it into an AI to clean up whatever I forgot, hope it works, any issues feel free to ask,
Just for clarity I’ve installed the below using Portainer - if that matters at all, also I dont have a gpu just yet, so I have the llm running off cpu only, I more wanted to see if I could get this to work, only been using it about a week or 2 myself.
Best of luck.
`# Combined Docker Compose for Paperless-ngx, Paperless-AI Addon, and Ollama (CPU)
services:
broker:
image: Docker Hub Container Image Library | App Containerization
container_name: paperless_broker
restart: unless-stopped
volumes:
- redisdata:/data
networks:
paperless_external_net:
aliases:
- broker
db:
image: Docker Hub Container Image Library | App Containerization
container_name: paperless_db
restart: unless-stopped
volumes:
- pgdata:/var/lib/postgresql/data
environment:
POSTGRES_DB: paperless
POSTGRES_USER: paperless
POSTGRES_PASSWORD: YOUR_SECURE_POSTGRES_PASSWORD # <<< CHANGE THIS! Or set in stack.env
networks:
paperless_external_net:
aliases:
- db
webserver:
image: Package paperless-ngx · GitHub
container_name: paperless_webserver
restart: unless-stopped
depends_on:
- db
- broker
ports:
- “8010:8000” # I have a different container running on 8000 so I used 8010
volumes:
# Using bind mounts - ensure these paths exist on your host
- /your/local/path/to/paperless/data:/usr/src/paperless/data
- /your/local/path/to/paperless/media:/usr/src/paperless/media
- /your/local/path/to/paperless/export:/usr/src/paperless/export
- /your/local/path/to/paperless/consume:/usr/src/paperless/consume
# If you prefer named volumes (create them below): I never used these but It was in the original documentation I think
# - paperless_data:/usr/src/paperless/data
# - paperless_media:/usr/src/paperless/media
# - paperless_export:/usr/src/paperless/export
# - paperless_consume:/usr/src/paperless/consume
environment:
PAPERLESS_REDIS: redis://broker:6379
PAPERLESS_DBHOST: db
env_file:
- stack.env # Ensure this file exists or remove this line if not using it
# This file typically contains PAPERLESS_SECRET_KEY and other secrets.
networks:
- paperless_external_net
paperless-ai:
image: clusterzx/paperless-ai:latest
container_name: paperless_ai_addon
restart: unless-stopped
cap_drop: # Security hardening: Drop all capabilities
- ALL
security_opt:
- no-new-privileges=true
environment:
# — Core Settings —
PAPERLESS_AI_PORT: 3001 # Internal port the AI addon listens on
# — Paperless-ngx Connection —
PAPERLESS_URL: http://webserver:8000 # Internal URL to reach Paperless-ngx
PAPERLESS_TOKEN: “YOUR_PAPERLESS_API_TOKEN” # !!! IMPORTANT: Generate in Paperless UI (Settings → API Keys) and paste here !!!
# — AI Provider Configuration (Ollama) —
PAPERLESS_AI_PROVIDER: ollama
PAPERLESS_AI_OLLAMA_HOST: http://ollama:11434 # Internal URL to reach Ollama
# PAPERLESS_AI_OLLAMA_MODEL: llama3 # Specify default model (optional, can be set in UI)
# PAPERLESS_AI_SUMMARIZATION_MODEL: llama3 # Specify summarization model (optional)
# PAPERLESS_AI_CHAT_MODEL: llama3 # Specify chat model (optional)
# — Other Optional Settings —
# PAPERLESS_AI_DEFAULT_LANGUAGE: eng
# PAPERLESS_AI_MODE: auto # or ‘manual’
# PAPERLESS_AI_PROMPT: “Analyze this document…”
# PAPERLESS_AI_MAX_TOKENS: 1000
# TZ: Europe/London # Set Timezone if needed for the container
ports:
- “3001:3001” # Map host port 3001 to container’s internal port
volumes:
- paperless-ai_data:/app/data # Persists Paperless-AI configuration
depends_on:
- webserver
- ollama
networks:
- paperless_external_net
ollama:
image: ollama/ollama:latest
container_name: ollama_service
restart: unless-stopped
volumes:
- ollama_data:/root/.ollama # Persists downloaded Ollama models
ports:
- “11434:11434” # Exposes Ollama API on host port 11434
networks:
- paperless_external_net
volumes:
redisdata:
pgdata:
paperless-ai_data:
ollama_data:
networks:
paperless_external_net:
name: my_existing_external_network # Replace with your actual external network name if you have one
just a note - i’ve been using
networks:
- paperless_external_net
In the above because I mis-configured something early on and this wasnt installing on the same netowrk as my nginx proxy manager so I manually set it here, you may not need this
additionally Paperless use a .env, and on the off chance you dont have one here is the example one in the documentation
###############################################################################
# Paperless-ngx settings #
###############################################################################
# See http://docs.paperless-ngx.com/configuration/ for all available options.
# 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
# See the documentation linked above for all options. 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://paperless.example.com
# 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=change-me
# Use this variable to set a timezone for the Paperless Docker containers. Defaults to UTC.
#PAPERLESS_TIME_ZONE=America/Los_Angeles
# The default language to use for OCR. Set this to the language most of your
# documents are written in.
#PAPERLESS_OCR_LANGUAGE=eng
# 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
Really appreciate the detailed compose file shared here—it helped me get Paperless-AI running on my TrueNAS setup without much trial and error. The Ollama integration is a nice touch too. For others starting out, I recommend taking it slow and reading through each service block to understand the dependencies. Definitely worth it once everything’s up and running.