Although the timothystewart6/paperless-stack is great for deploying from CLI, it’s not directly importable into Portainer.
For users that would rather use this approach, below is the Stack adapted to portainer, in a way that avoids the .env files in each subfolder
The only changes from the original Repo were the change of the original repo names to be prefixed with paperless- , avoiding conflicts with other existing containers with similar names, the centralization of the Environment Variables, and prefixing some ports
Remember to change the default passwords
Web editor
services:
# paperless-ngx main service
paperless:
image: ghcr.io/paperless-ngx/paperless-ngx:latest
container_name: paperless-ngx
restart: unless-stopped
#env_file:
# - ./paperless/.env
depends_on:
- paperless-postgres
- paperless-redis
- paperless-gotenberg
- paperless-tika
ports:
- "8000:8000"
volumes:
- ./paperless/data:/usr/src/paperless/data
- ./paperless/media:/usr/src/paperless/media
- ./paperless/export:/usr/src/paperless/export
- ./paperless/consume:/usr/src/paperless/consume
# postgres database for paperless-ngx
paperless-postgres:
image: postgres:18
restart: unless-stopped
container_name: paperless-postgres
#env_file:
# - ./postgres/.env
volumes:
- ./postgres/data:/var/lib/postgresql
# redis database for paperless-ngx
paperless-redis:
image: docker.io/library/redis:8
container_name: paperless-redis
restart: unless-stopped
#env_file:
# - ./redis/.env
volumes:
- ./redis/data:/data
# gotenberg service that paperless uses for document conversion
paperless-gotenberg:
image: docker.io/gotenberg/gotenberg:8.25
container_name: paperless-gotenberg
# env_file:
# - ./gotenberg/.env
restart: unless-stopped
command:
- "gotenberg"
- "--chromium-disable-javascript=true"
- "--chromium-allow-list=file:///tmp/.*"
# tika service that paperless uses for document text extraction
paperless-tika:
image: docker.io/apache/tika:latest
container_name: paperless-tika
restart: unless-stopped
#env_file: ./tika/.env
# open-webui service for LLM interaction
paperless-open-webui:
image: ghcr.io/open-webui/open-webui:latest
container_name: paperless-open-webui
restart: unless-stopped
# env_file:
# - ./open-webui/.env
depends_on:
- paperless-ollama
ports:
- "3001:8080"
volumes:
- ./open-webui/data:/app/backend/data
# ollama service for local LLMs
paperless-ollama:
image: ollama/ollama:latest
container_name: paperless-ollama
# env_file:
# - ./ollama/.env
volumes:
- ./ollama/data/:/root/.ollama
- ./ollama/models:/ollama-models
restart: unless-stopped
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]
# paperless-ai service
paperless-ai:
image: clusterzx/paperless-ai:latest
container_name: paperless-ai
restart: unless-stopped
depends_on:
- paperless-ollama
- paperless
ports:
- "3000:3000"
# env_file:
# - ./paperless-ai/.env
volumes:
- ./paperless-ai/data:/app/data
# paperless-gpt service
paperless-gpt:
image: icereed/paperless-gpt:latest
container_name: paperless-gpt
restart: unless-stopped
depends_on:
- paperless-ollama
- paperless
ports:
- "3002:8080"
#env_file:
# - ./paperless-gpt/.env
volumes:
- ./paperless-gpt/prompts:/app/prompts # Mount the prompts directory
# optional but helpful log viewer
paperless-dozzle:
image: amir20/dozzle:latest
restart: unless-stopped
container_name: paperless-dozzle
#env_file:
#- ./dozzle/.env
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./dozzle/data:/data
ports:
- "8080:8080" Environment variables
TZ=Europe/London #Some .env files only have this setting, feel free to adjust
PAPERLESS_REDIS=redis://redis:6379
PAPERLESS_DBHOST=postgres
PAPERLESS_DBNAME=paperless #if you change this, be sure to also change it in the postgres .env
PAPERLESS_DBUSER=paperless # if you change this, be sure to also change it in the postgres .env
PAPERLESS_DBPASS=paperless # if you change this, be sure to also change it in the postgres .env (You should change this for production use)
PAPERLESS_TIKA_ENABLED=1
PAPERLESS_TIKA_GOTENBERG_ENDPOINT=http://gotenberg:3000
PAPERLESS_TIKA_ENDPOINT=http://tika:9998
POSTGRES_DB=paperless # if you change this, be sure to also change it in the paperless .env
POSTGRES_USER=paperless # if you change this, be sure to also change it in the paperless .env
POSTGRES_PASSWORD=paperless # if you change this, be sure to also change it in the paperless .env (You should change this for production use)
PAPERLESS_BASE_URL: "http://paperless:8000"
PAPERLESS_API_TOKEN: some-token # change to your paperless API token
LLM_PROVIDER: "ollama"
LLM_MODEL: "llama3.2:3b"
OLLAMA_HOST: "http://ollama:11434"
OLLAMA_CONTEXT_LENGTH: "8192" # Sets Ollama NumCtx (context window)
TOKEN_LIMIT: 1000 # Recommended for smaller models
LLM_LANGUAGE: "English" # Optional, default: English
OCR_PROVIDER: "llm" # Default OCR provider
VISION_LLM_PROVIDER: "ollama" # openai, ollama, mistral, or anthropic
VISION_LLM_MODEL: "minicpm-v:8b" # minicpm-v (ollama) or gpt-4o (openai) or claude-sonnet-4-5 (anthropic/claude)
AUTO_OCR_TAG: "paperless-gpt-ocr-auto"
AUTO_TAG: "paperless-gpt-auto"
MANUAL_TAG: "paperless-gpt-manual"
PDF_OCR_TAGGING: "true"
PDF_OCR_COMPLETE_TAG: "paperless-gpt-ocr-complete"
PDF_UPLOAD: "false"
LOG_LEVEL: "DEBUG"
PAPERLESS_API_URL=http://paperless:8000/api
PAPERLESS_API_TOKEN=some-token # change to your paperless API token
PAPERLESS_USERNAME=admin # change to your paperless username
AI_PROVIDER=ollama
OLLAMA_API_URL=http://ollama:11434
OLLAMA_MODEL=llama3.2:3b
RAG_SERVICE_URL=http://localhost:8000
RAG_SERVICE_ENABLED=true
SCAN_INTERVAL=*/30 * * * *
PAPERLESS_URL=http://paperless:8000
OLLAMA_BASE_URL=http://ollama:11434
OLLAMA_KEEP_ALIVE=15m
NVIDIA_DRIVER_CAPABILITIES=all # comment out if you aren't using NVIDIA GPUs
NVIDIA_VISIBLE_DEVICES=all # comment out if you aren't using NVIDIA GPUs
OLLAMA_HOST=0.0.0.0:11434
OLLAMA_MODELS=ollama-models 
