How to Install Leantime on Ubuntu Using Apache, MySQL, and PHP (LAMP Stack).Leantime is a lean, open-source project management system designed for startups and small teams. In this guide, you’ll learn to install Leantime on Ubuntu 24 using Apache, MySQL, and PHP (LAMP stack).
Install Apache2 and enable
sudo apt update
sudo apt install apache2
Enable and start Apache:
sudo systemctl enable apache2
sudo systemctl start apache2
Install MySQL
sudo apt install mysql-server
Create Leantime Database
Log into MySQL:
sudo mysql -u root -p
Run the following SQL commands:
CREATE DATABASE leantime_db;
CREATE USER 'leantime_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON leantime_db.* TO 'leantime_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Replace ‘password’ with a secure password.
Install PHP and Required Extensions
Install PHP and necessary modules:
sudo apt install php php-cli php-fpm php-mysql php-json php-opcache php-mbstring php-xml php-gd php-curl
Check version:
php -v
Download Leantime
Navigate to your web root:
cd /var/www/html
Download and extract Leantime:
sudo apt install unzip
sudo wget https://github.com/Leantime/leantime/releases/download/v3.5.5/Leantime-v3.5.5.zip
sudo unzip Leantime-v3.5.5.zip
sudo mv Leantime-v3.5.5 leantime
sudo chown -R www-data:www-data leantime
Set Up the Environment Configuration File
Leantime uses a .env file to store database and environment configuration.
Navigate to the config directory:
cd /var/www/html/leantime/config
Copy the sample environment file:
sudo cp env.example .env
Edit the .env file:
sudo nano .env
Update the following lines with your database information:
DB_HOST=localhost
DB_NAME=leantime_db
DB_USER=leantime_user
DB_PASSWORD=password
Make sure these match the credentials you created earlier in MySQL.
Save and close the file.
Configure Apache
Create a virtual host configuration:
sudo nano /etc/apache2/sites-available/leantime.conf
Paste:
<VirtualHost *:80>
DocumentRoot /var/www/html/leantime/public
ServerName IP address or domain name
<Directory /var/www/html/leantime/public>
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/leantime_error.log
CustomLog ${APACHE_LOG_DIR}/leantime_access.log combined
</VirtualHost>
Enable site and modules:
sudo a2ensite leantime.conf
sudo a2enmod rewrite
sudo systemctl restart apache2
Complete Leantime Installation
In your browser, go to:
http://<your-server-ip>/install
Or:
http://yourdomain.com/install
By following this step-by-step guide, you’ve successfully Install Leantime on Ubuntu 24 and configured it on an Ubuntu server using the LAMP stack. Your setup now includes a secure, open-source project management platform that supports agile workflows, kanban boards, Gantt charts, and more—ideal for teams looking to streamline their project planning and execution.
Conclusion
If you face any issues during the installation or need expert assistance, don’t hesitate to reach out for professional Linux Server Management support. A reliable team can help you you Install Leantime on Ubuntu 24, configure, secure, and optimize your setup, ensuring smooth and efficient project management operations.