How to Install Papermerge DMS on Your Synology NAS

How to Install Papermerge DMS on Your Synology NAS

Papermerge DMS or simply Papermerge is a open source document management system designed to work with scanned documents (also called digital archives). It extracts text from your scans using OCR, indexes them, and prepares them for full text search. Papermerge provides the look and feel of modern desktop file browsers. It has features like dual panel document browser, drag and drop, tags, hierarchical folders and full text search so that you can efficiently store and organize your documents. It supports PDF, TIFF, JPEG and PNG document file formats. Papermerge is perfect tool for long term storage of your documents. In this step by step guide I will show you how to install Papermerge DMS Version 3 on your Synology NAS using Docker & Portainer.

💡Note: This guide works perfectly with the latest Papermerge v3.0.3 release.

💡Note: Check out my previous Papermerge v2.0.1 guide.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

Install Portainer 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.

  • STEP 3

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

Papermerge DMS Synology NAS Set up 1

  • STEP 4

Now create four new folders inside the papermerge folder that you created at STEP 3 and name them core, db, media, redis. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Papermerge DMS Synology NAS Set up 2

  • STEP 5

Right click on the papermerge folder that you have previously created at STEP 3 then click Properties. Follow the instructions in the image below.

Papermerge DMS Synology NAS Set up 3

  • STEP 6

Go to the Permission tab then click Advanced options. From the drop-down menu choose “Make inherited permissions explicit“. Follow the instructions in the image below.

Papermerge DMS Synology NAS Set up 4

 

  • STEP 7

Select Everyone then click the Edit tab. Follow the instructions in the image below.

Papermerge DMS Synology NAS Set up 5

  • STEP 8

Check all Read and Write Permissions. Click Done. Follow the instructions in the image below.

Papermerge DMS Synology NAS Set up 6

  • STEP 9

After you click Done on STEP 8, check “Apply to this folder, sub-folders and files“. Click Save. Follow the instructions in the image below.

Papermerge DMS Synology NAS Set up 7

  • STEP 10

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

1 Synology Portainer Add Stack

  • STEP 11

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

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

  version: "3.9"
  x-backend: &common
    image: papermerge/papermerge:3.0.3
    environment:
        PAPERMERGE__SECURITY__SECRET_KEY: MariushostingMariushostingMari13
        PAPERMERGE__AUTH__USERNAME: marius
        PAPERMERGE__AUTH__PASSWORD: mariushosting
        PAPERMERGE__DATABASE__URL: postgresql://papermergeuser:papermergepass@db:5432/papermerge
        PAPERMERGE__REDIS__URL: redis://redis:6379/0
    volumes:
      - /volume1/docker/papermerge/core:/core_app/index_db:rw
      - /volume1/docker/papermerge/media:/core_app/media:rw
  services:
    web:
      <<: *common
      ports:
       - 12000:80
      depends_on:
        - redis
        - db
    worker:
      <<: *common
      command: worker
    redis:
      image: redis:7
      container_name: Papermerge-REDIS
      security_opt:
      - no-new-privileges:true
      volumes:
      - /volume1/docker/papermerge/redis:/data:rw
    db:
      image: bitnami/postgresql:16.1.0
      container_name: Papermerge-DB
      volumes:
        - /volume1/docker/papermerge/db:/bitnami/postgresql:rw
        - /volume1/docker/papermerge/db:/docker-entrypoint-initdb.d
        - /volume1/docker/papermerge/db:/docker-entrypoint-preinitdb.d
      environment:
        POSTGRESQL_USER: papermergeuser
        POSTGRESQL_PASSWORD: papermergepass
        POSTGRESQL_POSTGRES_PASSWORD: papermergepass
        POSTGRESQL_DATABASE: papermerge

Note: Before you paste the code above in the Web editor area below, change the value for PAPERMERGE__SECURITY__SECRET_KEY and add your own SECRET KEY. MariushostingMariushostingMari13 is an example for a SECRET KEY. You should invent your own Value. Add 32 random characters, both letters and numbers.
Note: Before you paste the code above in the Web editor area below, change the value for PAPERMERGE__AUTH__USERNAME. Type in your own username. marius is an example for a username. You will need this username later at STEP 15.
Note: Before you paste the code above in the Web editor area below, change the value for PAPERMERGE__AUTH__PASSWORD. Type in your own password. mariushosting is an example for a password. You will need this password later at STEP 15.

Papermerge DMS Synology NAS Set up 8

⚠️Warning: If you get an error message that says There is an error in the yaml syntax: YAMLSyntaxError: All collection items must start at the same column, just move version: in the same line as x-backend. Follow the instructions in the image below.

Papermerge Fix code 1

  • STEP 12

Scroll down on the page until you see a button named Deploy 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.

Papermerge DMS Synology NAS Set up 9

  • STEP 13

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

Papermerge DMS Synology NAS Set up 10

⌛Now just wait because the Papermerge image is about 2.2GB.

  • STEP 14

Go back to STEP 1 or you will deal with karma 🙂

  • STEP 15

Please wait approximately 5 minutes or you will get a blank 500 Internal Server Error page if you try to connect too soon. The installation process can take up to a few seconds/minutes. It will depend on your Internet speed connection & NAS power. Now open your browser and type in http://Synology-ip-address:12000 Type in your own Username and Password that you have previously added at STEP 11. Click Sign in. Follow the instructions in the image below.

Papermerge DMS Synology NAS Set up 11

  • STEP 16

Create your first folder! Follow the instructions in the image below.

Papermerge DMS Synology NAS Set up 12

  • STEP 17

Start uploading your documents! Follow the instructions in the image below.

Papermerge DMS Synology NAS Set up 13

  • STEP 18

Run OCR! Follow the instructions in the image below.

Papermerge DMS Synology NAS Set up 14

Enjoy Papermerge V3!

🆘TROUBLESHOOTING

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

Note: If you want to run the Papermerge 3 container over HTTPS, check How to Run Docker Containers Over HTTPS. In order to make Papermerge 3 work via HTTPS, it’s mandatory to activate WebSocket.

Note: Can I run Docker on my Synology NAS? See the supported models.
Note: Find out how to update the Papermerge V3 container with the latest image.
Note: How to Free Disk Space on Your NAS if You Run Docker.
Note: How to Schedule Start & Stop For Docker Containers.
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 Monday / February 5th, 2024 at 1:33 PM