How to Install Leantime on Ubuntu 22.04
Leantime is an open-source project management and collaboration tool designed to help teams and individuals manage tasks, projects, and workloads more efficiently. It provides a range of features for project management, task tracking, and team collaboration.
Prerequisites
- Ubuntu 22.04 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 Software
Install the necessary software, 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
Secure your database with,
mysql_secure_installation
Create a MySQL database for Leantime and set up the necessary database tables,
mysql -u root -p
create database leantime CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
grant all on leantime.* to 'leanuser'@'localhost' identified by 'Strong_Password';
flush privileges;
exit
Download and install Leantime
Click here to download and install the latest version of Leantime, the latest version at the time we created the wiki is 2.4.1,
cd /var/www
mkdir leantime && cd leantime
wget https://github.com/Leantime/leantime/releases/download/v2.4.1/Leantime-v2.4.1.zip
unzip Leantime-v2.4.1.zip
rm Leantime-v2.4.1.zip
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,
Replace /var/www/html
with the path to your Leantime installation directory,
nano /etc/apache2/sites-available/leantime.conf
Add the following content to the file,
<VirtualHost *:443>
ServerAdmin admin@leantime2.domainhere.info
ServerName leantime2.domainhere.info
DocumentRoot /var/www/html
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/leantime2.domainhere.info/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/leantime2.domainhere.info/privkey.pem
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
</Directory>
</VirtualHost>
Save and enable the configuration,
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
vim config/configuration.php
Edit the database part as shown below,
/* Database */
public $dbHost = 'localhost'; //Database host
public $dbUser = 'leanuser'; //Database username
public $dbPassword = 'Strong_Password'; //Database password
public $dbDatabase = 'leantime_db'; //Database name
public $dbPort = '3306';
Note: Replace the Database username,name,password with actual details
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 certonly --apache -d leantime2.domainhere.info
Note: Replace the leantime2.domainhere.info with actual domain name
Output:
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/leantime2.domainhere.info/fullchain.pem
Key is saved at: /etc/letsencrypt/live/leantime2.domainhere.info/privkey.pem
This certificate expires on 2024-01-11.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
If you like Certbot, please consider supporting our work by:
* Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
* Donating to EFF: https://eff.org/donate-le
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Access Leantime
Go to the browser and install Leantime. https://leantime2.domainhere.info/install
Fill the log in and user details to proceed,
Now you will see the Login screen. Enter your credentials.
If the login is successful, you will see a dashboard like this. You can take a tour or leave it for later.
Your Leantime installation on Ubuntu 22.04 with Apache2 and SSL should now be up and running. Make sure your domain's DNS is configured to point to the correct server IP address.
CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME
for 10% off!
1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month
Available Locations: LAX | MIA | ATL | FRA | AMS