How to Install Documenso on Your Synology NAS

How to Install Documenso on Your Synology NAS

Signing documents digitally should be fast and easy and should be the best practice for every document signed worldwide. This is technically quite easy today, but it also introduces a new party to every signature: the signing tool providers. While this is not a problem in itself, it should make us think about how we want these providers of trust to work. Documenso aims to be the world’s most trusted document-signing tool. This trust is built by empowering you to self-host Documenso and review how it works under the hood. You can also use Docuseal as an alternative to Documenso. In this step by step guide I will show you how to install Documenso on your Synology NAS using Docker & Portainer.

💡Note: This guide works perfectly with the latest Documenso v1.7.1 release.

  • 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

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.

  • STEP 4

Go to Control Panel / Login Portal / Advanced Tab / click Reverse Proxy. Follow the instructions in the image below.

Documenso Synology NAS Set up 1

  • STEP 5

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

Documenso Synology NAS Set up 2

  • STEP 6

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 Documenso. After that, add the following instructions:

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

Check Enable HSTS

Destination:
Protocol: HTTP
Hostname: localhost
Port: 3513

Documenso Synology NAS Set up 3

  • STEP 7

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

Synology Proxy WebSocket

  • STEP 8

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

Documenso Synology NAS Set up 4

  • STEP 9

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

Documenso Synology NAS Set up 5

  • STEP 10

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

Documenso Synology NAS Set up 6

  • STEP 11

Now create two new folders inside the documenso folder that you have previously created at STEP 10 and name them data and db. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Documenso Synology NAS Set up 7

  • STEP 12

Download (click on the blue link below) and upload the cert.p12 file below in the data folder that you have previously created at STEP 11. Follow the instructions in the image below. 🔒Note: Support my work to unlock the password. You can use this password to download any file on mariushosting forever! cert.p12 is a 10-year self-signed certificate. If you don’t want to support my work and download the certificate that I created, you can create your own self-signed certificate using the documenso instructions.

👉🏻cert.p12

Documenso Synology NAS Set up self signed certificate new 2025

  • STEP 13

Follow my step by step guide on how to activate SMTP for your Gmail account. This step is mandatory. Note: If you don’t want to use the easiest way for SMTP with Google and you already have SMTP details from your own Mail Server, you can just skip this STEP and use your personalized email SMTP details instead.

  • STEP 14

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 15

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

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

services:
  db:
    image: postgres:17
    container_name: Documenso-DB
    hostname: documenso-db
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: ["CMD", "pg_isready", "-q", "-d", "documenso", "-U", "documensouser"]
      timeout: 45s
      interval: 10s
      retries: 10
    volumes:
      - /volume1/docker/documenso/db:/var/lib/postgresql/data:rw
    environment:
      POSTGRES_DB: documenso
      POSTGRES_USER: documensouser
      POSTGRES_PASSWORD: documensopass
    restart: on-failure:5

  documenso:
    image: documenso/documenso:latest
    container_name: Documenso
    ports:
      - 3513:3000
    volumes:
      - /volume1/docker/documenso/data:/opt/documenso:rw
    depends_on:
      db:
        condition: service_healthy
    environment:
      - PORT=3000
      - NEXTAUTH_SECRET=iLE3qPl8jJZWSrmSJGERVQt6YKIQIoUT
      - NEXT_PRIVATE_ENCRYPTION_KEY=Lzav2o6C0HBsg75bo2dUPqpOZ5k4904E
      - NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY=Q6GigBFoGF62jhqzD4ebXEow5gLiSSs7
      - NEXTAUTH_URL=https://documenso.yourname.synology.me
      - NEXT_PUBLIC_WEBAPP_URL=https://documenso.yourname.synology.me
      - NEXT_PRIVATE_INTERNAL_WEBAPP_URL=https://documenso.yourname.synology.me
      - NEXT_PUBLIC_MARKETING_URL=https://documenso.yourname.synology.me
      - NEXT_PRIVATE_DATABASE_URL=postgres://documensouser:documensopass@documenso-db:5432/documenso
      - NEXT_PRIVATE_DIRECT_DATABASE_URL=postgres://documensouser:documensopass@documenso-db:5432/documenso
      - NEXT_PUBLIC_UPLOAD_TRANSPORT=database
      - NEXT_PRIVATE_SMTP_TRANSPORT=smtp-auth
      - NEXT_PRIVATE_SMTP_HOST=smtp.gmail.com
      - NEXT_PRIVATE_SMTP_PORT=587
      - NEXT_PRIVATE_SMTP_USERNAME=Your-own-gmail-address
      - NEXT_PRIVATE_SMTP_PASSWORD=Your-own-app-password
      - NEXT_PRIVATE_SMTP_SECURE=false
      - NEXT_PRIVATE_SMTP_FROM_NAME=mariushosting
      - NEXT_PRIVATE_SMTP_FROM_ADDRESS=Your-own-gmail-address
      - NEXT_PRIVATE_SIGNING_LOCAL_FILE_PATH=/opt/documenso/cert.p12
      #NEXT_PRIVATE_SMTP_UNSAFE_IGNORE_TLS=true
      #NEXT_PRIVATE_SMTP_APIKEY_USER=${NEXT_PRIVATE_SMTP_APIKEY_USER}
      #NEXT_PRIVATE_SMTP_APIKEY=${NEXT_PRIVATE_SMTP_APIKEY}
      #NEXT_PRIVATE_RESEND_API_KEY=${NEXT_PRIVATE_RESEND_API_KEY}
      #NEXT_PRIVATE_MAILCHANNELS_API_KEY=${NEXT_PRIVATE_MAILCHANNELS_API_KEY}
      #NEXT_PRIVATE_MAILCHANNELS_ENDPOINT=${NEXT_PRIVATE_MAILCHANNELS_ENDPOINT}
      #NEXT_PRIVATE_MAILCHANNELS_DKIM_DOMAIN=${NEXT_PRIVATE_MAILCHANNELS_DKIM_DOMAIN}
      #NEXT_PRIVATE_MAILCHANNELS_DKIM_SELECTOR=${NEXT_PRIVATE_MAILCHANNELS_DKIM_SELECTOR}
      #NEXT_PRIVATE_MAILCHANNELS_DKIM_PRIVATE_KEY=${NEXT_PRIVATE_MAILCHANNELS_DKIM_PRIVATE_KEY}
      #NEXT_PUBLIC_DOCUMENT_SIZE_UPLOAD_LIMIT=${NEXT_PUBLIC_DOCUMENT_SIZE_UPLOAD_LIMIT}
      #NEXT_PUBLIC_POSTHOG_KEY=${NEXT_PUBLIC_POSTHOG_KEY}
      #NEXT_PUBLIC_DISABLE_SIGNUP=${NEXT_PUBLIC_DISABLE_SIGNUP}
      #NEXT_PRIVATE_UPLOAD_ENDPOINT=${NEXT_PRIVATE_UPLOAD_ENDPOINT}
      #NEXT_PRIVATE_UPLOAD_FORCE_PATH_STYLE=${NEXT_PRIVATE_UPLOAD_FORCE_PATH_STYLE}
      #NEXT_PRIVATE_UPLOAD_REGION=${NEXT_PRIVATE_UPLOAD_REGION}
      #NEXT_PRIVATE_UPLOAD_BUCKET=${NEXT_PRIVATE_UPLOAD_BUCKET}
      #NEXT_PRIVATE_UPLOAD_ACCESS_KEY_ID=${NEXT_PRIVATE_UPLOAD_ACCESS_KEY_ID}
      #NEXT_PRIVATE_UPLOAD_SECRET_ACCESS_KEY=${NEXT_PRIVATE_UPLOAD_SECRET_ACCESS_KEY}
      #NEXT_PRIVATE_GOOGLE_CLIENT_ID=${NEXT_PRIVATE_GOOGLE_CLIENT_ID}
      #NEXT_PRIVATE_GOOGLE_CLIENT_SECRET=${NEXT_PRIVATE_GOOGLE_CLIENT_SECRET}

Note: Before you paste the code above in the Web editor area below, change the value for NEXTAUTH_SECRET. (Generate your own 32 length NEXTAUTH_SECRET.)
Note: Before you paste the code above in the Web editor area below, change the value for NEXT_PRIVATE_ENCRYPTION_KEY. (Generate your own 32 length NEXT_PRIVATE_ENCRYPTION_KEY.)
Note: Before you paste the code above in the Web editor area below, change the value for NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY. (Generate your own 32 length NEXT_PRIVATE_ENCRYPTION_SECONDARY_KEY.)
Note: Before you paste the code above in the Web editor area below, change the value for NEXTAUTH_URL and type in your own synology.me DDNS with https:// 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 NEXT_PUBLIC_WEBAPP_URL and type in your own synology.me DDNS with https:// 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 NEXT_PRIVATE_INTERNAL_WEBAPP_URL and type in your own synology.me DDNS with https:// 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 NEXT_PUBLIC_MARKETING_URL and type in your own synology.me DDNS with https:// 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 NEXT_PRIVATE_SMTP_USERNAME and type in your own Gmail address. STEP 13.
Note: Before you paste the code above in the Web editor area below, change the value for NEXT_PRIVATE_SMTP_PASSWORD and type in your own Gmail app password. STEP 13.
Note: Before you paste the code above in the Web editor area below, change the value for NEXT_PRIVATE_SMTP_FROM_NAME and type in your own name. mariushosting is an example for a name.
Note: Before you paste the code above in the Web editor area below, change the value for NEXT_PRIVATE_SMTP_FROM_ADDRESS and type in your own Gmail address. STEP 13.

Documenso Synology NAS Set up 8

  • STEP 16

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.

Documenso Synology NAS Set up 9 new 2025

  • STEP 17

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

Documenso Synology NAS Set up 10

  • STEP 18

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

  • STEP 19

Now open your browser and type in your HTTPS/SSL certificate like this https://documenso.yourname.synology.me/signup that you have previously created at STEP 6. In my case it’s https://documenso.mariushosting.synology.me/signup Type in your own details, then click Next. Follow the instructions in the image below.

Documenso Synology NAS Set up 11

  • STEP 20

Type in your own username, then click Complete. Follow the instructions in the image below.

Documenso Synology NAS Set up 12

  • STEP 21

Type in your own email then click Send confirmation email. Follow the instructions in the image below.

Documenso Synology NAS Set up 13

  • STEP 22

Check your email, then click Confirm your email. Follow the instructions in the image below.

Documenso Synology NAS Set up 14

  • STEP 23

Upload your PDF document!

Documenso Synology NAS Set up 15

  • STEP 24

Your Documenso instance at a glance!

Documenso Synology NAS Set up 16

Enjoy Documenso!

🆘TROUBLESHOOTING

If you want to disable public registration to your Documenso instance, just change the following line at STEP 14

#NEXT_PUBLIC_DISABLE_SIGNUP=${NEXT_PUBLIC_DISABLE_SIGNUP}

with

NEXT_PUBLIC_DISABLE_SIGNUP=true

Then update the stack to apply the new settings.

⚠️Warning: If you run the Documenso instance on localhost instead of reverse proxy, the send email confirmation at STEP 21 will not work. Reverse Proxy is mandatory for Documenso to make SMTP work.

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

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 out how to update the Documenso 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.