User Tools

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
services:paperless-ngx [2026/04/06 16:20] – created willyservices:paperless-ngx [2026/04/07 07:39] (current) – [Paperless NGX] willy
Line 1: Line 1:
 ====== Paperless NGX ====== ====== Paperless NGX ======
  
-**NOTE:** this is only a STUB to be completed in the future. +[[https://paperless-ngx.com|Paperless NGX]] is document management platform. Paperless-ngx is 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.
- +
- +
-[[https://paperless-ngx.com|Paperless NGX]] +
  
 ===== Installation ===== ===== Installation =====
Line 13: Line 10:
 <code bash> <code bash>
 useradd -d /data/daemons/paperless -m paperless useradd -d /data/daemons/paperless -m paperless
 +mkdir /data/paperless
 +chown paperless:paperless /data/paperless
 </code> </code>
  
 and, as user **paperless**, create the **/data/daemons/paperless/docker-compose.yml** file: and, as user **paperless**, create the **/data/daemons/paperless/docker-compose.yml** file:
 <file - docker-compose.yml> <file - docker-compose.yml>
 +services: 
 +  broker: 
 +    image: docker.io/library/redis:
 +    restart: unless-stopped 
 +    volumes: 
 +      - /data/paperless/redisdata:/data 
 +    network: 
 +      - paperless-net 
 +  db: 
 +    image: docker.io/library/postgres:18 
 +    restart: unless-stopped 
 +    volumes: 
 +      - /data/paperless/pgdata:/var/lib/postgresql 
 +    environment: 
 +      POSTGRES_DB: paperless 
 +      POSTGRES_USER: paperless 
 +      POSTGRES_PASSWORD: paperless 
 +    network: 
 +      - paperless-net 
 +  webserver: 
 +    image: ghcr.io/paperless-ngx/paperless-ngx:latest 
 +    restart: unless-stopped 
 +    depends_on: 
 +      - db 
 +      - broker 
 +    ports: 
 +      - "2276:8000" 
 +    volumes: 
 +      - /data/paperless/data:/usr/src/paperless/data 
 +      - /data/paperless/media:/usr/src/paperless/media 
 +      - /data/paperless/export:/usr/src/paperless/export 
 +      - /data/paperless/consume:/usr/src/paperless/consume 
 +    environment: 
 +      PAPERLESS_URL: https://docs.mydomain.com 
 +      PAPERLESS_SECRET_KEY: very_long_random_key_sequence 
 +      PAPERLESS_TIME_ZONE: Europe/Bruxelles 
 +      PAPERLESS_OCR_LANGUAGE: eng 
 +    environment: 
 +      PAPERLESS_REDIS: redis://broker:6379 
 +      PAPERLESS_DBHOST: db
     network:     network:
       - paperless-net       - paperless-net
Line 25: Line 63:
 </file> </file>
  
-Adapt the paths and the port to your needs (8089).+Adapt the paths and the port to your needs (2276).
  
 Now pull it: Now pull it:
Line 35: Line 73:
 ===== Reverse Proxy ===== ===== Reverse Proxy =====
  
-The following NGINX configuration file is the base for Stirling-PDF:+The following NGINX configuration file is the base paperless-ngx. Consider that it must be hosted on a subdomain. 
 <file - paperless.conf> <file - paperless.conf>
-location /paperless/ +map $http_upgrade $connection_upgrade 
-        proxy_pass http://127.0.0.1:xxxx+    default upgrade
-        access_log off; +    ''      close;
-        client_max_body_size 200M; +
-        proxy_read_timeout 3600;+
 } }
-</file> 
  
-Adapt the port to match the one in the docker composeI also suggest to set a proper //client_max_body_size// to allow upload/download of big enough files, and also the //proxy_read_timeout// value+server { 
 +        server_name docs.mydomain.com; 
 +        listen 443 ssl; 
 +        listen 8443 ssl; 
 +        http2 on; 
 + 
 +        access_log /var/log/nginx/docs.mydomain.com_access_log main; 
 +        error_log /var/log/nginx/docs.mydomain.com_error_log info; 
 + 
 +        proxy_buffering off; 
 + 
 +    location 
 +                proxy_pass http://127.0.0.1:2276/; 
 +                proxy_http_version 1.1; 
 +                proxy_set_header Upgrade $http_upgrade; 
 +                proxy_set_header Connection "upgrade"; 
 + 
 +                proxy_redirect off; 
 +                proxy_set_header Host $host:$server_port; 
 +                proxy_set_header X-Real-IP $remote_addr; 
 +                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
 +                proxy_set_header X-Forwarded-Host $server_name; 
 +                proxy_set_header X-Forwarded-Proto $scheme; 
 +                add_header Referrer-Policy "strict-origin-when-cross-origin"; 
 +    } 
 + 
 +    include com.mydomain/certbot.conf; 
 +
 +</file>
  
 See [[selfhost:nginx|The Reverse Proxy concept]] See [[selfhost:nginx|The Reverse Proxy concept]]