Setup Paperless-NGX on Synology NAS: the CLI way

After procrastinating this for far too long, I sat down and did a new setup of Paperless-NGX on my NAS.

For this, I followed the setup guide for docker-compose: https://docs.paperless-ngx.com/setup/#docker

This guide requires you to have Container Manager installed on your NAS. Under /volume1 I have created a folder called docker which has another folder called paperless in it. So the path will be /volume1/docker/paperless.

My adjustments to the docker-compose.yml file:

    volumes:
      - /volume1/docker/paperless/data:/usr/src/paperless/data
      - /volume1/docker/paperless/media:/usr/src/paperless/media
      - /volume1/docker/paperless/export:/usr/src/paperless/export
      - /volume1/docker/paperless/consume:/usr/src/paperless/consume

And a different port: someportnumber:8000.

My changes to the docker-compose.env:

PAPERLESS_TIME_ZONE=Europe/Berlin
PAPERLESS_OCR_LANGUAGE=deu

And the correct IDs for USERMAP_UID= and USERMAP_GID= which you can get from id -u and id -g. The guide will tell you this as well.

Notes

The guide uses docker compose ... to run docker-compose, without the dash. Synology uses docker-compose ... with dash, to run it. I was searching, why this was not working on my side. So, this could be one reason. 😅

Database Error

I've got this error: PostgreSQL Database directory appears to contain a database; Skipping initialization. Which resulted from an old installation. Because I wanted to a fresh start, I needed to remove the old data and found this command: 🚨 docker-compose down --volumes 🚨 Be careful, this will erase all related data.

Webserver Error

Because I'm stupid, I used the wrong timezone and got an error. ValueError: Incorrect timezone setting: Germany/Berlin The correct timezone I needed to set in docker-compose.env was: PAPERLESS_TIME_ZONE=Europe/Berlin.

Conclusion?

I've used docker-compose because I broke my installation for too often with the Container Manager. And in the end, it's just a UI wrapper which confuses me. So I go with docker-compose, which I'm used in the past for client projects. The setup was straightforward, excluding the errors I had, which were self-made in the end.


17 of #100DaysToOffload
#log #toFutureMe #paperless
Thoughts? Discuss...