How to Install Joplin on Your Synology NAS

How to Install Joplin on Your Synology NAS

Joplin is a free, open source note taking and to-do application, which can handle a large number of notes organized into notebooks. The notes are searchable, can be copied, tagged and modified either from the applications directly or from your own text editor. The notes are in Markdown format. Notes exported from Evernote via .enex files can be imported into Joplin, including the formatted content (which is converted to Markdown), resources (images, attachments, etc.) and complete metadata (geolocation, updated time, created time, etc.). Plain Markdown files can also be imported. The notes can be synchronized with various cloud services including Nextcloud, Dropbox, OneDrive, WebDAV or the file system (for example with a network directory). When synchronizing the notes, notebooks, tags and other metadata are saved to plain text files which can be easily inspected, backed up and moved around. In this step by step guide I will show you how to install Joplin on your Synology NAS using Docker & Portainer.

💡Note: This guide works perfectly with the latest Joplin v2.14.2 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.

Joplin Synology NAS Set up 11

  • STEP 5

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

Joplin Synology NAS Set up 12

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

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

Check Enable HSTS

Destination:
Protocol: HTTP
Hostname: localhost
Port: 22300

Joplin Synology NAS Set up 13 new

  • 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.

Joplin Synology NAS Set up 4 new

  • STEP 9

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

Joplin Synology NAS Set up 5 new

  • STEP 10

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

Joplin Synology NAS Set up 1 new

  • STEP 11

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 12

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

1 Synology Portainer Add Stack

  • STEP 13

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

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

version: "3.9"
services:
  db:
    image: postgres:16
    container_name: Joplin-DB
    hostname: joplin-db
    mem_limit: 1g
    cpu_shares: 1024
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: ["CMD", "pg_isready", "-q", "-d", "joplin", "-U", "joplinuser"]
      timeout: 45s
      interval: 10s
      retries: 10
    volumes:
      - /volume1/docker/joplin:/var/lib/postgresql/data:rw
    environment:
      POSTGRES_DB: joplin
      POSTGRES_USER: joplinuser
      POSTGRES_PASSWORD: joplinpass
    restart: on-failure:5

  joplin:
    image: joplin/server:latest
    container_name: Joplin
    depends_on:
      - db
    ports:
      - 22300:22300
    restart: on-failure:5
    environment:
     APP_PORT: 22300
     APP_BASE_URL: https://joplin.yourname.synology.me
     DB_CLIENT: pg
     POSTGRES_PASSWORD: joplinpass
     POSTGRES_DATABASE: joplin
     POSTGRES_USER: joplinuser
     POSTGRES_PORT: 5432
     POSTGRES_HOST: db
     MAX_TIME_DRIFT: 0
     MAILER_ENABLED: 1
     MAILER_HOST: smtp.gmail.com
     MAILER_PORT: 587
     MAILER_SECURITY: starttls
     MAILER_AUTH_USER: Your-own-gmail-address
     MAILER_AUTH_PASSWORD: Your-own-app-password
     MAILER_NOREPLY_NAME: Your-own-gmail-address
     MAILER_NOREPLY_EMAIL: Your-own-gmail-address

Note: After you paste the code in the Web editor, change the value for APP_BASE_URL with your own synology.me DDNS address that you have previously created at STEP 6 with https:// at the beginning. If you want to use Joplin locally just change the value for APP_BASE_URL with your own local NAS IP followed by :22300 Example: APP_BASE_URL: http://192.168.1.18:22300
Note: Before you paste the code above in the Web editor area below, change the value for MAILER_AUTH_USER and type in your own Gmail address. STEP 11.
Note: Before you paste the code above in the Web editor area below, change the value for MAILER_AUTH_PASSWORD and type in your own Gmail app password. STEP 11.
Note: Before you paste the code above in the Web editor area below, change the value for MAILER_NOREPLY_NAME and type in your own Gmail address. STEP 11.
Note: Before you paste the code above in the Web editor area below, change the value for MAILER_NOREPLY_EMAIL and type in your own Gmail address. STEP 11.

Joplin Synology NAS Set up 6 new 2024

  • STEP 14

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.

Joplin Synology NAS Set up 7 new 2024

  • STEP 15

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

Joplin Synology NAS Set up 8 new 2024

  • STEP 16

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

  • STEP 17

Now open your browser and type in your HTTPS/SSL certificate https://joplin.yourname.synology.me in my case https://joplin.mariushosting.synology.me If everything goes right you will see the Joplin login page. Type in the default Email and Password. Follow the instructions in the image below.

⚠️Warning: the default email is admin@localhost and the default password is admin

Joplin Synology NAS Set up 9 new 2024

  • STEP 18

You will be prompted to change the admin password. Click Change it now. Follow the instructions in the image below.

Joplin Synology NAS Set up 10 new 2024

  • STEP 19

Type in your Full name, Email and Password then click Update profile. Follow the instructions in the image below.

Joplin Synology NAS Set up 11 new 2024

  • STEP 20

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

Joplin Synology NAS Set up 12 new 2024

  • STEP 21

Log in using your new credentials that you have previously added at STEP 19, then click Login. Follow the instructions in the image below.

Joplin Synology NAS Set up 13 new 2024

  • STEP 22

Your email has been confirmed.

Joplin Synology NAS Set up 14 new 2024

  • STEP 23

Click the Admin tab to access your Administration page. Follow the instructions in the image below.

Joplin Synology NAS Set up 15 new 2024

Enjoy Joplin!

🆘TROUBLESHOOTING

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

Note: You have to use a Joplin Client on Desktop or Mobile. The Docker Joplin Server is only a Sync Target, no user GUI for not creating, editing, viewing (Expected for shared notes) or managment.
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 Joplin container with the latest image.
Note: How to Free Disk Space on Your NAS if You Run Docker.
Note: Instead of the synology.me DDNS you can also use your own domain name.
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 Saturday / February 24th, 2024 at 5:51 AM