Many of you will be familiar with Paperless-ngx. It is a tool for digitising and managing your documents. In general, I think the idea of a document management system is a good one. Until now, I have always used Synology Drive from my Synology NAS for this purpose.
I photographed the documents with Adobe Scan on my smartphone and stored them on the NAS.
Searching in Synology Drive worked quite well as long as Adobe Scan’s OCR recognised the text properly. This was the case in about 95% of instances.
But now I’ve discovered a game changer: Paperless-AI. This is an add-on for Paperless-ngx and has one HUGE advantage: I can chat with my documents. Can’t find your ADAC membership number right now? Just ask for it in the chat. Want to know how much your robot vacuum cleaner cost? No problem. And the best thing about it is that it only takes a few moments to set up.
Requirements
To get everything up and running, a few prerequisites must be met:
- Paperless-ngx must be installed.
- Portainer must be installed.
- If you want to work with OpenAI, you need an API key and must add money to your account (don’t worry: it only costs a few pence).
- If you want to use OpenAI, you must be aware that some of the content of your documents will be uploaded there
Install Paperless-ngx
You can get Paperless-ngx from the Add-on Store in Home Assistant. To do so, add the following repository:
https://github.com/BenoitAnastay/home-assistant-addons-repository/
You can then install and configure Paperless-ngx. In the configuration, you only need to enter the main language (Deu for German) and the time zone, e.g. Europe/Berlin.
You can now access Paperless-ngx via the URL: http://homeassistant.local:4000.
Install Portainer
I wrote a separate article about Portainer: Click here
Install Paperless-AI
Now that we have installed Portainer, we can also install Paperless-AI. To do this, click on ‘Stack – New Stack’ on the left. Enter a descriptive name, e.g. paperless-ai, and select ‘Web Editor’. Enter the text from the video on the Paperless-AI Github page and click on ‘Deploy the Stack’.
You can now access Paperless-AI via the URL http://homeassistant.local:3000.
Configure Paperless-AI
Now enter your Paperless-ngx data and OpenAI data. The Paperless-ngx URL must be specified with the port. You can find the Paperless-ngx API token in Paperless-ngx at the top right of your username and then under ‘My Profile’.
Also enter your OpenAI data. You can find the API key at https://platform.openai.com/api-keys. There you can click on ‘Create new secret key’.
Under ‘Add AI-processed tag to documents?’, I recommend selecting “Yes” and using ‘ai-processed’ as the tag. Under ‘AI Function Limits’, everything should be selected to get the most functions. Under ‘Prompt Description’, you can click on the ‘Example’ button.
Upload Documents
Everything is now up and running. What next? Open Paperless-ngx and drag one of your documents into it. It will be uploaded to Paperless-ngx. Paperless-AI scans for new documents every 30 minutes. Alternatively, you can click on the ‘Scan now’ button in the dashboard. Your document will then be analysed by the AI and tagged with correspondents, tags and much more. Now you can search for keywords in Paperless-ngx.
Use the chat
I know we’re all just here for the chat. To do this, click on ‘RAG Chat’ in Paperless-AI. If the status of the individual items is not green, click on ‘Start Indexing’. An index will be created. Only then can you ask questions about your documents.
Costs
Depending on how many documents you have OpenAI analyse, the costs may be higher or lower. I uploaded approximately 300 pages of documents and it cost approximately 0.30 $.
Troubleshooting
At first, I had problems with the initial setup view being displayed when I connected to Paperless-AI with another device or cleared my cache.
This is probably because the container configuration described on the Paperless AI website is not entirely optimal for our scenario. Instead, I used the ‘Samba Share’ tool to create a share and told the stack to store the data there. Only one line was changed.
You can download the customised stack here.







