Help with Paperless DockerHub -> Unraid


Recommended Posts

EDIT: It looks like it's because the dev used docker compose for his container. I'm going to see if I can figure out how to do it without docker compose since that's not included in unraid.

 

Hi!

 

I'm still getting the hang of docker.

 

I'm having a hard time getting this set up in unraid. Here is what I have currently that's not working. It might be because docker-compose files in the repo are .example and you're supposed to copy them without the .example. Also you have to manually create the superuser account in order to login:

docker-compose run --rm webserver createsuperuser

Which prompts you with a username,email,pass.

 

Here is what I have so far.

 

paperless.JPG.a8da3ccff9cf8bd70484099579bd9446.JPG.c21737edf5e0bf7edc8d8d755587efc9.JPG

 

I'm thinking that maybe I need to create my own container and upload it to dockerhub?

 

Any help would be greatly appreciated.

 

Github of project: https://github.com/danielquinn/paperless

Dockerhub link: https://hub.docker.com/r/danielquinn/paperless/

 

Edited by CrashnBrn
Link to comment

Decided to try to get this running.

 

This is what I did:

 

I first had a look at the dockerfile
https://github.com/danielquinn/paperless/blob/master/docker-compose.yml.example

 

It creates two services, the webserver and a consumer. Both using the same dockerfile but with some varying settings
https://github.com/danielquinn/paperless/blob/master/Dockerfile

 

Lets start with the webserver service

Unraid - apps - search for paperless - search docker hub - select danielquinn/paperless

 

Fill it out as follows:

Change 8001 to whichever port you want to use (one that is available on your unraid server)

And of course set some password instead of my (dummy) one

 

paperless_docker.thumb.JPG.a1540881782d04c73eccbaa713bd6bbc.JPG

 

I got the paths, port and environment variables from the docker compose file, which also referenced a separate env file
https://github.com/danielquinn/paperless/blob/master/docker-compose.env.example

 

I did not include the group id as on my first run this errored out because the unraid default group (100) already exists in the container. Which is unfortunate, but I won't bother with it atm. The reason we set up user id and group id for the docker containers is so the file permissions/ownerships stay "in sync" between unraid and the containers.

 

It fired up! But I could not log in. I got stumped, I could not find a default login anywhere.

 

After googling paperless default login I ended up here

Quote

7. To be able to login, you will need a super user. To create it, execute the following command:
$ docker-compose run --rm webserver createsuperuser

https://github.com/danielquinn/paperless/blob/master/docs/setup.rst

 

In order to run this "createsuperuser" command I recreated the container again, just to copy the command it uses.  In order to recreate: click the paperless container in the Unraid Web Ui, dummy change some value (add a space and remove it again) and hit apply so the container is recreated.

 

The reason for this is that we can hook on to that command and get an interactive shell, and by using the same command we get the same volume (folder) mounts. Which means our changes will hopefully be saved to our config folder and persist when recreating the container. We'll modify this command for our use. You could probably simplify this command by removing a lot of (possibly) unnecessary configs. But as it's a simple copy/paste with a couple of edits I chose to not clean it up as all it would really get me was possible error sources.

docker run -d --name='paperless' --net='bridge' -e TZ="America/Los_Angeles" -e HOST_OS="unRAID" -e 'PAPERLESS_OCR_LANGUAGES'='' -e 'USERMAP_UID'='99' -e 'PAPERLESS_PASSPHRASE'='xxIj4C2n7vIwLcyiu6xQ' -p '8001:8000/tcp' -v '/mnt/user/appdata/paperless/data':'/usr/src/paperless/data':'rw' -v '/mnt/user/appdata/paperless/media':'/usr/src/paperless/media':'rw' -v '/mnt/user/appdata/paperless/consume':'/consume':'rw' -v '/mnt/user/appdata/paperless/export':'/export':'rw' 'danielquinn/paperless' runserver --insecure --noreload 0.0.0.0:8000

 

We need to remove the existing container first so we can create a new one when running our craetesuperuser command.

 

Run this on the server:

docker rm paperless

 

Then I simply modified the command above for the container to be removed automatically as we don't want to save this container which tries to create a super user on start (--rm), changed it out to be interactive (-it) and I removed -d for daemon (background process) and changed the command from running the server to creating the super user.

 

Run this on the server:

docker run --rm -it --name='paperless' --net='bridge' -e TZ="America/Los_Angeles" -e HOST_OS="unRAID" -e 'PAPERLESS_OCR_LANGUAGES'='' -e 'USERMAP_UID'='99' -e 'PAPERLESS_PASSPHRASE'='xxIj4C2n7vIwLcyiu6xQ' -p '8001:8000/tcp' -v '/mnt/user/appdata/paperless/data':'/usr/src/paperless/data':'rw' -v '/mnt/user/appdata/paperless/media':'/usr/src/paperless/media':'rw' -v '/mnt/user/appdata/paperless/consume':'/consume':'rw' -v '/mnt/user/appdata/paperless/export':'/export':'rw' 'danielquinn/paperless' createsuperuser

 

Enter username, email and password when prompted. You should be disconnected from the container afterwards.

 

Then click the paperless container in the Unraid Web Ui again, dummy change some value (add a space and remove it again) and hit apply so our proper container is recreated.

 

Paperless should now be running at http://tower:8001 (or whichever port you chose)

 

---

 

But! It's not doing much since we don't yet have the consumer service running. So on to the next service, since it's basically the same docker container it should be simple (??)

 

Go to
http://tower/Docker/AddContainer

 

Select the paperless template we just made (it should now be under user templates)

 

Fill it out as follows:

It's cruical you select the same passphrase here as in the other container

You must also select a different name as you can't have two containers with the same name

And lastly you should add the languages you want the OCR to use

paperless_consumer_docker.thumb.JPG.114dafa6781b58b62c7395f204519da8.JPG

 

You should now have both paperless and paperless_consumer running.

 

If you now try to copy a file over to the consume folder (I have it available over SMB/windows file share) and wait a few moments it should dissappear from the consume folder and magically pop up in the admin ui

 

paperless_admin.thumb.JPG.1d615921f0b8b3e200366b526540bd87.JPG

 

edit: fixed a typo -rm -> --rm

Edited by JimL
  • Like 4
  • Upvote 1
Link to comment
  • 1 month later...
12 hours ago, ben-nl said:

 

Are you still happy with this setup of Paperless?

 

Thanks

 

Yup! It's been working for me. There was one time that I needed to restart the containers since they weren't sucking in the scanned docs but since then everything has been great (even through updates)

  • Upvote 1
Link to comment
  • 4 weeks later...

Hey guys about to run this,  just wanted to verify that the following is just informational, and NOT things i need to run on the server?: 

 

On 5/27/2018 at 3:43 PM, JimL said:

In order to run this "createsuperuser" command I recreated the container again, just to copy the command it uses.  In order to recreate: click the paperless container in the Unraid Web Ui, dummy change some value (add a space and remove it again) and hit apply so the container is recreated.

 

The reason for this is that we can hook on to that command and get an interactive shell, and by using the same command we get the same volume (folder) mounts. Which means our changes will hopefully be saved to our config folder and persist when recreating the container. We'll modify this command for our use. You could probably simplify this command by removing a lot of (possibly) unnecessary configs. But as it's a simple copy/paste with a couple of edits I chose to not clean it up as all it would really get me was possible error sources.


docker run -d --name='paperless' --net='bridge' -e TZ="America/Los_Angeles" -e HOST_OS="unRAID" -e 'PAPERLESS_OCR_LANGUAGES'='' -e 'USERMAP_UID'='99' -e 'PAPERLESS_PASSPHRASE'='xxIj4C2n7vIwLcyiu6xQ' -p '8001:8000/tcp' -v '/mnt/user/appdata/paperless/data':'/usr/src/paperless/data':'rw' -v '/mnt/user/appdata/paperless/media':'/usr/src/paperless/media':'rw' -v '/mnt/user/appdata/paperless/consume':'/consume':'rw' -v '/mnt/user/appdata/paperless/export':'/export':'rw' 'danielquinn/paperless' runserver --insecure --noreload 0.0.0.0:8000

 

We need to remove the existing container first so we can create a new one when running our craetesuperuser command.

 

Link to comment

 

22 hours ago, denellum said:

docker run -d --name='paperless' --net='bridge' -e TZ="America/Los_Angeles" -e HOST_OS="unRAID" -e 'PAPERLESS_OCR_LANGUAGES'='' -e 'USERMAP_UID'='99' -e 'PAPERLESS_PASSPHRASE'='xxIj4C2n7vIwLcyiu6xQ' -p '8001:8000/tcp' -v '/mnt/user/appdata/paperless/data':'/usr/src/paperless/data':'rw' -v '/mnt/user/appdata/paperless/media':'/usr/src/paperless/media':'rw' -v '/mnt/user/appdata/paperless/consume':'/consume':'rw' -v '/mnt/user/appdata/paperless/export':'/export':'rw' 'danielquinn/paperless' runserver --insecure --noreload 0.0.0.0:8000

 

 

If I remember correctly, you have to copy the command when you create Paperless container.

 

 

This is his copy of his container.

 

 

Link to comment
  • 1 month later...

Ok I am new to this forum and  I am only doing it in case there are more donkeys like me trying to seem cool and install complicated things. I spent some time trying to get this to work and because of simple mistakes it took me more than I'd like to admit, so I will put it as basic as possible. I'd like to thank CrashBrn for doing the hard work.

 

Step 1.  create super user (make sure these settings match where you want your files to go)

Quote

docker run --rm -it --name='paperless' --net='bridge' -e TZ="America/Los_Angeles" -e HOST_OS="unRAID" -e 'PAPERLESS_OCR_LANGUAGES'='' -e 'USERMAP_UID'='99' -e 'PAPERLESS_PASSPHRASE'='xxIj4C2n7vIwLcyiu6xQ' -p '8001:8000/tcp' -v '/mnt/user/appdata/paperless/data':'/usr/src/paperless/data':'rw' -v '/mnt/user/appdata/paperless/media':'/usr/src/paperless/media':'rw' -v '/mnt/user/appdata/paperless/consume':'/consume':'rw' -v '/mnt/user/appdata/paperless/export':'/export':'rw' 'danielquinn/paperless' createsuperuser

 

Step 2 create web docker (make sure everything matches the command on top including paths, ports, passphrase etc

Quote

docker run -d --name='paperless' --net='bridge' -e TZ="America/Los_Angeles" -e HOST_OS="unRAID" -e 'PAPERLESS_OCR_LANGUAGES'='' -e 'USERMAP_UID'='99' -e 'PAPERLESS_PASSPHRASE'='xxIj4C2n7vIwLcyiu6xQ' -p '8001:8000/tcp' -v '/mnt/user/appdata/paperless/data':'/usr/src/paperless/data':'rw' -v '/mnt/user/appdata/paperless/media':'/usr/src/paperless/media':'rw' -v '/mnt/user/appdata/paperless/consume':'/consume':'rw' -v '/mnt/user/appdata/paperless/export':'/export':'rw' 'danielquinn/paperless' runserver --insecure --noreload 0.0.0.0:8000

 

Step 3 so here is the part where you go to the docker ui, click add container, select paperless template. Change the name to paperless-consumer and make sure you switch from basic view to advanced view (top right button). Now fill it out exactly as it's mentioned in the original post by  CrashBrn (second to last image).  Again make sure you fill it out as you did in your first command and if all goes well you should have a proper paperless docker going on. test it as he mentions by adding a document in your consume folder.

 

If it didn't work, i suggest reviewing your commands, your template or simply starting from scratch and deleting the folders and docker containers created by your original command. 

 

also, i suggest you think about where you want your paths to be. For me the original paths did not work because I wanted all my files to be in a personal folder that could later on be backed up separate from the database. 

 

Anyone who feels my steps are wrong please feel free to comment and fix, thanks.

 

I am no expert, I am just a man who wanted his files scanned. 

Edited by speedyg213
Link to comment
  • 3 months later...

speedyg213, I tried doing it the way you mentioned to do it, but it ended up not being able to update. (unraid would complain about how it was installed.)

 

ended up doing a mix of what you and CrashBrn did. I ran your first command. I then went and created the docker manually through the webgui instead of doing your 2nd command. After that was done, I created a docker matching CrashBrn's 3rd screen shot. Everything worked well after that! Just thought I'd throw this out there for those that ran into the same issue I had.

 

Thank you both Speedyg213 and CrashBrn! I can finally run this correctly on my unraid server instead of running it on a stand alone esxi client! And that makes not only me but my electric bill thank you two!

 

 

Link to comment
  • 3 months later...

I know this topic is a little old but It is so close to working for me but I seem to be unable to use it as my windows share for consume says I am not allowed to write to it... although the rest of the drive I can (if I go up one folder for example) I cannot figure out what is wrong... Any help would be appreciated!

Link to comment
  • 3 months later...

Hi guys - thanks for the posts here. Helped me get Paperless running. Working great but for one issue. The time / timezone doesn't seem to be applied. Hence any documents inputed are UTC but I am +10hrs so makes searching a little hard. Any ideas on what the issue is. I run 'date' from console of docker and the timezone is correct but the time is wrong (like it's still UTC).

Link to comment
  • 4 weeks later...
On 7/30/2019 at 12:28 AM, vfast said:

Hi guys - thanks for the posts here. Helped me get Paperless running. Working great but for one issue. The time / timezone doesn't seem to be applied. Hence any documents inputed are UTC but I am +10hrs so makes searching a little hard. Any ideas on what the issue is. I run 'date' from console of docker and the timezone is correct but the time is wrong (like it's still UTC).

In your volume mapping of the container map, try adding this: -v /etc/localtime:/etc/localtime:ro 

 

I also saw someone call out this environmental variable for time (normally it's TZ): PAPERLESS_TIME_ZONE

and the value of it for you will be something like: America/Los_Angeles

I'm not sure if this environmental variable works though, so give it a shot or the volume mapping. 

 

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

Hi,

 

I've been following Speedyg's instructions to set up the two Paperless containers in Unraid but I've not been able to get it working properly. I can log into to the web console however, when I add a document to the consume folder nothing happens. I've also tried using a combination of JimL and other comments instructions but I wasn't able to log in to the application.

 

I've tried removing all of the relevant folders and have started from scratch several times but still no joy.

 

Any ideas?

Link to comment
  • 4 weeks later...

I wanted to hop in and say that the original docker image does not seem to be updating anymore, leaving in quite a few bugs (I was unable to parse any PDFS at all).

 

this is the newer docker repo ive been using thats up to date, my "paperless" instance started working right when I switched to it

 

https://hub.docker.com/r/thepaperlessproject/paperless

 

you can easily switch to it by editing both (the webgui and consumer) your docker unraid configs, changing the "Repository:" to "thepaperlessproject/paperless"

Edited by spacecops
Link to comment
23 minutes ago, jonathanm said:

Whichever version's author seems to be actively maintaining it and will be willing to answer questions on how to get it running. You will be largely on your own, so support of the container author is crucial.

 

Thanks, got it. After looking into Paperless it seems way too difficult to get set up. Does anyone know of a application where i can scan in documents and have them searchable like you do on google drive? Does Nextcloud do this? That's sort of noob friendly? Synology seems to have many with good video guides. Anything like this for unRAID? 

 

Could I use OCRmypdf-auto and have that output to Nextcloud? I'm super new at this so something with simple set-up would be best. 

Link to comment
  • 2 months later...

With the information from this thread I successfully installed paperless today on my unRaid server. Thanks to @speedyg213 for the wrap-up. Let me briefly summarize the steps to install paperless with the new paperless CA template from 9th Nov 2019. I decided to use NFS mounts also for the consumer folder. So I had to adapt the commands slightly:

 

1. Create a NFS share with subfolder (e.g. media/ consume/ and data/)

2. Install paperless as web server from CA

2.1. Configure the NFS mounts for media/ consume/ and data/ created in step 1

2.2 Define PAPERLESS_OCR_LANGUAGES (in my case: "eng deu")

3. Login to the paperless container via the unRaid web-interface and issue the following command: "./manage.py createsuperuser". Follow the instructions to create the paperless user

4. Install paperless as consumer service in order to process documents in your /consume folder

4.1 Go to the docker UI, click add container and select the paperless template

4.2 Rename the container to "paperless-consumer"

4.3 Remove the port

4.4 Change the parameter "postargument" to "document_consumer --no-inotify --loop-time 60". This will start the consumer service with a 60 seconds time loop. It also disables the inotify feature, which does not work with consumer/ folders represented as NFS shares.

 

Now you should be also to place a document in your /consume folder of your NFS share and recognize it being imported to paperless.

 

Have a nice weekend everybody! Questions are welcome.

 

----- Edit ----

 

I also want to share my scanning workflow with Paperless and Nextcloud with you guys (See https://blog.kilian.io/paperless/ as reference). With the app ScannerPro, I can upload my scanned files to a Nextcloud folder via WebDav. This folder functions as paperless consume folder and grabs the files and imports them to paperless. Following steps required for the setup:

 

1. Mount the paperless /consume folder in the Nextcloud docker container via unRaids Docker template editor

2. Enable the external storage app as Nextcloud admin. The app can be found in the apps dropdown hidden in disabled apps.

3. Add the mounted consume/ folder as local storage for your Nextcloud user with name paperless-consume (Settings -> External Storage)

4. Configure the Nextcloud paperless-consume folder as WebDav target in your scan app

 

Quote

An added bonus is that the Nextcloud desktop client also syncs the consume directory to my computer, so I also have a directory there where I can drop PDF files to be added to paperless (https://blog.kilian.io/paperless/)

 

Edited by T0a
  • Thanks 1
Link to comment

@smittyuk Glad I could give something back. The `paperless` image referenced in the official CA template is BTW outdated (also mentioned by @spacecops). The project is now driven by its community (See: https://github.com/the-paperless-project/paperless/issues/470). Use the up-to-date image `thepaperlessproject/paperless` instead. I already proposed the change for the docker template in the UnRaid repository. Change should be on the way. In the meantime you can just stop your container and replace the image and click apply.

Edited by T0a
  • Thanks 1
Link to comment
  • trurl locked this topic
Guest
This topic is now closed to further replies.