How to Install Leantime on Your Synology NAS

How to Install Leantime on Your Synology NAS 2023

Leantime is an open source project management system for small teams and startups written in PHP, JavaScript and using MySQL as the database. It combines lean product development and agile project management into one platform so that users have the right features from start to finish. In this step by step guide I will show you how to install Leantime on your Synology NAS using Docker & Portainer.

💡Note: This guide works perfectly with the latest Leantime v3.3.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 / Network / Connectivity tab/ Check Enable HTTP/2 then click Apply. Follow the instructions in the image below.

Leantime Synology NAS Set up 1

  • STEP 5

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

Leantime Synology NAS Set up 2

  • STEP 6

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

Leantime Synology NAS Set up 4a

  • STEP 7

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

Leantime Synology NAS Set up 4b

  • STEP 8

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

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

Check Enable HSTS

Destination:
Protocol: HTTP
Hostname: localhost
Port: 4805

Leantime Synology NAS Set up 4c

  • STEP 9

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 10

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

Leantime Synology NAS Set up 3 new

  • STEP 11

Now create one new folder inside the leantimedb folder that you created at STEP 10 and it private and public. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Leantime Synology NAS Set up 4 new

  • STEP 12

Download (click on the blue link below) then unzip and upload the customi.ini file below in the leantimedb folder that you have previously created at STEP 10. 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!

👉🏻Download custom.ini

Leantime Synology NAS Set up 5 new

  • STEP 13

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

Leantime Synology NAS Set up 6 new

  • STEP 14

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.

Leantime Synology NAS Set up 7 new

  • STEP 15

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

Leantime Synology NAS Set up 8 new

  • STEP 16

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

Leantime Synology NAS Set up 9 new

  • STEP 17

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

Leantime Synology NAS Set up 10 new

  • STEP 18

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 19

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 20

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

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

services:
  db:
    image: mariadb:11.4-noble #LTS Long Time Support Until May 29, 2029.
    container_name: Leantime-DB
    hostname: leantime-db
    mem_limit: 1g
    cpu_shares: 768
    security_opt:
      - no-new-privileges:false
    volumes:
      - /volume1/docker/leantimedb:/var/lib/mysql:rw
    environment:
      TZ: Europe/Bucharest
      MYSQL_ROOT_PASSWORD: rootpass
      MYSQL_USER: leantimeuser
      MYSQL_PASSWORD: leantimepass
      MYSQL_DATABASE: leantime
    restart: on-failure:5
     
  web:
    image: leantime/leantime:latest
    container_name: Leantime
    hostname: leantime
    mem_limit: 512m
    cpu_shares: 768
    security_opt:
      - no-new-privileges:true
    healthcheck:
      test: wget --no-verbose --tries=1 --spider http://localhost
    volumes:
      - /volume1/docker/leantimedb/custom.ini:/usr/local/etc/php/conf.d/custom.ini:rw
      - /volume1/docker/leantimedb/public:/var/www/html/public/userfiles:rw
      - /volume1/docker/leantimedb/private:/var/www/html/userfiles:rw
    ports:
      - 4805:80
    environment:
      LEAN_DB_HOST: leantime-db
      LEAN_DB_DATABASE: leantime
      LEAN_DB_USER: leantimeuser
      LEAN_DB_PASSWORD: leantimepass
      LEAN_EMAIL_RETURN: Your-own-gmail-address
      LEAN_EMAIL_USE_SMTP: true
      LEAN_EMAIL_SMTP_HOSTS: smtp.gmail.com
      LEAN_EMAIL_SMTP_USERNAME: Your-own-gmail-address
      LEAN_EMAIL_SMTP_PASSWORD: Your-own-app-password
      LEAN_EMAIL_SMTP_AUTO_TLS: true
      LEAN_EMAIL_SMTP_SECURE: TLS
      LEAN_EMAIL_SMTP_PORT: 587
      LEAN_APP_URL: https://leantime.yourname.synology.me
    depends_on:
      db:
        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 below, change the value for TZ. (Select your current Time Zone from this list.)
Note: Before you paste the code above in the Web editor area below, change the value for LEAN_EMAIL_RETURN and type in your own Gmail address. STEP 18.
Note: Before you paste the code above in the Web editor area below, change the value for LEAN_EMAIL_SMTP_USERNAME and type in your own Gmail address. STEP 18.
Note: Before you paste the code above in the Web editor area below, change the value for LEAN_EMAIL_SMTP_PASSWORD and type in your own Gmail address. STEP 18.
Note: Before you paste the code above in the Web editor area below, change the value for LEAN_APP_URL and type in your own synology.me DDNS with https:// at the beginning that you have previously created at STEP 8.

Leantime Synology NAS Set up 1 new3 2028

  • STEP 21

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.

Leantime Synology NAS Set up 1 new3 2029

  • STEP 22

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

Leantime Synology NAS Set up 3 2023

  • STEP 23

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

  • STEP 24

Now open your browser and type in your HTTPS/SSL certificate like this https://leantime.yourname.synology.me In my case it’s https://leantime.mariushosting.synology.me If everything goes right, you will see the Leantime installation page. Type in your own Email and Password in the Login Info area. Type in your own Name and Company name in the User Info area. Click Install. ⚠️Warning: Wait approximately 30/45 seconds for the installation to be completed. Follow the instructions in the image below.

Leantime Synology NAS Set up 4 2024

  • STEP 25

Click on your own synology.me DDNS link. Follow the instructions in the image below.

Leantime-Synology-NAS-Set-up-5-2025

  • STEP 26

Type in your own Email and your own Password you have previously created at STEP 24. Click Login. Follow the instructions in the image below.

Leantime-Synology-NAS-Set-up-6-2025

  • STEP 27

Your Leantime Dashboard at a glance!

Leantime-Synology-NAS-Set-up-7-2024

Enjoy Leantime!

🆘TROUBLESHOOTING

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

Note: If you experience connection issues with Leantime, make sure RULE 5 and RULE 6 is correctly applied on your Synology NAS Firewall configuration.

Note: Find out how to update the Leantime container with the latest image.
Note: How to Back Up Docker Containers on your Synology NAS.
Note: Can I run Docker on my Synology NAS? See the supported models.
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 Friday / November 22nd, 2024 at 3:07 PM