Leantime is an open-source project management system designed for startups and small teams. It combines lean principles with intuitive design, making it ideal for task management, planning, and collaboration. This guide will show you how to install Leantime on Ubuntu, Debian, AlmaLinux, and Rocky Linux.
Prerequisites
Before installing Leantime, ensure you have the following:
-
A server running Ubuntu 22.04/20.04, Debian 11/10, AlmaLinux 9/8, or Rocky Linux 9/8.
-
Root or sudo access.
-
A LAMP or LEMP stack installed (Apache/Nginx, MySQL/MariaDB, PHP).
-
Git installed.
Step 1: Update Your System
Update your package lists and upgrade installed packages:
sudo apt update && sudo apt upgrade -y # For Ubuntu/Debian
sudo dnf update -y # For AlmaLinux/Rocky
Step 2: Install Required Packages
Install Apache/Nginx, MariaDB, PHP, and other dependencies:
# For Ubuntu/Debian
sudo apt install apache2 mariadb-server php php-cli php-mbstring php-xml php-curl php-zip unzip git -y
# For AlmaLinux/Rocky
sudo dnf install httpd mariadb-server php php-cli php-mbstring php-xml php-curl php-zip unzip git -y
Start and enable services:
sudo systemctl enable --now apache2 mariadb # Ubuntu/Debian
sudo systemctl enable --now httpd mariadb # AlmaLinux/Rocky
Step 3: Configure Database
Secure your MariaDB installation:
sudo mysql_secure_installation
Create a database and user for Leantime:
sudo mysql -u root -p
CREATE DATABASE leantime;
CREATE USER 'leantime_user'@'localhost' IDENTIFIED BY 'secure_password';
GRANT ALL PRIVILEGES ON leantime.* TO 'leantime_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Step 4: Download and Set Up Leantime
Navigate to the web root and clone Leantime:
cd /var/www/
sudo git clone https://github.com/Leantime/leantime.git
sudo mv leantime /var/www/html/
Set correct permissions:
sudo chown -R www-data:www-data /var/www/html/leantime
sudo chmod -R 755 /var/www/html/leantime
Step 5: Configure Apache/Nginx
Apache Virtual Host Configuration
Create a new virtual host file:
sudo nano /etc/apache2/sites-available/leantime.conf
Add the following content:
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/leantime
ServerName your-domain.com
<Directory /var/www/html/leantime>
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Enable the site and restart Apache:
sudo a2ensite leantime.conf
sudo systemctl restart apache2
Nginx Configuration
Create a new Nginx configuration file:
sudo nano /etc/nginx/conf.d/leantime.conf
Add the following content:
server {
listen 80;
server_name your-domain.com;
root /var/www/html/leantime;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/run/php/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
Restart Nginx:
sudo systemctl restart nginx
Step 6: Finalize Installation
-
Open your browser and visit
http://your-domain.com
. -
Follow the on-screen setup wizard.
-
Enter the database details configured earlier.
-
Complete the installation and log in.
Conclusion
You have successfully installed Leantime on Ubuntu, Debian, AlmaLinux, or Rocky Linux. Your project management tool is now ready to use. To enhance security, enable SSL with Let’s Encrypt and configure a firewall.