Jump to content
T0a

[Support] Paperless Docker

67 posts in this topic Last Reply

Recommended Posts

On 3/17/2020 at 6:13 PM, lewispm said:

reverse proxy worked for me just fine.

 

I use NginxProxyManager

Mind sharing your reverse proxy configuration?  I can't seem to get mine to work.

Share this post


Link to post
On 4/4/2020 at 4:33 PM, T0a said:

 

 

 

 

@OOmatrixOO As long as the paperless metadata contain the original file name you should be save. In case you decide to move your documents to another management system, you can use the paperless Exporter to export the files with their original name. See Exporter documentation.

 

In case you access the documents not from the paperless web UI (e.g. via the share) the following Pull-Request might solve your problem. However, can't estimate when the feature gets merged.

 

 

Hi.

This Pull-Request ist that what im looking for. That would be great.

How does this work when its ready?

Work this only for new files?

Share this post


Link to post
Posted (edited)

To all Android paperless users who are keen to experiment, there is now a mobile app in pretty early development stage. Feel free to give the developer some feedback in order to improve the app.

 

On 4/29/2020 at 8:11 PM, OOmatrixOO said:

Hi.

This Pull-Request ist that what im looking for. That would be great.

How does this work when its ready?

Work this only for new files?

 

@OOmatrixOO seems like the PR got merged :) You should have access to the new feature after a container update via the UI. For now you need to add the env variable `PAPERLESS_FILENAME_FORMAT` yourself to the docker template. Will update the template soon.

 

I only had a glance at the code yet. There is a migration script that might rename already imported documents as well. Give it a try.

Edited by T0a

Share this post


Link to post
Posted (edited)

@T0a

 

Hi.

I've just tested it.

 

PAPERLESS_FILENAME_FORMAT: {created} - {title}

 

It works quite well.
I don't really like 2 things yet. How to save the documents in Paperless: 2020-04-28-0000000000 - test-0000007.pdf

Better would be 2020-04-28 - test
Can i remove the time (0000000000) and the counter (0000007) at the end?

 

Edited by OOmatrixOO

Share this post


Link to post
On 5/11/2020 at 5:00 PM, OOmatrixOO said:

Can i remove the time (0000000000) and the counter (0000007) at the end?

That's what I also would very appreciate.

Share this post


Link to post
On 5/11/2020 at 5:00 PM, OOmatrixOO said:

Can i remove the time (0000000000) and the counter (0000007) at the end?

+1

Share this post


Link to post

Hello all,

 

I have a question about the PAPERLESS_FILENAME_FORMAT parameter. 

 

The description of the parameter states "Specify a filename format for the document (directories are supported)." 

 

Does this mean that directories will be auto created if they don't exist?

 

For example I want to have directories for each correspondent so I set the parameter to: 

{correspondent}/{correspondent}-{created}-{title}

When I did a test the consume failed with "FileNotFoundError: [Errno 2] No such file or directory:" error in the log file, the document doesn't appear in Documents, and the original file is left in the consume directory.

 

Thanks!

Share this post


Link to post

Hello, I was hoping to use this to replace ocrmypdf-auto. But it looks like the OCR output is put into a database rather than re-encoded(?) inline within the document. Is there a switch or flag I can set to change this? I would like my PDF files to also have selectable text after OCR finishes, and other previous options I have used let me do this. Thanks!

Share this post


Link to post

Loaded this up today and it's running great.

 

One slight stumbling block I didn't see mentioned.  I don't use "Bridge" for my dockers, instead give them their own IP on br2 network.  The paperless server ran fine.  When I added the consumer, it complained that the IP was being used (it was, it was used by the server container).  In the end I used Bridge for consumer and it started.

But when I click on Webgui from the docker page, it goes to the wrong URL, trying the server IP address.  I manually type in the consumer address and it worked.  Not a biggie but some info in case others have the same problem.

 

I haven't tried the script that was posted to mount server and consumer from the same container.  Is that something that will be incorporated into this solution or is it something that I would have to try on my own if I want to give it a shot?

Share this post


Link to post
Posted (edited)

Actually, I realise my TZ is set incorrectly on Paperless.  it's showing UTC.  Above it says the TZ variable has been removed because it uses the servers TZ but it doesn't seem to be happening in my case.

 

Any idea how I can fix this?  My server's TZ is set correctly ( (UTC+08:00) Kuala Lumpur, Singapore)

 

UPDATE: Looked through the documentation and saw that the PAPERLESS_TIME_ZONE variable still works.  Added it to the startup script and all is good.

Edited by dalben

Share this post


Link to post

This software is great. I've got it setup as per OP and works fine.

 

My goal is a 100% paperless household. Most of my source of paper is mail and doctor visits.

 

Any suggestions on:

  1. What is the best budget home scanner to use for duplex scanning?
  2. How best to handle the work flow after the scan is consumed
    1. Do you just leave it in there and use search?
    2. Do you sort it by tag/correspondent to automatically move it to nextcloud?
    3. Other ideas?

Just looking for practical advice from other users that may have dialed in the workflow and are really happy with it.

Share this post


Link to post
Posted (edited)
On 4/8/2020 at 3:26 AM, lewispm said:

I did this and the document_consumer would run, but the webserver wasn't running.  There was an error in the log about /etc/passwd being locked, not sure if that was the problem.

I switched the two lines in the entry.sh (listing the webserver first, then the document_consumer second, as below) and it works now. 


#! /bin/bash

/sbin/docker-entrypoint.sh runserver 0.0.0.0:8000 --insecure --noreload &
/sbin/docker-entrypoint.sh document_consumer &
wait

And I also had to make the file executable (chmod +x).

I was getting frustrated in getting it to run as one docker...  Until I read this post.  once I reversed the order and chmod +x the entry.sh file, and 

made it a single line as below, the stopping and starting the docker became stable and worked every time.  I was getting mixed results until I made it on a one liner.

 

#! /bin/bash

/sbin/docker-entrypoint.sh runserver 0.0.0.0:8000 --insecure --noreload & /sbin/docker-entrypoint.sh document_consumer & wait

 

Now everything works as a single docker.  Thanks Louispm, Bling and TOa for making paperless a great tool.  Perhaps this script or equivalent can be embedded into the next docker update.

 

Edited by dcoens
mixed results as posted

Share this post


Link to post

I'm having an issue getting the container to run with both webserver and consumer in one container using the script.  This is what shows in the container log:

 

Mapping UID and GID for paperless:paperless to 99:100
Operations to perform:
Apply all migrations: admin, auth, contenttypes, documents, reminders, sessions
Running migrations:
No migrations to apply.
Unknown command: '--entrypoint'
Type 'manage.py help' for usage.

I've got the script in Post Arguments:

 

image.thumb.png.831c81a50b4ca88a1568bab916d67f6e.png

 

I've also tried it in Extra Parameters to no avail.  Tried quotes also.  I've changed the script like @dcoens mentions above as well.  The script is executable as well.  Any ideas what I'm doing wrong here?

Share this post


Link to post

Looks like I figured it out and I don't get the error any longer.  It had to do with line endings.  For anyone else, the entrypoint needs to go into Extra Parameters.  I was getting the following error when I had it in Extra Parameters:

 

standard_init_linux.go:211: exec user process caused "no such file or directory"

I found this post:

 

https://forums.docker.com/t/standard-init-linux-go-175-exec-user-process-caused-no-such-file/20025/9

 

I created the file in VS Code, which I needed to change the End of Line Sequence from CRLF to LF.

Share this post


Link to post

Hello all-

AWESOME software! Thanks for creating Paperless.

Has anyone gotten it to work via reverse proxy, specifically with LetsEncrypt? I'd love to see a sample subdomain .conf if possible.

TIA!

Share this post


Link to post
17 hours ago, dcpdad said:

Hello all-

AWESOME software! Thanks for creating Paperless.

Has anyone gotten it to work via reverse proxy, specifically with LetsEncrypt? I'd love to see a sample subdomain .conf if possible.

TIA!

I have mine working with the following subdomain.conf I hope it helps,:

 

# make sure that your dns has a cname set for radarr and that your radarr container is not using a base url

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

    server_name paperless.*;

    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;

    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 paperless;
        set $upstream_port 8000;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $http_connection;
    }

    location ~ (/paperless)?/api {
        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_app paperless;
        set $upstream_port 8000;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $http_connection;
    }
}
 

Share this post


Link to post
On 6/6/2020 at 5:40 PM, KeithG said:

Hello all,

 

I have a question about the PAPERLESS_FILENAME_FORMAT parameter. 

 

The description of the parameter states "Specify a filename format for the document (directories are supported)." 

 

Does this mean that directories will be auto created if they don't exist?

 

For example I want to have directories for each correspondent so I set the parameter to: 


{correspondent}/{correspondent}-{created}-{title}

When I did a test the consume failed with "FileNotFoundError: [Errno 2] No such file or directory:" error in the log file, the document doesn't appear in Documents, and the original file is left in the consume directory.

 

Thanks!

Not sure if you saw, but there is an issue for this in the paperless github: https://github.com/the-paperless-project/paperless/issues/651.  Looks like there is a pull request to fix it but has not yet been merged.

Share this post


Link to post

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.