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 v.2.3.23 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

Enable synology.me DDNS. If you already have a synology.me DDNS, 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

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.

👉🏻Download custom.ini

Leantime Synology NAS upload files

  • STEP 12

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 13

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 14

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.

version: "3.9"
services:
  db:
    image: mariadb:10-jammy
    container_name: Leantime-DB
    hostname: leantime-db
    mem_limit: 1g
    cpu_shares: 768
    security_opt:
      - no-new-privileges:true
    user: 1026:100
    healthcheck:
      test: ["CMD-SHELL", "mysqladmin ping -u root -prootpass | grep 'mysqld is alive' || exit 1"]
    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
    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
    depends_on:
      db:
        condition: service_healthy

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

Leantime Synology NAS Set up 1 new2 2024

  • STEP 15

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 2 new2 2024

  • STEP 16

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 17

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

  • STEP 18

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. Follow the instructions in the image below.

Leantime Synology NAS Set up 4 2023

  • STEP 19

Wait approximately 30 seconds for the installation to be completed. Type in your own Email and your own Password you have previously created at STEP 18. Click Login. Follow the instructions in the image below.

Leantime Synology NAS Set up 5 2023

  • STEP 20

Your Leantime Dashboard at a glance!

Leantime Synology NAS Set up 3 new 2024

Enjoy Leantime!

🔥Troubleshooting: 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: 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 Saturday / May 20th, 2023 at 4:19 PM