---
title: How to Deploy Leantime – Open-Source Project Management Platform
url: https://docs.vultr.com/how-to-deploy-leantime-open-source-project-management-platform
description: Deploy Leantime on a Linux server using Docker Compose with MySQL and Traefik for automatic HTTPS, then manage projects, milestones, and tasks in the web UI.
publish_date: 2026-11-30T19:37:05.821957Z
last_updated: 2026-11-30T19:45:06.512468Z
author: Abdul Talha
header_image: https://lhr1.vultrobjects.com/docs-main-doc-assets-1/2689/e0f6084e-635e-4737-9c67-8373f1dbce1a.png
---

> Index of every Vultr Docs page in markdown: https://docs.vultr.com/llms.txt

[Leantime](https://leantime.io/) is an open-source project management system for teams without dedicated project managers. It combines task management with strategic planning, so teams can tie daily work to project goals and track progress in one place. Its interface reduces cognitive load, making it approachable for startups, small teams, and neurodivergent users, including people with ADHD. Leantime runs on PHP with MySQL or MariaDB, you can self-host it, and teams commonly use it for software development, team task coordination, and product roadmap planning.

This article explains how to deploy Leantime on a Linux server using Docker Compose with MySQL for data storage and Traefik as the reverse proxy for TLS termination. It covers directory and environment setup, the Docker Compose deployment, the initial server setup, and demonstrates project management features by creating projects, milestones, and tasks through the web interface.

## Prerequisites

Before you begin, you need to:

* Have access to a [Linux-based server](https://docs.vultr.com/products/compute/instances/cloud-compute/provisioning) (with at least 2 CPU cores and 4 GB of RAM) as a [non-root user with sudo privileges](https://docs.vultr.com/how-to-create-a-sudo-user-in-linux).
* [Install Docker and Docker Compose](https://docs.vultr.com/how-to-install-docker-on-ubuntu-24-04#install-docker).
* Create a [DNS A record](https://docs.vultr.com/products/network/dns/management/manage-records) pointing to your server's IP address (for example, `leantime.example.com`).

## Set Up the Directory Structure, Configuration, and Environment Variables

Leantime requires a configuration file to define environment variables, database connections, and application settings. The setup includes persistent storage for the MySQL database, uploaded files, and application configuration so the data persists across server restarts.

1. Create the project directory.

    ```console
    $ mkdir ~/leantime
    ```

1. Navigate to the project directory.

    ```console
    $ cd ~/leantime
    ```

1. Create the directories for the database, uploaded files, plugins, and logs.

    ```console
    $ mkdir -p db_data userfiles public_userfiles plugins logs
    ```

1. Change the ownership of the Leantime data directories to UID and GID `1000`, the non-root user the Leantime container runs as.

    ```console
    $ sudo chown -R 1000:1000 userfiles public_userfiles plugins logs
    ```

    The MySQL container sets the ownership of the `db_data` directory itself when it starts.

1. Generate a secret key for the Leantime application.

    ```console
    $ openssl rand -base64 32
    ```

    Save the output for use later in the environment file.

1. Create an environment file.

    ```console
    $ nano .env
    ```

1. Add the following configuration:

    ```ini
    # Domain and Let's Encrypt
    DOMAIN=leantime.example.com
    LETSENCRYPT_EMAIL=admin@example.com

    # Leantime
    LEAN_PORT=8080
    LEAN_APP_URL=https://leantime.example.com
    LEAN_DEBUG=0

    # Database - MySQL
    MYSQL_ROOT_PASSWORD=ROOT_PASSWORD
    MYSQL_DATABASE=leantime
    MYSQL_USER=lean
    MYSQL_PASSWORD=DATABASE_PASSWORD

    # Database - Leantime
    LEAN_DB_HOST=mysql_leantime
    LEAN_DB_USER=lean
    LEAN_DB_PASSWORD=DATABASE_PASSWORD
    LEAN_DB_DATABASE=leantime
    LEAN_DB_PORT=3306

    # Session
    LEAN_SESSION_PASSWORD=GENERATED_SESSION_PASSWORD
    LEAN_SESSION_EXPIRATION=28800
    LEAN_SESSION_SECURE=true

    # Leantime defaults
    LEAN_SITENAME=Leantime
    LEAN_LANGUAGE=en-US
    LEAN_DEFAULT_TIMEZONE=UTC
    ```

    Replace:

    * `leantime.example.com` with your configured domain.
    * `admin@example.com` with your email address.
    * `ROOT_PASSWORD` with a strong MySQL root password.
    * `DATABASE_PASSWORD` with a strong MySQL user password.
    * `GENERATED_SESSION_PASSWORD` with the value you generated in the earlier step.

    Save and close the file.

## Deploy with Docker Compose

The deployment stack uses Traefik as the reverse proxy for TLS termination and deploys Leantime and MySQL containers with bind-mounted application and database directories. This configuration is based on the [official Leantime Docker Compose configuration](https://github.com/Leantime/docker-leantime/blob/master/docker-compose.yml).

1. Create the Docker Compose manifest file.

    ```console
    $ nano docker-compose.yaml
    ```

1. Add the following configuration:

    ```yaml
    services:
      traefik:
        image: traefik:v3.7.11
        container_name: traefik
        command:
          - "--providers.docker=true"
          - "--providers.docker.exposedbydefault=false"
          - "--entrypoints.web.address=:80"
          - "--entrypoints.websecure.address=:443"
          - "--entrypoints.web.http.redirections.entryPoint.to=websecure"
          - "--entrypoints.web.http.redirections.entryPoint.scheme=https"
          - "--certificatesresolvers.le.acme.tlschallenge=true"
          - "--certificatesresolvers.le.acme.email=${LETSENCRYPT_EMAIL}"
          - "--certificatesresolvers.le.acme.storage=/letsencrypt/acme.json"
        ports:
          - "80:80"
          - "443:443"
        volumes:
          - /var/run/docker.sock:/var/run/docker.sock:ro
          - ./letsencrypt:/letsencrypt
        networks:
          - leantime-net
        restart: unless-stopped

      leantime_db:
        image: mysql:9.7
        container_name: mysql_leantime
        volumes:
          - ./db_data:/var/lib/mysql
        restart: unless-stopped
        env_file: ./.env
        networks:
          - leantime-net
        command: --character-set-server=UTF8MB4 --collation-server=UTF8MB4_unicode_ci
        healthcheck:
          test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
          interval: 30s
          timeout: 10s
          retries: 3

      leantime:
        image: leantime/leantime:${LEAN_VERSION:-3.9.8}
        container_name: leantime
        restart: unless-stopped
        env_file: ./.env

        security_opt:
          - no-new-privileges:true

        cap_add:
          - CAP_CHOWN
          - CAP_SETGID
          - CAP_SETUID

        networks:
          - leantime-net

        volumes:
          - ./public_userfiles:/var/www/html/public/userfiles
          - ./userfiles:/var/www/html/userfiles
          - ./plugins:/var/www/html/app/Plugins
          - ./logs:/var/www/html/storage/logs

        depends_on:
          leantime_db:
            condition: service_healthy

        labels:
          - "traefik.enable=true"
          - "traefik.http.routers.leantime.rule=Host(`${DOMAIN}`)"
          - "traefik.http.routers.leantime.entrypoints=websecure"
          - "traefik.http.routers.leantime.tls=true"
          - "traefik.http.routers.leantime.tls.certresolver=le"
          - "traefik.http.services.leantime.loadbalancer.server.port=8080"

      mysql_helper:
        image: mysql:9.7
        command: chown -R mysql:mysql /var/lib/mysql
        volumes:
          - ./db_data:/var/lib/mysql
        user: root
        profiles: ["helper"]

    networks:
      leantime-net:
    ```

    Save and close the file.

    In the above manifest:

    * `traefik`: Serves as the reverse proxy and TLS termination point, using the official Traefik image. It exposes ports 80 and 443 for HTTP and HTTPS traffic, stores certificates in the `./letsencrypt` directory, and automatically provisions them through Let's Encrypt.
    * `leantime_db`: Stores the Leantime database, including projects, tasks, milestones, users, and application data, using the MySQL 9.7 image. The database configuration comes from the `.env` file, and the data persists in the `db_data` directory.
    * `leantime`: Runs the Leantime web application using the official Leantime image and starts only after the `leantime_db` service is available. The application URL, database connection settings, session settings, and other application configuration come from the `.env` file. Uploaded files, plugins, and logs persist in the `userfiles`, `public_userfiles`, `plugins`, and `logs` directories.
    * `mysql_helper`: Runs as a helper service for managing permissions on the MySQL data directory and is only started when the helper profile is enabled.

1. Start all services in detached mode.

    ```console
    $ docker compose up -d
    ```

1. Verify that the services are running.

    ```console
    $ docker compose ps
    ```

    The output displays all the containers in the `Up` state.

1. View the service logs to confirm that the services started.

    ```console
    $ docker compose logs
    ```

    The logs show Traefik obtaining the certificate, MySQL accepting connections, and Leantime running its scheduled jobs. A `Running [queue:emails] ... FAIL` line is expected because the deployment does not configure a mail server, and it does not affect the web interface.

    For more information on managing a Docker Compose stack, see the [How to Use Docker Compose](https://docs.vultr.com/how-to-use-docker-compose) article.

## Access and Configure Leantime

Leantime provides a web interface for structuring work into projects, milestones, and tasks. Its dashboard gives you a central place to see what's in progress, track status, and manage work.

1. Open your web browser and navigate to Leantime at `https://leantime.example.com`, replacing `leantime.example.com` with your configured domain.

    ![Leantime installation page](https://lhr1.vultrobjects.com/docs-main-doc-assets-1/2689/e3157a8a-b8bf-42c2-ae26-856e20dd19e2.png)

1. Enter your **Email**, **First name**, **Last name**, and **Company Name**, then click **Install**. The installation takes a few minutes, then Leantime opens the page to set up the administrator account.

1. Enter your **Name**, **Role or Title**, and **Password**. The password must have at least 8 characters, including an uppercase letter, a lowercase letter, a number, and a special character. After entering these details, click **Next** to continue.

1. For the Theme customization page, select **More** or **Less** under **Optimal Stimulation**, and select a font, such as **Atkinson Hyperlegible**, under **Readability**. Then, click **Next** to continue.

1. For the Personalization page, select the **Color Mode**, such as **Light** or **Dark**, and then select the **Color Scheme**. Click **Next** to continue.

1. For the Routine page, select your preferred time for each option, then click **Next** to continue.

1. Click **Complete Sign up** to access the dashboard. After clicking the sign-up button, a pop-up appears.

1. Enter a task, such as `Deploy Leantime`, and then click **Let's go** to access the Leantime dashboard.

    ![Leantime initial task setup](https://lhr1.vultrobjects.com/docs-main-doc-assets-1/2689/2cec5bda-b68d-409e-a2f6-41bb683324fa.png)

## Demonstrate Project Management Workflow

Leantime organizes project work into projects, milestones, and tasks, keeping related work organized and trackable. This workflow creates a project, adds a milestone and tasks, assigns tasks with due dates, and updates task statuses to demonstrate the platform's core project management features.

> [!NOTE]
> The first time you open a project page, such as **Milestones** or **To-Dos**, Leantime displays a welcome dialog that covers the page. Click **Close** or **I'll explore on my own** to dismiss it before you continue.

### Create a New Project

A project in Leantime provides a central place to organize related milestones, tasks, and project work.

1. From the Leantime dashboard, click **Project Hub** in the left navigation menu.

1. Click **Start something new** to create a new project.

1. Under **Launch Your Endeavor**, click **Create a Project**.

1. Enter a project title, such as `Website Redesign`, and an optional description, such as `Redesign the company website and improve its user experience`.

1. Optionally, specify the **Start Date**, **Due Date**, **Client / Product**, and project access settings.

1. Click **Save** to create the project.

    ![Leantime project creation](https://lhr1.vultrobjects.com/docs-main-doc-assets-1/2689/9eafd14b-5e84-4398-b4ac-8dc672f504ab.png)

### Create a Milestone for the Project

A milestone in Leantime helps organize and track a specific stage or goal within a project.

1. From the **Website Redesign** project, click **Milestones** in the left navigation menu.

1. Click **New** to open the milestone creation options, then click **Add Milestone**.

1. Enter a milestone title such as `Design and Planning`.

1. Click **Save** to create the milestone.

    ![Leantime milestone creation](https://lhr1.vultrobjects.com/docs-main-doc-assets-1/2689/0b3f619c-72ee-4fbf-9b29-b1f4ad1dce30.png)

### Create Tasks for the Project

Tasks in Leantime help break the project into smaller pieces of work that can be assigned and tracked.

1. From the **Website Redesign** project, click **To-Dos** in the left navigation menu.

1. Click **New** and select **Add To-Do**.

1. Enter a task title, such as `Design the new homepage`, and an optional description, such as `Create a new homepage layout that matches the website redesign goals`.

1. Optionally, specify the **Priority**, **Effort**, **Milestone**, **Sprint**, and other task details.

1. Click **Save & Close** to create the task.

    ![Leantime task creation](https://lhr1.vultrobjects.com/docs-main-doc-assets-1/2689/9365f62e-610c-4b5f-92a8-02eaa4153fdf.png)

### Assign Tasks and Set Due Dates

Assign tasks to team members and set due dates to organize the work and keep the project on schedule.

1. From the **Website Redesign** project, click **To-Dos** in the left navigation menu.

1. Click the task you want to update, such as **Design the new homepage**.

1. Under **Assigned to**, select a team member to assign the task. Leantime assigns new tasks to their creator, so keep your own account if you have not invited other users.

1. Under **Due Date**, select a date for completing the task.

1. Click **Save & Close** to apply the changes.

### Update Task Status and Track Project Progress

Updating task statuses helps you track completed work and monitor the progress of the project.

1. From the **Website Redesign** project, click **To-Dos** in the left navigation menu.

1. Drag the **Design the new homepage** task from the **New** column to the **In Progress** column.

1. After you finish the work, drag the task to the **Done** column. Leantime counts only completed tasks toward project and milestone progress.

1. Open **Project Overview** from the left navigation menu to view the updated project progress, including the completion percentage and the task's status under the latest to-dos.

    ![Leantime project progress](https://lhr1.vultrobjects.com/docs-main-doc-assets-1/2689/d8c24d2f-828b-464e-b329-be75da30bc4c.png)

## Conclusion

You have deployed Leantime on a Linux server using Docker Compose and configured MySQL for data storage and Traefik for TLS termination. This gives you a project management platform for organizing projects, milestones, tasks, and tracking project progress. For more information and advanced configuration, see the [official Leantime documentation](https://docs.leantime.io/).
