Synology: Install Paperless NGX With Office Files Support (2024)

Synology: Install Paperless NGX With Office Files Support (1)

Paperless-ngx is a document management system that transforms your physical documents into a searchable online archive so you can keep, well, less paper. After my article on How to Install Paperless NGX on Your Synology NAS, many people have contacted me asking for an even more comprehensive guide so that office files such as .docx could also be uploaded. In this step by step guide I will show you how to install Paperless-ngx with Office files support on your Synology NAS using Docker & Portainer.

đź’ˇNote:This guide works perfectly with the latest Paperless-ngx 2.7.2 release.

Please Support My work by Making a Donation.

InstallPortainer using my step by step guide. If you already have Portainer installed on your Synology NAS, skip this STEP. Attention: Make sure you have installed the latest Portainer version.

Make sure you have a synology.me Wildcard Certificate. Follow my guide to get a Wildcard Certificate. If you already have a synology.me Wildcard certificate, skip this STEP.

Go toControl Panel/Login Portal/AdvancedTab / clickReverse Proxy. Follow the instructions in the image below.

Synology: Install Paperless NGX With Office Files Support (2)

Now click the “Create” button. Follow the instructions in the image below.

Synology: Install Paperless NGX With Office Files Support (3)

After you click the Create button, the window below will open. Follow the instructions in the image below.

On the General area, set the Reverse Proxy Name description: type in Paperless-NGX. After that, add the following instructions:

Source:
Protocol:HTTPS
Hostname: paperlessngx.yourname.synology.me
Port:443

Check Enable HSTS

Destination:
Protocol:HTTP
Hostname:localhost
Port:8777

Synology: Install Paperless NGX With Office Files Support (4)

On the Reverse Proxy Rules click the Custom Headertab. ClickCreateand then, from the drop-down menu, clickWebSocket. After you click on WebSocket, two Header Names and two Values will be automatically added. ClickSave. Follow the instructions in the image below.

Synology: Install Paperless NGX With Office Files Support (5)

Go to Control Panel / Network / Connectivity tab/ Check Enable HTTP/2 then click Apply. Follow the instructions in the image below.

Synology: Install Paperless NGX With Office Files Support (6)

Go to Control Panel / Security / Advanced tab/ Check Enable HTTP Compressionthen click Apply. Follow the instructions in the image below.

Synology: Install Paperless NGX With Office Files Support (7)

Go toFile Stationand open the docker folder. Inside the docker folder, create one new folder and name itpaperlessngx. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Synology: Install Paperless NGX With Office Files Support (8)

Now create seven new folders inside the paperlessngxfolder that you created at STEP 10 and name them consume, data, db, export, media, redis, trash.Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Synology: Install Paperless NGX With Office Files Support (9)

Log into Portainer using your username and password. On the left sidebar in Portainer, click on Stacksthen+ Add stack. Follow the instructions in the image below.

Synology: Install Paperless NGX With Office Files Support (10)

In the Name field type in paperlessngx. Follow the instructions in the image below.

Note: Copy Paste the code below in the Portainer Stacks Web editor.

version: "3.9"services: redis: image: redis:7 command: - /bin/sh - -c - redis-server --requirepass redispass container_name: PaperlessNGX-REDIS hostname: paper-redis mem_limit: 512m mem_reservation: 256m cpu_shares: 768 security_opt: - no-new-privileges:true read_only: true user: 1026:100 healthcheck: test: ["CMD-SHELL", "redis-cli ping || exit 1"] volumes: - /volume1/docker/paperlessngx/redis:/data:rw environment: TZ: Europe/Bucharest restart: on-failure:5 db: image: postgres:16 container_name: PaperlessNGX-DB hostname: paper-db mem_limit: 1g cpu_shares: 768 security_opt: - no-new-privileges:true healthcheck: test: ["CMD", "pg_isready", "-q", "-d", "paperless", "-U", "paperlessuser"] timeout: 45s interval: 10s retries: 10 volumes: - /volume1/docker/paperlessngx/db:/var/lib/postgresql/data:rw environment: POSTGRES_DB: paperless POSTGRES_USER: paperlessuser POSTGRES_PASSWORD: paperlesspass restart: on-failure:5 gotenberg: image: gotenberg/gotenberg:latest container_name: PaperlessNGX-GOTENBERG hostname: gotenberg security_opt: - no-new-privileges:true user: 1026:100 command: - "gotenberg" - "--chromium-disable-javascript=true" - "--chromium-allow-list=file:///tmp/.*" restart: on-failure:5 tika: image: ghcr.io/paperless-ngx/tika:latest container_name: PaperlessNGX-TIKA hostname: tika security_opt: - no-new-privileges:true user: 1026:100 restart: on-failure:5 paperless: image: ghcr.io/paperless-ngx/paperless-ngx:latest container_name: PaperlessNGX hostname: paperless-ngx mem_limit: 6g cpu_shares: 1024 security_opt: - no-new-privileges:true healthcheck: test: ["CMD", "curl", "-fs", "-S", "--max-time", "2", "http://localhost:8000"] interval: 30s timeout: 10s retries: 5 ports: - 8777:8000 volumes: - /volume1/docker/paperlessngx/data:/usr/src/paperless/data:rw - /volume1/docker/paperlessngx/media:/usr/src/paperless/media:rw - /volume1/docker/paperlessngx/export:/usr/src/paperless/export:rw - /volume1/docker/paperlessngx/consume:/usr/src/paperless/consume:rw - /volume1/docker/paperlessngx/trash:/usr/src/paperless/trash:rw environment: PAPERLESS_REDIS: redis://:redispass@paper-redis:6379 PAPERLESS_DBENGINE: postgresql PAPERLESS_DBHOST: paper-db PAPERLESS_DBNAME: paperless PAPERLESS_DBUSER: paperlessuser PAPERLESS_DBPASS: paperlesspass PAPERLESS_TRASH_DIR: ../trash PAPERLESS_FILENAME_FORMAT: '{created_year}/{correspondent}/{document_type}/{title}' PAPERLESS_OCR_ROTATE_PAGES_THRESHOLD: 6 PAPERLESS_TASK_WORKERS: 1 USERMAP_UID: 1026 USERMAP_GID: 100 PAPERLESS_TIME_ZONE: Europe/Bucharest PAPERLESS_ADMIN_USER: marius PAPERLESS_ADMIN_PASSWORD: mariushosting PAPERLESS_URL: https://paperlessngx.yourname.synology.me PAPERLESS_CSRF_TRUSTED_ORIGINS: https://paperlessngx.yourname.synology.me PAPERLESS_OCR_LANGUAGE: deu+eng PAPERLESS_TIKA_ENABLED: 1 PAPERLESS_TIKA_GOTENBERG_ENDPOINT: http://gotenberg:3000 PAPERLESS_TIKA_ENDPOINT: http://tika:9998 restart: on-failure:5 depends_on: db: condition: service_healthy redis: condition: service_healthy tika: condition: service_started gotenberg: condition: service_started

Note: Before you paste the code above in the Web editor area below, change the value numbers for user with your own UID and GID values. (Follow my step by step guide on how to do this.) 1026 is my personal UID value and 100 is my personal GID value. You have to type in your own values.
Note: Before you paste the code above in the Web editor area, change the value for TZ with your own time zone value. (Select your current Time Zone from this list.)
Note: Before you paste the code above in the Web editor area, change the values for USERMAP_UID and USERMAP_GID with your own number values. (Follow my step by step guide on how to do this.)
Note: Before you paste the code above in the Web editor area, change the value for PAPERLESS_TIME_ZONE with your own time zone value. (Select your current Time Zone from this list.)
Note: Before you paste the code above in the Web editor area, change the value for PAPERLESS_ADMIN_USER and add your own username. marius is an example of a username. You have to insert your own username.
Note: Before you paste the code above in the Web editor area, change the value for PAPERLESS_ADMIN_PASSWORD and add your own password. mariushosting is an example of a password. You have to insert your own password.
Note: Before you paste the code above in the Web editor area below, change the value for PAPERLESS_URLand type in your own synology.me DDNS withhttps:// at the beginning that you have previously created at STEP 6.
Note: Before you paste the code above in the Web editor area below, change the value for PAPERLESS_CSRF_TRUSTED_ORIGINSand type in your own synology.me DDNS withhttps:// at the beginning that you have previously created at STEP 6.
Note: Before you paste the code above in the Web editor area below, change the value for PAPERLESS_OCR_LANGUAGE and type in your own OCR language. deu+eng is for German and English. nld+eng is for Dutch and English. It’s important to understand that you need to add your own language firs AND then +eng for English. +eng is always mandatory. If you only add your OCR language, like deu, but not +eng, then paperless won’t work.

Synology: Install Paperless NGX With Office Files Support (11)

Scroll down on the page until you see a button namedDeploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection.

Synology: Install Paperless NGX With Office Files Support (12)

If everything goes right, you will see the following message at the top right of your screen: “Success Stack successfully deployed“.

Synology: Install Paperless NGX With Office Files Support (13)

Go back toSTEP 1or you will deal with karma 🙂.

Now open your browser and type in your HTTPS/SSL certificate like this https://paperlessngx.yourname.synology.me that you have previously created at STEP 6. In my case it’s https://paperlessngx.mariushosting.synology.me If everything goes right, you will see the Paperless-NGX Login page. Type in your own admin Username and Password that you have previously created at STEP 13 then click Sign in. Follow the instructions in the image below. ⚠️Warning: if you get an error message that says Username and/or password incorrect, this means your NAS is slow and didn’t create the superadmin user. You need to wait 2-3 minutes longer and try to log in again. Don’t rush to change the password or reinstall everything from scratch, just wait.

Synology: Install Paperless NGX With Office Files Support (14)

Start uploading your documents now with Office files support!

Synology: Install Paperless NGX With Office Files Support (15)

Enjoy Paperless-ngx with Office files support!

Synology: Install Paperless NGX With Office Files Support (16)

You can also enable Dark Mode and change the Sidebar Color Theme. On the left sidebar click on Settings then follow the instructions below.

Uncheck Use system settings
Check Enable dark mode.
Uncheck Invert thumbnails in dark mode.
Change your Theme Color then click Save. Follow the instructions in the image below.

Synology: Install Paperless NGX With Office Files Support (17)

If you encounter issues by using this container, make sure to check out the Common Docker issuesarticle.

🔥Troubleshoot: If you get the “Error while converting document to PDF: 503 Server Error: Service Unavailable for url: http://gotenberg:3000/forms/libreoffice/convert” – This is usually due to the server being “down” for scheduled maintenance or due to a heavy traffic load that prevents it from properly serving all incoming requests. You need to wait until the server is back up again. Also, the issue can be related to the fact that you are trying to access PaperlessNGX locally instead of via Reverse Proxy. Websocket at STEP 7 is mandatory.

🔥Troubleshoot: In case you get the following error message: Error occurred while consuming document invoice.pdf: DigitalSignatureError: Input PDF has a digital signature. OCR would alter the document, invalidating the signature, just add the following Environment variable in the compose at STEP 13:

PAPERLESS_OCR_USER_ARGS: '{"invalidate_digital_signatures": true}'

Add it after:

PAPERLESS_CSRF_TRUSTED_ORIGINS: https://paperlessngx.yourname.synology.me

It should look like this:

PAPERLESS_CSRF_TRUSTED_ORIGINS: https://paperlessngx.yourname.synology.mePAPERLESS_OCR_USER_ARGS: '{"invalidate_digital_signatures": true}'

đź’ˇSuggestion: You can also install Stirling-PDF to better manage your documents.
đź’ˇSuggestion: You can also install DocuSeal that provides secure and efficient digital document signing and processing.

Note: Can I run Docker on my Synology NAS?See the supported models.
Note: How to Back Up Docker Containers on your Synology NAS.
Note: Find outhow to update the Paperless-ngx containerwith the latest image.
Note:How to Free Disk Space on Your NAS if You Run Docker.
Note:.
Note:How to Activate Email Notifications.
Note:How to Add Access Control Profile on Your NAS.
Note:How to Change Docker Containers Restart Policy.
Note:How to Use Docker Containers With VPN.
Note:Convert Docker Run Into Docker Compose.
Note: How to Clean Docker.
Note: How to Clean Docker Automatically.
Note: Best Practices When Using Docker and DDNS.
Note: Some Docker Containers Need WebSocket.
Note: Find out the Best NAS Models For Docker.
Note: Activate Gmail SMTP For Docker Containers.

This post was updated on Tuesday / April 9th, 2024 at 1:57 AM

Synology: Install Paperless NGX With Office Files Support (2024)
Top Articles
Latest Posts
Article information

Author: Saturnina Altenwerth DVM

Last Updated:

Views: 5978

Rating: 4.3 / 5 (64 voted)

Reviews: 95% of readers found this page helpful

Author information

Name: Saturnina Altenwerth DVM

Birthday: 1992-08-21

Address: Apt. 237 662 Haag Mills, East Verenaport, MO 57071-5493

Phone: +331850833384

Job: District Real-Estate Architect

Hobby: Skateboarding, Taxidermy, Air sports, Painting, Knife making, Letterboxing, Inline skating

Introduction: My name is Saturnina Altenwerth DVM, I am a witty, perfect, combative, beautiful, determined, fancy, determined person who loves writing and wants to share my knowledge and understanding with you.