[Support] Paperless-ng Docker


Recommended Posts

Hello all,

to all the people asking a question regarding swapping paperless-ng with paperless-ngx, I did it. And it is working fine.

 

My old docker setup:

- paperless-ng

- mariadb as database

- consume directory

- data directory

 

I just swap the docker endpoint with new one and it working fine. And also if you are following “ngx” it is supposed to be drop-in replacement for current “ng”. Hope this helps. 

  • Like 1
Link to comment
  • 2 weeks later...

EDIT: Found a solution

I ran paperless on its own IP-adress and therefore it couldn't communicate with redis. 

 

=================================0

 

Hi guys, 

 

my consumer has stopped working. This is what the protocol says: 

 

2022-03-25 09:38:16,480] [INFO] [paperless.management.consumer] Adding /usr/src/paperless/src/../consume/document_title.pdf to the task queue.

[2022-03-25 09:38:19,546] [ERROR] [paperless.management.consumer] Error while consuming document

Traceback (most recent call last):

  File "/usr/local/lib/python3.9/site-packages/redis/connection.py", line 559, in connect

    sock = self._connect()

  File "/usr/local/lib/python3.9/site-packages/redis/connection.py", line 615, in _connect

    raise err

  File "/usr/local/lib/python3.9/site-packages/redis/connection.py", line 603, in _connect

    sock.connect(socket_address)

OSError: [Errno 113] No route to host

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

  File "/usr/src/paperless/src/documents/management/commands/document_consumer.py", line 64, in _consume

    async_task(

  File "/usr/local/lib/python3.9/site-packages/django_q/tasks.py", line 73, in async_task

    enqueue_id = broker.enqueue(pack)

  File "/usr/local/lib/python3.9/site-packages/django_q/brokers/redis_broker.py", line 18, in enqueue

    return self.connection.rpush(self.list_key, task)

  File "/usr/local/lib/python3.9/site-packages/redis/client.py", line 2016, in rpush

    return self.execute_command('RPUSH', name, *values)

  File "/usr/local/lib/python3.9/site-packages/redis/client.py", line 898, in execute_command

    conn = self.connection or pool.get_connection(command_name, **options)

  File "/usr/local/lib/python3.9/site-packages/redis/connection.py", line 1192, in get_connection

    connection.connect()

  File "/usr/local/lib/python3.9/site-packages/redis/connection.py", line 563, in connect

    raise ConnectionError(self._error_message(e))

redis.exceptions.ConnectionError: Error 113 connecting to 192.168.178.36:6379. No route to host.

[2022-03-25 09:38:19,552] [INFO] [paperless.management.consumer] Using inotify to watch directory for changes: /usr/src/paperless/src/../consume

 

I have tried reinstalling paperless-ng and redis, have installed a fresh paperless-ngx docker and imported all of my documents. And even switched from library/redis to bitnami/redis:latest. 

What could be the issue?

 

Redis is running, the port and IP are fine and have been working in the past. 

Edited by Dorsch
Link to comment

Can paperless be configured in anyway to accept documents with the same filename in the consume folder? Obviously windows can't but at least at different times.

 

To test this I make 2 files called 'statement' each with different content. Put one in the consume folder and waited for it to be processed then put the other in, but then nothing happens with the 2nd statement file.

Link to comment
  • 4 weeks later...

Running NGX.

Ran in to a know bug. See quote below.

https://github.com/paperless-ngx/paperless-ngx/issues/817

 

Same Problem here with unraid
Upgraded to 1.7.0 => error when try to connect with URL and nginx proxy manager
1.7.0 local access with IP => no problems
Downgrade to 1.6.0 => no problems

 

Question - How do I downgrade to 1.6.0 as well. So my system is accessible through the net and NPM.

Thanks

 

RESOLVED

https://github.com/paperless-ngx/paperless-ngx/issues/712

Edited by Profezor
Link to comment
  • 1 month later...

Hello,

 

i am to newbie to simply start the command for retagging my correspondents:

 

How do i execute this command?

https://paperless-ng.readthedocs.io/en/latest/administration.html#document-retagger

 

In Django / Admin Page the cron job does not start.. Maybe i have to do this in unraid terminal? But how and where?

 

Thank you for your help.

 

The command:

 

document_retagger [-h] [-c] [-T] [-t] [-i] [--use-first] [-f] optional arguments: -c, --correspondent -T, --tags -t, --document_type -i, --inbox-only --use-first -f, --overwrite

 

Link to comment
  • 3 weeks later...
On 6/17/2022 at 3:00 PM, Raptor2k said:

Hello,

 

i am to newbie to simply start the command for retagging my correspondents:

 

How do i execute this command?

https://paperless-ng.readthedocs.io/en/latest/administration.html#document-retagger

 

In Django / Admin Page the cron job does not start.. Maybe i have to do this in unraid terminal? But how and where?

 

Thank you for your help.

 

The command:

 

document_retagger [-h] [-c] [-T] [-t] [-i] [--use-first] [-f] optional arguments: -c, --correspondent -T, --tags -t, --document_type -i, --inbox-only --use-first -f, --overwrite

 

 

Found a solution:

 

In Unraid > Docker > Start Console:

 

cd /app/paperless/src

python3 manage.py document_retagger -c 

 

Link to comment
  • 3 months later...

Hi guys,

 

I missed some files I sent via email to get fetched from my paperless and it showed this in the mail log:

 

Selecting folder INBOX
Searching folder with criteria (SINCE 12-Sep-2022)
Processing mail  from [email protected] with 1 attachment(s)
Skipping attachment 444545.pdf with content disposition inline

 

EDIT (SOLUTION):

 

It seems that Apple Mail (where I sent my stuf from) on iphone now only sends files inline, even PDFs. I had to say paperless to also grap the inline stuff in order to make it process the mails. 

 

image.png.b7608a21d80f55ada4d85a148eb2413a.png

 

Edited by Retrogamer137
  • Thanks 1
Link to comment
  • 2 months later...
  • 1 month later...

Perhaps I need something explained to me about how Paperless-NGX works but I feel like I'm missing something.

 

When I scan a document I would like to have the newest documents I've added appear on my front page. my assumption is this is under the "Added" filter under documents, however I'll scan and add a document and have the filter set to "Last 7 Days" and documents I scan today won't show up. Is that filter set to the previous day and back 7 days from that?

Link to comment

Guessing here. The document date is being picked up via something it thinks is a document date after OCRing it. I suspect if you look at the document properties in p-ngx you might see the connection.

 

I have my new documents tagged with "inbox" automatically so I can easily find them when I use the web app. Then I can update the metadata and remove the inbox tag.

Link to comment
  • 2 weeks later...
  • 2 months later...

RESOLVED the issue

I can now get the paperless-ngx login page to show.

 

but i get this error (image)

 

this is my swag proxy conf file

 

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name paperless-ngx.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    # enable for ldap auth, fill in ldap details in ldap.conf
    #include /config/nginx/ldap.conf;

    # enable for Authelia
    include /config/nginx/authelia-server.conf;

    #Organizr ServerAuth
    #include /config/nginx/proxy-confs/organizr-auth.subfolder.conf;
    #auth_request /auth-0;

    location / {
        # enable the next two lines for http auth
        # auth_basic "Restricted";
        # auth_basic_user_file /config/nginx/.htpasswd;

        # enable the next two lines for ldap auth
        # auth_request /auth;
        # error_page 401 =200 /ldaplogin;

        # enable for Authelia
        # include /config/nginx/authelia-location.conf;

        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_app 192.168.10.220;
        set $upstream_port 8000;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

        # REMOVE THIS LINE BEFORE SUBMITTING: Additional proxy settings such as headers go below this line, leave the blank line above.
    }

}

 

paperless.png

 

EDIT

 

Found the answer here

https://github.com/paperless-ngx/paperless-ngx/issues/712

Edited by Greygoose
Link to comment
  • 2 months later...
On 1/2/2021 at 2:24 PM, T0a said:

  logo-dark.png

 

Overview: Dedicated support thread for the Docker template paperless-ng provided via the selfhosters/unRAID-CA-templates repository.

Project Page: https://github.com/jonaswinkler/paperless-ng

Documentation: https://paperless-ng.readthedocs.io/en/latest/

Registry: https://hub.docker.com/r/jonaswinkler/paperless-ng/

Changelog: https://paperless-ng.readthedocs.io/en/latest/changelog.html

 

This is the official paperless-ng Docker support thread. Feel free to ask questions, share your experience with paperless-ng or describe your paperless setup at home. I try to update this main post regularly based on your feedback. From here on, I will use the terms paperless and paperless-ng interchangeable.

 

1. What is paperless-ng and how does it differ from the original paperless?

Paperless-ng is a fork of paperless, adding a new interface and many other changes under the hood. The original project paperless hasn't received a lot of updates and bug fixes in the past. Even pull requests are not merged for some time now (Update: 26.08.2021, The old paperless repository has been archived).

 

Here are a few key features of paperless-ng:

  • New front end build with Angular. It features full text search with scored and highlighted results, savable filters, a dashboard, and document uploading on the landing page

  • Mobile support is also almost there. Some layouts don't work yet on small screens

  • New mail consumer that supports multiple accounts and custom filters and actions. Fully tested!

  • Paperless-ng trains a neural network on your documents and assigns tags and correspondents automatically, if you instruct it to do so

  • Updated dependencies

  • More tests of critical backend parts

  • A proper task processing queue that can consume multiple documents in parallel. Consumption of many documents is now blazing fast on multi core system. Fixed much of the consumer code, so that it does not block the database during consumption, for instance

 

2. How to Install

  • Download and install a Redis container from the community application store (CA)
  • Download and configure the paperless-ng container from the CA
    • Make sure you point the container to your Redis instance. Use your actual IP and not localhost, because the reference is resolved in the container. In case you need to pass a password to Redis, use the following connection string redis://:[PASSWORD]@[IP]:6379 instead. At the moment Redis doesn't support users and only provides authentication against a global password. You can pass anything as a username, including the empty string as in my example here. To configure a password for your Redis container, set 'redis-server --requirepass "your-secret"' as post arguments on the Redis docker container. Also make sure to not use any special characters. Otherwise, the connection string might not be readable by paperless.
  • Create a user account after this container is created i.e. from Unraids Docker UI, click the paperless-ng icon and choose Console. Then enter the command "python manage.py createsuperuser" in the prompt and follow the instructions. Alternative, set 'PAPERLESS_ADMIN_USER' and 'PAPERLESS_ADMIN_PASSWORD' in your paperless-ng docker template. With the later approach, it might be easier to find your password to sensible documents stored in paperless.

 

3. My personal workflow

I use the iOS app ScannerPro to scan my documents and upload them via the app to a web DAV target on my Unraid server. The web DAV target is then mounted in the container as consume directory. Further, I use the pre and post hooks to execute web hooks in order to check via Home Assistant whether the processing failed for a uploaded document. Home Assistant sends then notifications about the import status to my phone. This way I can throw away the physical document without worrying about it being not imported.

 

How does your workflow look like? Feel free to share it in this thread. Here you can also find the official recommended workflow for managing your documents with paperless-ng.

 

4. FAQ

 

4.1 Why does the consumer not pick up my files?

The consumer service uses `inotify` to detect new documents in the consume folder. This subsystem, however, does not support NFS shares. You can disable `inotify` and use a time-based polling mechanism instead (see `PAPERLESS_CONSUMER_POLLING`. If set to a value n greater than 0, inotify is disabled and the directory is polled every n seconds).

 

4.2 How to customize paperless-ng?

Paperless-ng does support much more environment variables than the Unraid template offers. You can find them in the documentation here.

 

4.3 What scanner do you use for paperless-ng at home?

A list of scanners used by our community:

  • iPhone with ScannerPro app; one time purchase (@T0a)
  • More will be added when you share your scanner

Paperless-ng also maintains a list of recommended scanners. Feel free opening a pull request over there to add your recommended scanner to the documentation too.

 

4.4 Can I use paperless-ng on a mobile device?

Mobile support in paperless-ng is also almost there. Some layouts don't work yet on small screens. There is also a mobile app in pretty early development stage. Though, it is only available on the Android store yet.

 

4.5 What is the future of the original paperless template in Unraid?

At some point, I will probably remove the paperless template and close its support thread.

 

4.6 How to configure PostgreSQL as a database?

See this post on how to configure PostgreSQL in the template. The official documentation gives further migration steps needed.

 

Hi, the docs link does not work anymore.

Link to comment
  • 4 months later...

No write permission in consume folder

 

I still do not get my write permission issue managed after reading all posts. paperless is running great, but I am not able to manually put a file in the consume folder on the SMB share as I am always told I am missing the permission to do so.

I have received the UID 0 when using echo $UID in the console, the docker is running with the default values 99 and 100.

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.