Tutorial: Installing Leantime on Ubuntu server

Leantime is an open-source project management software that helps teams to organize and manage projects efficiently. In this tutorial, we'll explain how to install Leantime on Ubuntu Server Latest.

Prerequisites

Before starting, please ensure that your Ubuntu server is up-to-date and you have administrative privileges to install packages. Also, ensure that your server has a web server installed, such as Apache or Nginx.

Step 1: Install Required Packages

Leantime is built with PHP and uses a MySQL database to store data. First, we need to install the required packages for PHP and MySQL.

To install PHP and its required packages, run the following command:

sudo apt-get install php7.4 php7.4-mysql php7.4-curl php7.4-gd php7.4-cli php7.4-json php7.4-mbstring php7.4-intl php7.4-xml libapache2-mod-php7.4

To install the MySQL database, run the following command:

sudo apt-get install mysql-server

During the installation process, you'll be prompted to set a root password for the MySQL database. Be sure to remember this password, as you'll need it to log in to the MySQL database.

Step 2: Create Leantime Database

To create a Leantime database, log into the MySQL server by running the following command:

mysql -u root -p

Enter the MySQL root password when prompted. Once you're logged in, create a new database for Leantime by running the following command:

CREATE DATABASE leantime;

Next, create a user and grant the necessary permissions to access the Leantime database:

GRANT ALL PRIVILEGES ON leantime.* TO 'leantimeuser'@'localhost' IDENTIFIED BY 'yourpassword';

Be sure to replace 'yourpassword' with a strong password for the user.

Finally, exit the MySQL shell by typing 'exit' and pressing Enter.

Step 3: Download and Install Leantime

To download and install Leantime, follow these steps:

  1. Download the latest version of Leantime from their website at https://leantime.io/download.

  2. Create a new directory for Leantime in your webserver's document root, such as /var/www/html/leantime.

  3. Move the downloaded Leantime archive to the new directory and extract it.

  4. Change the ownership and permissions of the Leantime directory to your web server's user and group:

sudo chown -R www-data:www-data /var/www/html/leantime
sudo chmod -R 755 /var/www/html/leantime

Step 4: Configure leantime

To configure Leantime, navigate to the Leantime directory on your server and copy the ".env.example" file to a new file called ".env". This file stores your Leantime configuration options.

cd /var/www/html/leantime
cp .env.example .env

Next, open the ".env" file in your favorite text editor and update the following options:

APP_URL=http://your_server_ip_address_or_domain_name
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=leantime
DB_USERNAME=leantimeuser
DB_PASSWORD=yourpassword

Replace 'your_server_ip_address_or_domain_name' with your server's IP address or domain name.

Step 5: Run Leantime Migrations

Leantime uses migrations to update and manage the database schema. Navigate to the Leantime directory on your server and run the following command to run the migrations:

php artisan migrate

Step 6: Start Leantime

To start Leantime, navigate to the Leantime directory on your server and run the following command:

php artisan serve

This command will start the PHP built-in web server, which serves the Leantime application. You'll see output in the terminal as the server starts up.

Step 7: Access Leantime

Once Leantime is running, you can access it by opening a web browser and visiting the URL that you configured in the ".env" file. For example, if you set 'APP_URL=http://your_server_ip_address_or_domain_name', you would visit http://your_server_ip_address_or_domain_name in your web browser.

Conclusion

In this tutorial, you learned how to install and configure Leantime on an Ubuntu server. Leantime is a powerful project management tool that can help your team stay organized and productive.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!