[Support] Paperless-ngx Docker


Recommended Posts

17 hours ago, Tuetenk0pp said:

Redis is only in ram

Ok interesting that 3 different guides dont mention anything about another database, heres my references:
 


and also checked this: 

All 3 have no mention of Postgres or any other database, so if you could please inlighten me as to a guide which does would be great. Thanks

Link to comment

I just installed paperless-ngx as described in https://flemmingss.com/how-to-set-up-paperless-ngx-on-unraid/

 

The 'media', 'consumption' and 'export' are mounted into the share "Documents". The share is set to "public" access and the folders show up. Unfortunately, the folders are read only. The "Documents" root is correctly read/write. "Access Mode" for all folders in the settings is set to 'read/write'.

 

Does anyone have an idea what I might have done wrong?

 

Update: I found the solution. The folders 'media', 'consumption', 'export' should exist in the share before the docker app starts. If the app generates the folders on startup, they seem to have the wrong owner or something similar. Now everything works great!

Edited by vacuu
Solution found
  • Upvote 1
Link to comment
On 7/22/2023 at 12:58 AM, vacuu said:

I just installed paperless-ngx as described in https://flemmingss.com/how-to-set-up-paperless-ngx-on-unraid/

 

The 'media', 'consumption' and 'export' are mounted into the share "Documents". The share is set to "public" access and the folders show up. Unfortunately, the folders are read only. The "Documents" root is correctly read/write. "Access Mode" for all folders in the settings is set to 'read/write'.

 

Does anyone have an idea what I might have done wrong?

 

Update: I found the solution. The folders 'media', 'consumption', 'export' should exist in the share before the docker app starts. If the app generates the folders on startup, they seem to have the wrong owner or something similar. Now everything works great!

Another solution, when I have problems like this I use the "New Permissions" tool in unraid on that share :) Thanks for using the guide btw.

image.thumb.png.d4d85a48cd6c5be29a1749834c3f4053.png

Processing: /mnt/user/share_paperless-ngx_data
... chmod -R u-x,go-rwx,go+u,ugo+X /mnt/user/share_paperless-ngx_data
... chown -R nobody:users /mnt/user/share_paperless-ngx_data
... sync

Completed, elapsed time: 00:00:01

 

😎

Edited by Flemming
  • Like 1
Link to comment

What do I have misconfigured?  My docker config is blowing up my Docker Image file (see Writable below).  Is this a common/known issue I can fix?

Quote

Container Size

Name                                              Container                Writable                 Log

paperless-ngx                                     13.5 GB                  12.1 GB                  5.89 MB

 

attached pic for docker config

 

Thank you for any input!

 

paperlessngx_config.png

Edited by Tomahawk51
highlight size
Link to comment
On 2/4/2023 at 6:43 AM, RoTalk said:

I did a search for Genius Scan Ultra or Pro, I ended up subscribing but from what I have tried so far and read so far, if someone can clarify is as follows:

  • Genius Scan Pro, Ultra or Free cannot work with Paperless ngx directly.  Works cloud, ftp and "webdav".
  • You'd need a middle/app like NextCloud or some other to have the webdav.

Do we have a suggested, nice app, paid or free to work straight to smb/share or similar to autoexport to Unraid share for paperless-ngx to process? There was one app Scan pro that there was mentioned that was kicked off the store for having malware few years back.

- I need something to auto-export, do OCR and have option to scan 2-4 pictures into one single pdf.

 

Thanks,

Did you get a answer? I just subscribed to Scan Genius and it is not working.

 

Link to comment
On 4/3/2023 at 3:59 PM, s449 said:

I've been noticing the docker has been stopping randomly. It's not too annoying since the rare chance I need to upload or retrieve documents I just spin it up.

 

My best guess is it's the Redis or Paperless docker doing a weekly update that causes it, since they rely on each other. Does that sound right? Is there a way to fix this besides a User Script that just routinely checks if Paperless is running, if not, starts it?

 

Here are the logs from the stopped container:

 

[2023-04-02 04:00:00,450] [INFO] [celery.app.trace] Task paperless_mail.tasks.process_mail_accounts[50e61c75-e7f7-4e23-aff8-ee65d73cfca9] succeeded in 0.031346329022198915s: 'No new documents were added.'
[2023-04-02 04:00:17,470] [INFO] [paperless.management.consumer] Received SIGINT, stopping inotify

worker: Warm shutdown (MainProcess)
[2023-04-02 04:00:18 -0700] [318] [INFO] Handling signal: term
[2023-04-02 04:00:19 -0700] [318] [INFO] Shutting down: Master
2023-04-02 04:00:16,468 WARN received SIGTERM indicating exit request
2023-04-02 04:00:16,468 INFO waiting for gunicorn, celery, celery-beat, consumer to die
2023-04-02 04:00:17,820 INFO stopped: consumer (exit status 0)
celery beat v5.2.7 (dawn-chorus) is starting.
__    -    ... __   -        _
LocalTime -> 2023-04-01 08:06:56
Configuration ->
    . broker -> redis://192.168.1.200:6379//
    . loader -> celery.loaders.app.AppLoader
    . scheduler -> celery.beat.PersistentScheduler
    . db -> /usr/src/paperless/data/celerybeat-schedule.db
    . logfile -> [stderr]@%INFO
    . maxinterval -> 5.00 minutes (300s)
2023-04-02 04:00:18,106 INFO stopped: celery-beat (exit status 0)
2023-04-02 04:00:18,902 INFO stopped: celery (exit status 0)
2023-04-02 04:00:19,649 INFO stopped: gunicorn (exit status 0)
Paperless-ngx docker container starting...
Installing languages...
Hit:1 http://deb.debian.org/debian bullseye InRelease
Get:2 http://deb.debian.org/debian-security bullseye-security InRelease [48.4 kB]
Get:3 http://deb.debian.org/debian bullseye-updates InRelease [44.1 kB]
Fetched 92.4 kB in 1s (158 kB/s)
Reading package lists...
Package tesseract-ocr-ara already installed!
Creating directory /tmp/paperless
Adjusting permissions of paperless files. This may take a while.
Waiting for Redis...
Redis ping #0 failed.
Error: Error 111 connecting to 192.168.1.200:6379. Connection refused..
Waiting 5s
Redis ping #1 failed.
Error: Error 111 connecting to 192.168.1.200:6379. Connection refused..
Waiting 5s
Redis ping #2 failed.
Error: Error 111 connecting to 192.168.1.200:6379. Connection refused..
Waiting 5s
Redis ping #3 failed.
Error: Error 111 connecting to 192.168.1.200:6379. Connection refused..
Waiting 5s
Redis ping #4 failed.
Error: Error 111 connecting to 192.168.1.200:6379. Connection refused..
Waiting 5s
Failed to connect to redis using environment variable PAPERLESS_REDIS.

** Press ANY KEY to close this window ** 

Did you ever get a feedback on this one ? I have the same issue

 

Thank you :D 

Link to comment
On 12/28/2022 at 7:21 AM, cam217 said:

Hi guys,

I updated to paperless-ngx this year and I have issues with my already added thumbnail documents. If I add a new file it works but I don't get the thumbnail for documents that were added going to paperless-ngx. Accessing files is fine.

document_sanity_checker detects all the issues but it does not fix it. How do I fix it? Is there a command to update all thumbnails based on files sorted?

EDIT: Fixed using the command 

document_thumbnail

and fixing errors by hand when necessary.

 

Terrible necro, but FWIW I ran into the same issue when migrating from paperless-ng to paperless-ngx docker on unraid.

I found that paperless-ngx was creating thumbnails as webp files, while my old thumbnails were png.  There may have been a way to remap them... instead I installed the webp package on another system, shared the paperless folders, and ran the following in the thumbnails folder:

for file in * 
do
cwebp -q 80 "$file" -o "${file%.png}.webp"
done

 

Edited by carlel
clarify where to run command
Link to comment

I have problems to backup it via exporter. 

There are just errors:

 

root@93933c06999d:/usr/src/paperless/src# document_exporter ../export
  0%|                                                                                                       | 0/70 [00:00<?, ?it/s]
Traceback (most recent call last):
  File "/usr/src/paperless/src/manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.9/site-packages/django/core/management/__init__.py", line 440, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 402, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.9/site-packages/django/core/management/base.py", line 448, in execute
    output = self.handle(*args, **options)
  File "/usr/src/paperless/src/documents/management/commands/document_exporter.py", line 186, in handle
    self.dump(options["no_progress_bar"])
  File "/usr/src/paperless/src/documents/management/commands/document_exporter.py", line 360, in dump
    self.check_and_copy(
  File "/usr/src/paperless/src/documents/management/commands/document_exporter.py", line 441, in check_and_copy
    copy_file_with_basic_stats(source, target)
  File "/usr/src/paperless/src/documents/utils.py", line 42, in copy_file_with_basic_stats
    shutil.copy(source, dest)
  File "/usr/local/lib/python3.9/shutil.py", line 427, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/local/lib/python3.9/shutil.py", line 264, in copyfile
    with open(src, 'rb') as fsrc:

Link to comment
  • 4 weeks later...
On 2/3/2023 at 4:56 AM, SOULV1CE said:

I just solved a problem I was having with adding the PAPERLESS_TRASH_DIR parameter that I wanted to share.

 

As mentioned in the Paperless documentation the default value of this parameter is "Defaults to empty (i.e. really delete documents)."

Because it is empty it is never mapped to any container path - I verified this by looking in the /paperless.conf.example and src/paperless/settings.py file.

 

So because of this you first need to create a container variable for PAPERLESS_TRASH_DIR and map it to a container path such as /usr/src/paperless/media/trash because nothing is ever defined for this.

Now that we have defined the variable to the container path, we can then proceed with mapping the container path /usr/src/paperless/media/trash to a host path such as /mnt/user/data/media/documents/paperless-ngx/media/trash/.

 

Finally after doing this when deleting a file it should be moved to the host path folder /mnt/user/data/media/documents/paperless-ngx/media/trash/ and not be permanently deleted.

 

image.thumb.png.982b8e2a23d68a7518cb44be1668b705.png

 

Hi,

this is working fine for me, but I was wondering why not a single path variable for PAPERLESS_TRASH_DIR would be working?

 

Edited by pallalino
Link to comment

Hi all,

 

I'm trying to use the paramter PAPERLESS_PRE_CONSUME_SCRIPT to run a python script. Has someone this up and running?

I think the script is called when I created the path in the same manner as above form SOULV1C described. But even a dummy script which just prints something is causing an error:

 

[2023-09-14 21:22:19,269] [INFO] [paperless.consumer] Executing pre-consume script /usr/src/paperless/scripts/info.py

[2023-09-14 21:22:19,293] [ERROR] [paperless.consumer] Error while executing pre-consume script: [Errno 8] Exec format error: '/usr/src/paperless/scripts/info.py'

Traceback (most recent call last):

File "/usr/src/paperless/src/documents/consumer.py", line 214, in run_pre_consume_script

completed_proc = run(

File "/usr/local/lib/python3.9/subprocess.py", line 505, in run

with Popen(*popenargs, **kwargs) as process:

File "/usr/local/lib/python3.9/subprocess.py", line 951, in __init__

self._execute_child(args, executable, preexec_fn, close_fds,

File "/usr/local/lib/python3.9/subprocess.py", line 1837, in _execute_child

raise child_exception_type(errno_num, err_msg, err_filename)

OSError: [Errno 8] Exec format error: '/usr/src/paperless/scripts/info.py'

 

Any idea...?

Thanks

Edited by pallalino
Link to comment

Hello everyone,
I have a problem with my Paperless NGX!

I installed it following the instructions in a YouTube video, but then I can't access the surfaces.

https://www.youtube.com/watch?v=iuxsNJ3Ru7Y&t=157s&pp=ygUacGFwZXJsZXNzIG5neCBpbnN0YWxsaWVyZW4%3D

When I want to start the console to enter the superuser, the window only opens briefly (half a second) and then immediately closes again. Even if I want to open Paperless via the WebUI, I get the message - the website is not accessible and [Port] has refused the connection. -

Redis has of course been installed beforehand.

What am I doing wrong?

Does somebody has any idea?

Link to comment
On 9/14/2023 at 4:23 PM, pallalino said:

Exec format error: '/usr/src/paperless/scripts/info.py'

Maybe something to do with the file format (line endings) or perhaps missing shebang?

 

 

I'm curious, what do you want to achieve with a pre-consumption script? I was always aware of that functionality but found no use for it.

Link to comment
4 hours ago, Rops said:

Hello everyone,
I have a problem with my Paperless NGX!

I installed it following the instructions in a YouTube video, but then I can't access the surfaces.

https://www.youtube.com/watch?v=iuxsNJ3Ru7Y&t=157s&pp=ygUacGFwZXJsZXNzIG5neCBpbnN0YWxsaWVyZW4%3D

When I want to start the console to enter the superuser, the window only opens briefly (half a second) and then immediately closes again. Even if I want to open Paperless via the WebUI, I get the message - the website is not accessible and [Port] has refused the connection. -

Redis has of course been installed beforehand.

What am I doing wrong?

Does somebody has any idea?

Can we have a look at the logs? Both paperless and redis.

 

Also, did you create the paperless folders over smb like shown in the video? This could have messed up the file permissions. Better to let unraid create those folders on container creation.

Link to comment

Here's the one from Paperless

 

 

image.thumb.png.174d89eab6831f46374cfd51eded2d2a.png

image.thumb.png.3e0d9627165b707e96de570a7d8c57cd.png

image.thumb.png.91c3d13a5c11f869b53f37e93f337948.png

 

 

Now the one from Redis

 

image.thumb.png.be5f30868eaa420fc8e48eb04a72a537.png

 

2 hours ago, Tuetenk0pp said:

Haben Sie außerdem die papierlosen Ordner über SMB erstellt, wie im Video gezeigt? Dies könnte die Dateiberechtigungen durcheinander gebracht haben. Lassen Sie diese Ordner besser von Unraid bei der Containererstellung erstellen.

Yes, I created the folders via sharing (SMB) like in the video. I then created the three folders in this folder by hand.

Should I then just create the folder in Shares and let Paperless create the three subfolders?

 

 

 

 

Link to comment
40 minutes ago, Rops said:

Here's the one from Paperless

 

 

image.thumb.png.174d89eab6831f46374cfd51eded2d2a.png

image.thumb.png.3e0d9627165b707e96de570a7d8c57cd.png

image.thumb.png.91c3d13a5c11f869b53f37e93f337948.png

 

 

Now the one from Redis

 

image.thumb.png.be5f30868eaa420fc8e48eb04a72a537.png

 

Yes, I created the folders via sharing (SMB) like in the video. I then created the three folders in this folder by hand.

Should I then just create the folder in Shares and let Paperless create the three subfolders?

 

 

 

 

Timezone should be 'Europe/Berlin'

 

Quote

Should I then just create the folder in Shares and let Paperless create the three subfolders?

You could try that

  • Thanks 1
Link to comment

I deleted the three folders in shares and then had Paperless create them. There I saw an error that I made when creating it. I accidentally wrote "Export" in Consume. See image. And also i changed the time zone. Was mine wrong?

image.png.647bc4da7912d1f3eae2b6f1039c03a5.png

 

 

I'm currently still having the problem that if I want to move a PDF directly into my Consume folder (in Explorer) it won't allow me to do so. Here I get the error message that I don't have the required authorization for this process.

So I can't copy or move a PDF document directly into the consume folder.

 

 

Edited by Rops
Link to comment

I have been trying to trigger a PAPERLESS_PRE_CONSUME_SCRIPT that I got from this site: https://piep.tech/posts/automatic-password-removal-in-paperless-ngx/.

 

I have tried to add a scripts folder to my array share, and added the password txt file and the .py script. The script looks like this:

#!/usr/bin/env python
import pikepdf
import os

def unlock_pdf(file_path):
    password = None
    print("reading passwords")
    with open("/usr/src/paperless/scripts/passwords.txt", "r") as f:
        passwords = f.readlines()
    for p in passwords:
        password = p.strip()
        try:
            with pikepdf.open(file_path, password=password, allow_overwriting_input=True) as pdf:
                print("password is working:" + password)
                pdf.save(file_path)
                break
        except pikepdf.PasswordError:
            print("password isn't working:" + password)
            continue
    if password is None:
        print("Empty password file")

file_path = os.environ.get('DOCUMENT_WORKING_PATH')
unlock_pdf(file_path)

 

I have set a path to give the container access to the scripts folder:

image.thumb.png.bcc3e2d043e4fd9edce2a520d5f8a62b.png

 

And I have set the PAPERLESS_PRE_CONSUME_SCRIPT as a variable to run the script, I just have removed it now since it doesn't work...

 

I am getting a permission denied error in the logs:

[2023-09-18 23:47:43,698] [ERROR] [paperless.consumer] Error while executing pre-consume script: [Errno 13] Permission denied: '/usr/src/paperless/scripts/removepassword.py'

 

At one point, I got these messages from the logs.

[2023-09-18 23:02:34,261] [WARNING] [paperless.consumer] Script stderr:

[2023-09-18 23:02:34,263] [WARNING] [paperless.consumer] /usr/bin/env: ‘python\r’: No such file or directory

[2023-09-18 23:02:34,266] [WARNING] [paperless.consumer] /usr/bin/env: use -[v]S to pass options in shebang lines

[2023-09-18 23:02:34,273] [ERROR] [paperless.consumer] Error while executing pre-consume script: Command '['/usr/src/paperless/scripts/removepassword.py', '/tmp/paperless/tmpl40jims_/loennslipp.pdf']' returned non-zero exit status 127.

 

Does anyone have an idea to what I might be doing wrong? Is there something wrong with the script?

Link to comment

Hey All,

I am in need of your wisdom and help.

 

I am running Paperless-NGX along with Tika & Gutenburg on my UNRAID server. Now, I've got Paperless running fine, and I have no issues consuming pdf files into Paperless. However when it comes to consuming MS Office Documents I have a little bit more trouble. I have Tika and Gutenburg installed, but i am not 100% sure i have them installed correctly. When I try to consume a .doc file, it spits out the following error.

[Errno 99] Cannot assign requested address

 

When i set it all up i installed Redis, Paperless, Apche-Tika-server, and Gutenburg from the Apps Section of UNRAID, then i added the 3 Variables in the attached image to Paperless.

 

So, what the hell have i done wrong?

 

Any thoughts, idea, or help would be great. Oh i'm not an IT professional by any stretch of the imagination, i'm not a complete idiot, but i am not a professional either.

Paperless Variables.JPG

  • Upvote 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.