This is an old revision of the document!
Install paperless-ngx on Debian without Docker
Caveat: this guide assumes a non-Raspberry pi machine, and SQLite as database (which is ok for small installations).
Install dependencies and configure the system
First, we'll need to install all required dependencies:
apt install valkey-server python3 python3-pip python3-dev fonts-liberation imagemagick libmagic-dev poppler-utils build-essential python3-setuptools python3-wheel
If you're planning on sending gpg-encrypted emails to paperless, you'll also need to add gnupg to the list of packages. You can use redis-server instead of valkey-server if you prefer. The following packages are needed if you want to run OCR on your documents:
apt install unpaper ghostscript icc-profiles-free qpdf libleptonica6 libxml2 pngquant zlib1g tesseract-ocr tesseract-ocr-//xxx//
where xxx is the language code for the languages your documents will be in (eng, ita, deu, etc.).
Now it's time to add a service system user and group for the application, which will be installed in /opt/paperless:
adduser paperless --system --home /opt/paperless --group
Download, install and paperless-ngx
We need to download the latest paperless release from the github repo (replace x.x.x with the latest release number). Do not clone the git repo, but download the release, which contains some compiled code absent in the repo. This is the sequence of inputs to download the release file, extract it, and move everything inside /opt/paperless:
cd /opt/paperless sudo -u paperless wget https://github.com/paperless-ngx/paperless-ngx/releases/download/vx.x.x/paperless-ngx-vx.x.x.tar.xz sudo -u paperless tar -xf paperless-ngx-vx.x.x.tar.xz mv paperless-ngx/* . mv paperless-ngx/.* .
At this point we need to edit the paperless.conf file to adapt it to our installation. It is important to uncomment and properly set these variables:
PAPERLESS_REDIS PAPERLESS_DBENGINE=sqlite # It may not be necessary to create this for sqlite, but just in case... PAPERLESS_CONSUMPTION_DIR PAPERLESS_DATA_DIR PAPERLESS_MEDIA_ROOT # If needed it can be the same directory as PAPERLESS_DATA_DIR PAPERLESS_STATICDIR PAPERLESS_SECRET_KEY PAPERLESS_URL PAPERLESS_OCR_LANGUAGE PAPERLESS_TIME_ZONE
Make sure you create the folders you have assigned in the config file and chown them to the paperless:paperless user and group.