Have you tried changing UID and GID of paperless?
There is an tutorial online for Synology Nas how to get the gid and his via email report.
That could really be the last puzzle piece. I also did that before firing it up
What do you think about paperless-ai? It would be a nice extension and add-on.
Itās something I was thinking to add to the repository but I havenāt tested it already
That would be cool, Iād give it a try.
My use case is primarily scanned or generated documents that get good titles.
Hi BenoƮt !
Many thanks for the job ! Happy to be able to have paperless on my hass directly !!
One question : Is it plan to setup MFA and/or fail2ban ?
regards
I will not add additional process to this add-on since it need to stay minimalist for some setups.
But you can extend this using proxy on anotherās add-ons and setting the paperless.conf
Hi @BenoitAnastay,
Thanks for creating the add-on!
I am having the same issue as @Kritter. I am running home assistant OS on a RaspberryPie 4. I installed Paperless as add-on.
I used HA built-in network storage function to mount my NAS for the shared/paperless folder.
When starting paperless, I get the error: āPermissionError: [Errno 13] Permission denied: ā/share/paperless/media/media.lockāā
(However, the add-on was able to create the consume and media folder)
I tried updating the UID/GID to both 0. However, that also did not work.
I also tried updating the UID/GID to both 1000. But this also did not work.
Any idea why I am getting the error?
Or how to find out which UID/GID the add-on uses?
Here is my log, after I changed both UID/GID to 0:
Add-on: Paperless-ngx
Paperless is an application that manages your personal documents. With the help of a document scanner, paperless transforms your wieldy physical document binders into a searchable archive and provides many utilities for finding and managing your documents.
-----------------------------------------------------------
Add-on version: 2.3.0
You are running the latest version of this add-on.
System: Home Assistant OS 15.1 (aarch64 / raspberrypi4-64)
Home Assistant Core: 2025.4.1
Home Assistant Supervisor: 2025.03.4
-----------------------------------------------------------
Please, share the above information when looking for help
or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-timezone: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
[16:40:40] INFO: Configuring timezone (America/New_York)...
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service base-addon-timezone successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-paperless: starting
s6-rc: info: service init-nginx: starting
s6-rc: info: service redis: starting
s6-rc: info: service redis successfully started
Ingress is enabled
s6-rc: info: service init-nginx successfully started
PAPERLESS_CSRF_TRUSTED_ORIGINS is set to https://192.168.5.149:8123,http://192.168.5.149:8123,https://192.168.5.149,http://192.168.5.149,https://fd23:8690:9d46:e4e2:36c6:6d1e:9783:f960
fe80::d149:1811:c053:9672:8123,http://fd23:8690:9d46:e4e2:36c6:6d1e:9783:f960
fe80::d149:1811:c053:9672:8123,https://fd23:8690:9d46:e4e2:36c6:6d1e:9783:f960
fe80::d149:1811:c053:9672,http://fd23:8690:9d46:e4e2:36c6:6d1e:9783:f960
fe80::d149:1811:c053:9672,https://hindseb.tk:8123,http://hindseb.tk:8123,https://hindseb.tk,http://hindseb.tk,https://homeassistant:8123,http://homeassistant:8123,https://homeassistant,http://homeassistant,https://homeassistant.local:8123,http://homeassistant.local:8123,https://homeassistant.local,http://homeassistant.local,https://ingress.local:8123,http://ingress.local:8123,https://ingress.local,http://ingress.local,https://hindseb.tk
s6-rc: info: service init-paperless successfully started
s6-rc: info: service paperless: starting
s6-rc: info: service paperless successfully started
s6-rc: info: service nginx: starting
s6-rc: info: service nginx successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
Paperless-ngx docker container starting...
Installing languages...
Package tesseract-ocr-eng already installed!
Package tesseract-ocr-deu already installed!
Package tesseract-ocr-fra already installed!
Package tesseract-ocr-ita already installed!
Package tesseract-ocr-spa already installed!
Mapping UID and GID for paperless:paperless to 0:0
Creating directory scratch directory /tmp/paperless
mkdir: created directory '/tmp/paperless'
Adjusting permissions of paperless files. This may take a while.
changed ownership of '/usr/src/paperless/export' from root:1000 to paperless:paperless
Waiting for Redis...
Connected to Redis broker.
Apply database migrations...
Operations to perform:
Apply all migrations: account, admin, auditlog, auth, authtoken, contenttypes, django_celery_results, documents, guardian, mfa, paperless, paperless_mail, sessions, socialaccount
Running migrations:
[16:42:40] INFO: Starting NGinx....
Hi,
Thanks for the maintaining this add-on!
Iām trying to migrate my documents and tags from an other installation on a NAS. They have the same Version number. I got the export via document_exporter un my old NAS, unzip it, copied to the docker paperless container on homeassistant to /usr/src/paperless/export. I chown all files to paperless:paperless. I chmod 666 all files. I used the env var like postet here but for document_importer and got this error:
root@ca5234a0-paperless-ngx:/usr/src/paperless/src# PAPERLESS_DATA_DIR=/config/data PAPERLESS_MEDIA_ROOT=/share/paperless/media document_importer ../export
Found existing user(s), this might indicate a non-empty installation
Checking the manifest
CommandError: The manifest file refers to "2025-03-03 Rƶntgengesellschaft Deutscher Rƶntgenkongress 2025.pdf" which does not appear to be in the source directory.
I donāt understand this. The files are at the ā¦/export/ directory where manifest file was found.
root@ca5234a0-paperless-ngx:/usr/src/paperless/src# ls -l ../export/*Rƶ*
-rw-rw-rw- 1 paperless paperless 301648 Apr 24 17:43 '../export/2025-03-03 Rƶntgengesellschaft Deutscher Rƶntgenkongress 2025.pdf'
-rw-rw-rw- 1 paperless paperless 301824 Apr 24 17:43 '../export/2025-03-03 Rƶntgengesellschaft Deutscher Rƶntgenkongress 2025.pdf-archive.pdf'
-rw-rw-rw- 1 paperless paperless 22790 Apr 24 17:43 '../export/2025-03-03 Rƶntgengesellschaft Deutscher Rƶntgenkongress 2025.pdf-thumbnail.webp'
I tried different folders and privileges, restart the container (which emptied the export directory), copied the files again, but I donāt understand. what is going on.
Can you help me?
Honestly I never tried to do an important,
But what I can suggest is to do an export on your new installation to compare the structure and checks if it can be imported.
I had the same issue during an import and found out that the issue occurred with all documents containing āUmlauteā, such as Ƥ, ƶ, ü. Unfortunately, this is just a suspicion, and I resolved the problem with a workaround: instead of using the export- and import function, I directly replaced all the files. Like the media and data folder.
I have updated the addon with v2.15.3 on the edge repository but Iāll need the feedback of thoses who are using NAS storage to makes sure thereās no issue before publishing a release
Hi Benoit,
after careful reading of this thread I am still not able to solve my problem: Display of documents in Home Assistant Companion App (Android) not possible. App opens browser and that delivers error ā401: Unauthorizedā
Document view via Browser on PC is working fine.
Always logged in as admin with all rights
Paperless-ngx running as addon on HA OS (NUC)
access via Nabu.Casa
User: admin with all rights
So Iād be grateful for your support. Thank you kindly in advance!
EDIT:
the URL HA Companion is trying to reach when I select preview of a document:
https://āmy_ULR_at_Nabu.Casaā/api/hassio_ingress/āalphanumeric_codeā/api/documents/āASNā/preview/āsearch_criteriaā
my URL at Nabu.Casa is correct
the alphanumeric code after /api/Hassio_ingress/ not clear to me. Could that be the error source?
Configuration (enabling SSL and/or Ingress autentification leads to Bad Gateway and inaccessibility of Paperless)
Ingress auth should work, for the preview I know i have to download files on my phone
Benoit I full appreciate your statement but honestly I still do not know what to do now.
It should be possible to preview / open documents with the Home Assistant Companion app but I miss which settings I have to change to achieve this.
Please have a look and advise. Thanx.
The problem is that I canāt replicate the 401 error, I just have the issue that my phone is downloading files instead of showing a preview
Also ingress authentication is working well.
Does your username are matching between paperless and home assistant?
Yes, I understand that you have problems to reproduce my mistake.
I used to use different usernames (admin in paperless) but I just created a superuser with all rights with identical username and credentials as my Home Assistant user and get the same 401.
Okay this is obviously not solveable. I would use the paperless mobile app instead, but here I have the problem that I can only use it when I am on the same WLAN as the Home Assistant. From outside my phone does not connect, neither via IP of my Home Assistant Server nor via NabuCasa
Desperationā¦
I personally use a VPN running on my ISP router to access paperless outside home.
Yes, I had the same idea. I should try that and maybe then everything will work.
THANK YOU for your patience and your support, Benoit