Paperless-NGX

Installation von Paperless-ngx auf Ubuntu

wget https://smarthomeundmore.de/wp-content/uploads/install_paperless.sh

wget https://smarthomeundmore.de/wp-content/uploads/backup.sh

wget https://smarthomeundmore.de/wp-content/uploads/restore.sh

chmod +x install_paperless.sh

chmod +x backup.sh

chmod +x restore.sh

./install_paperless.sh

Um eine neue docker-compose.yml-Datei für Paperless-ngx zu laden, stoppen Sie zuerst die laufenden Container mit docker compose down , laden die neue .yml-Datei (z.B. von Paperless-ngx GitHub) herunter oder erstellen Sie eine eigene, passen Sie die notwendigen Pfade und Einstellungen an (in einem Texteditor, nicht in einem Word-Dokument) und starten Sie die Dienste dann mit docker compose up -d neu, wobei Docker die neuen Einstellungen und ggf. Updates anwendet.
URL ändern der docker-compose.yml in /home/paperless

Edit your docker-compose.env or docker-compose.yml and add this variable.

PAPERLESS_URL=https://paperless.xxxx.com

Then force recreate your container (docker compose up -d –force-recreate)

PROFTPD

Scan zu Paperless-ngx - Technik22.de

Wenn proftpd nicht startet:

sudo nano /etc/proftpd/modules.conf

Then add this:

''# Needed in 25.04 Onwards Otherwise ProFTPD Fails To Start
LoadModule mod_delay.c
LoadModule mod_ls.c
LoadModule mod_xfer.c''

Wenn mit root per ftp zugegriffen werden soll:

edit the /etc/ftpusers file and remove the line that says „root“ from the file

Verzeichnisrechte

chgrp -R ftpuser /verzeichnis
chmod -R 770 /verzeichnis
Die Gruppe „ftpuser“ bekommt Schreibrechte.
Um unter Linux Benutzer in einer bestimmten Gruppe anzuzeigen, ist der Befehl
getent group GRUPPENNAME am besten geeignet. Er listet die Gruppe samt aller Mitglieder auf. Alternativ zeigt grep GRUPPENNAME /etc/group die Informationen aus der Gruppen-Datei an. Die Gruppen eines bestimmten Benutzers lassen sich mit groups BENUTZERNAME abfragen.


Wenn der Scanner Fehler mit Verbindung meldet, dann Berechtigungen des Scan-Ordners überprüfen und korrigieren wird höchstwahrscheinlich das Problem lösen.

These values can be added together to create combinations:

For example, the permission chmod 755 sets:

This numeric system makes it efficient to specify complex permission sets with a simple three-digit number.

NGIX

Configure Nginx as a Reverse Proxy

We'll use Nginx to sit in front of Paperless-ngx. Nginx will handle incoming web requests on standard HTTP (port 80) and HTTPS (port 443), and then forward them to Paperless-ngx's Docker container, which is running on port 8000. This also prepares us for SSL.

Install Nginx

If Nginx isn't already installed, let's install it:

sudo apt install nginx -y

Configure Nginx for Paperless-ngx

We need to create a new Nginx server block configuration file for our Paperless-ngx instance.

sudo nano /etc/nginx/sites-available/paperless.conf

Paste the following configuration. Remember to replace paperless.example.com with our domain name.

server {
    listen 80;
    listen [::]:80;
    server_name paperless.example.com; # Add our domain name here

    location / {
        proxy_pass http://localhost:8000; # Paperless-ngx runs on port 8000 inside the Docker network
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_read_timeout 900s; # Adjust if large documents time out
    }
}

Enable the Nginx Configuration

Create a symbolic link to enable our new configuration:

sudo ln -s /etc/nginx/sites-available/paperless.conf /etc/nginx/sites-enabled/

Test the Nginx configuration for syntax errors:

sudo nginx -t

If the output says syntax is ok and test is successful, we can restart Nginx:

sudo systemctl restart nginx

Step 6: Secure with SSL using Certbot (Let's Encrypt)

Now that Nginx is acting as a reverse proxy, we can easily set up free SSL certificates from Let's Encrypt using Certbot.

Install Certbot

sudo apt install certbot python3-certbot-nginx -y

Obtain and Configure SSL Certificate

Run Certbot to obtain the certificate and configure Nginx automatically. Replacepaperless.example.com with our domain name:

sudo certbot --nginx -d paperless.example.com

Step 7: Access the Web Interface

Paperless-ngx should now be accessible. Open our web browser and navigate to:

https://paperless.example.com
DokuWiki Appliance - Powered by TurnKey Linux