How to Install Leantime on Ubuntu 23.10

Leantime is an open-source project management and collaboration platform designed for small and medium-sized businesses and teams. It provides features for task and project management, collaboration, and time tracking. Users can create and manage projects, tasks, and milestones, set deadlines, and collaborate with team members on various project-related activities.


  • Ubuntu 23.10 server set up and have root or sudo access

Update Packages

Update the package list to make sure you have the latest information about available packages,

apt update -y

apt upgrade -y

Install Required Softwares

Install the necessary softwares, including Apache2, PHP, and other dependencies:

apt install vim apache2 mariadb-server libapache2-mod-php php php-gmp php-bcmath php-gd php-json php-mysql php-curl php-mbstring php-intl php-imagick php-xml php-zip bzip2 zip unzip imagemagick php-fpm  php-fileinfo

Enable Apache Modules,

a2enmod ssl rewrite headers deflate cache http2 proxy_fcgi env expires

Enable and Start the Apache2,

systemctl start apache2

systemctl enable apache2

Database Configuration

Install MySQL database server with Secure installation using the following command,


Access MySQL database server using the following command,

mysql -u root -p

You will be presented with a series of prompts. Here's what you'll be asked and how to respond:

Set the root password

Set root password? [Y/n] y

Remove anonymous user accounts: Answer "Y" to remove any anonymous MySQL user accounts

Remove anonymous users? [Y/n] y

Disallow root login remotely: Answer "Y" to prevent the root user from logging in remotely

Disallow root login remotely? [Y/n] y

Remove test database and access to it: Answer "Y" to remove the test database and any access to it.

Remove test database and access to it? [Y/n] y

Reload privilege tables now: Answer "Y" to apply the changes you've made

Reload privilege tables now? [Y/n] y

Create a MySQL database for Leantime and set up the necessary database tables,

create database leantime CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

grant all on leantime.* to 'leanuser'@'localhost' identified by 'YOUR_PASSWORD';

flush privileges;


Replace "YOUR_PASSWORD" with a your Secure Strong Password

Download and install Leantime

Download and install the latest version of Leantime, To get the latest version of leantime, you can Click here

When we created the wiki, the latest available version of Leantime was v2.4.4. If a newer version is available at the time of your installation, you will need to replace the download URL and file name in the following command.

cd /var/www

mkdir leantime && cd leantime




rm -r /var/www/html/*

shopt -s dotglob

cd ..

mv leantime/leantime/* html/

chown -R www-data:www-data /var/www/html

Create a Virtual Host for Leantime,

Create a configuration file for your Leantime installation,

nano /etc/apache2/sites-available/leantime.conf

Add the following content to the file,

Note: Replace with your actual domain name

<VirtualHost *:80>
    DocumentRoot /var/www/html

    ErrorLog ${APACHE_LOG_DIR}/leantime_error.log
    CustomLog ${APACHE_LOG_DIR}/leantime_access.log combined

    <Directory /var/www/html>
        Options FollowSymLinks
        AllowOverride All
        Require all granted

Save the file and exit.

Enable the configuration using the following command,

a2ensite leantime.conf

a2dissite 000-default.conf

systemctl restart apache2

Now open the configuration.php and edit it where necessary including the database part,

cd /var/www/html

mv config/configuration.sample.php config/configuration.php

nano config/configuration.php
   /* Database */
    public $dbHost = 'localhost';                         //Database host
    public $dbUser = 'leanuser';                                  //Database username
    public $dbPassword = 'YOUR_PASSWORD';                              //Database password
    public $dbDatabase = 'leantime';                              //Database name
    public $dbPort = '3306';                              //Database port

Replace "YOUR_PASSWORD" with your set database password.

Install SSL Certificate

To configure SSL, you can use Let's Encrypt and Certbot. Install Certbot for Apache,

snap install certbot --classic

Generate SSL Certificate for the Domain,

certbot --apache -d

Note: Replace the with actual domain name


root@ubuntu23:~# certbot --apache -d
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Requesting a certificate for

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/
Key is saved at:         /etc/letsencrypt/live/
This certificate expires on 2024-01-22.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.

Deploying certificate
Successfully deployed certificate for to /etc/apache2/sites-available/leantime-le-ssl.conf
Congratulations! You have successfully enabled HTTPS on
We were unable to subscribe you the EFF mailing list because your e-mail address appears to be invalid. You can try again later by visiting

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
 * Donating to ISRG / Let's Encrypt:
 * Donating to EFF:          
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Access Leantime

To configure Leantime, you need to run the Leantime domain URL in browser.

Replace "" with your actual domainname.


Fill the requested details to proceed further with configuration,


Now you will see the Login screen. Enter your credentials.


Once you login successfully, you will see a dashboard like this.