Leantime is an open-source project management and collaboration platform tailored for small and medium-sized businesses and teams. With its array of features for task and project management, collaboration, and time tracking, Leantime provides a robust solution to streamline workflows and enhance productivity. In this step-by-step guide, we will walk you through the installation process of Leantime on Ubuntu 23.10, ensuring that you have the necessary software and configurations in place to get started smoothly.
Prerequisites
Before we dive into the installation process, there are a few prerequisites that need to be met. Firstly, you will need to have an Ubuntu 23.10 server set up with root or sudo access. Additionally, it is crucial to ensure that your system has the latest package information by updating the package list:
apt update -y apt upgrade -y
Installing Required Software
To install Leantime successfully, we need to install a few necessary software packages including Apache2, PHP, and other dependencies. Execute the following command to install these packages:
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
Enabling Apache Modules
Next, we will enable some Apache modules that are required for Leantime to function properly. Execute the following commands:
a2enmod ssl rewrite headers deflate cache http2 proxy_fcgi env expires
Enabling and Starting Apache2
To enable and start the Apache2 service, run the following commands:
systemctl start apache2 systemctl enable apache2
Database Configuration
Leantime utilizes a MySQL database to store its data. Let’s begin by installing the MySQL database server and securing its installation. Run the following command to install MySQL and follow the prompts for secure installation:
mysql_secure_installation
Once the installation is complete, access the MySQL database server using the following command:
mysql -u root -p
You will be prompted to enter the root password you set during the secure installation process. After successfully logging in, execute the following commands to 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; exit
Make sure to replace ‘YOUR_PASSWORD’ with a secure and strong password of your choice.
Downloading and Installing Leantime
Now it’s time to download and install the latest version of Leantime. Navigate to the desired location on your server and run the following commands:
cd /var/www mkdir leantime && cd leantime wget https://github.com/Leantime/leantime/releases/download/v2.4.4/Leantime-v2.4.4.zip unzip Leantime-v2.4.4.zip rm Leantime-v2.4.4.zip rm -r /var/www/html/* shopt -s dotglob cd .. mv leantime/leantime/* html/ chown -R www-data:www-data /var/www/html
In this example, we are downloading version 2.4.4 of Leantime. If there is a newer version available, make sure to replace the download URL and file name accordingly.
Creating a Virtual Host for Leantime
To configure Leantime with Apache, we need to create a virtual host for the installation. Begin by creating a configuration file using the following command:
nano /etc/apache2/sites-available/leantime.conf
Add the following content to the file, replacing “leantime.domainhere.info” with your actual domain name:
<VirtualHost *:80>
ServerAdmin admin@leantime.domainhere.info
ServerName leantime.domainhere.info
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
</Directory>
</VirtualHost>
Save the file and exit the editor. Next, enable the configuration and disable the default Apache configuration by running the following commands:
a2ensite leantime.conf a2dissite 000-default.conf
To apply the changes, restart the Apache2 service:
systemctl restart apache2
Configuring the Database in Leantime
To establish a connection between Leantime and the MySQL database, we need to update the configuration file. Open the configuration.php file using the following command:
nano /var/www/html/config/configuration.php
Within the file, locate the section labeled “Database” and update the values according to your MySQL database configuration:
public $dbHost = 'localhost';
public $dbUser = 'leanuser';
public $dbPassword = 'YOUR_PASSWORD';
public $dbDatabase = 'leantime';
public $dbPort = '3306';
Make sure to replace ‘YOUR_PASSWORD’ with the password you set for the MySQL user ‘leanuser’.
Installing an SSL Certificate
To secure your Leantime installation with SSL, you can use Let’s Encrypt and Certbot. Begin by installing Certbot for Apache:
snap install certbot --classic
Once Certbot is installed, generate an SSL certificate for your domain:
certbot --apache -d leantime.domainhere.info
Replace “leantime.domainhere.info” with your actual domain name. Follow the prompts to complete the certificate generation process.
Congratulations! You have successfully enabled HTTPS for your Leantime installation. If you encounter any issues, please refer to the Certbot documentation or seek assistance from the Leantime community.
Accessing Leantime
With the installation and configuration complete, you are now ready to access Leantime. Simply open your preferred web browser and enter the URL associated with your Leantime installation, e.g., “https://leantime.domainhere.info/install”.
You will be presented with a setup wizard where you can fill in the required details to proceed with the configuration process. Provide the necessary information and follow the on-screen instructions to finalize the setup.
Once the setup is complete, you will be redirected to the Leantime login screen. Enter your credentials to access the Leantime dashboard and start managing your projects and collaborating with your team.
Conclusion
In this comprehensive guide, we have walked you through the step-by-step process of installing Leantime on Ubuntu 23.10. By following these instructions, you have successfully set up a powerful project management and collaboration platform for your small or medium-sized business.
Remember, Leantime provides a wide range of features to help streamline your workflows, manage tasks and projects, and track time efficiently. Take advantage of this open-source solution to boost your team’s productivity and achieve project success.
For reliable and scalable cloud hosting solutions, consider Shape.host’s Linux SSD VPS services. With their expertise in delivering secure and efficient hosting environments, Shape.host empowers businesses with cutting-edge technology and exceptional support. Experience the benefits of their services today.
Now that you have Leantime up and running, start exploring its features and unleash the full potential of your team’s collaboration and project management capabilities. Happy tracking and managing!