Installing Leantime on Debian Latest

Leantime is a free and open-source project management software built for startups and small businesses. In this tutorial, we will explain step-by-step how to install Leantime on Debian. This tutorial assumes you have a Debian server already installed.

Prerequisites

Before we start, make sure your Debian server meets the following prerequisites:

Step 1: Install Apache Web Server

To install Apache on Debian, enter the following command:

sudo apt-get update
sudo apt-get install apache2

After the installation is completed, start the Apache service using the following command:

sudo systemctl start apache2

You can also enable Apache to start automatically on system boot using the following command:

sudo systemctl enable apache2

Step 2: Install PHP

To install PHP and some essential PHP modules, run the following command:

sudo apt-get install php libapache2-mod-php php-mysql php-curl php-xml php-gd php-zip

Step 3: Install MySQL or MariaDB

To install MySQL or MariaDB server, run the following command:

sudo apt-get install mysql-server mysql-client

During the installation process, you will be prompted to set a password for the MySQL root user.

After the installation is completed, start the MySQL service using the following command:

sudo systemctl start mysql

You can also enable MySQL to start automatically on system boot using the following command:

sudo systemctl enable mysql

Step 4: Install Git

To install Git on Debian, run the following command:

sudo apt-get install git

Step 5: Clone the Leantime Repository

Now we can start to download the Leantime files using Git. Run the following command to clone the Leantime repository:

sudo git clone https://github.com/Leantime/leantime.git /var/www/html/leantime

Step 6: Configure Apache

To configure Apache to serve Leantime, we need to create a new virtual host file. Run the following command to create a new configuration file:

sudo nano /etc/apache2/sites-available/leantime.conf

Paste the following content into the file:

<VirtualHost *:80>
    ServerName your-domain.com
    DocumentRoot /var/www/html/leantime/public
    <Directory "/var/www/html/leantime/public">
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Replace your-domain.com with your actual domain name or IP address.

Save the file and exit.

Now we need to enable the new virtual host configuration and restart the Apache service. Run the following command:

sudo a2ensite leantime.conf
sudo systemctl restart apache2

Step 7: Install Composer

Composer is a dependency manager tool for PHP that is used by Leantime to install and manage libraries.

To install Composer on Debian, run the following command:

sudo apt-get install composer

Step 8: Install Leantime Dependencies

Change your current directory to the Leantime directory:

cd /var/www/html/leantime

Then run the following command to install Leantime composer dependencies:

sudo composer install --no-dev

Step 9: Configure Leantime

To configure Leantime, we need to create a new .env file by copying the .env.example file:

sudo cp .env.example .env

Then open the new .env file with a text editor:

sudo nano .env

Fill in the required fields according to your setup. For example:

APP_ENV=production
APP_KEY=base64:qMp2xbghgHiD8OiiHujSoTjiAe9r0oy0fMaLOlQ7YJs=
APP_DEBUG=false
APP_URL=http://your-domain.com

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=leantime
DB_USERNAME=root
DB_PASSWORD=your_mysql_password

CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync

Save the file and exit.

Step 10: Run Database Migration

To create the database structure and tables, run the following command:

php artisan migrate

Step 11: Generate APP Key

To generate an application key for Leantime, run the following command:

php artisan key:generate

Step 12: Final Check and Accessing Leantime

To check if Leantime is properly installed, run the following command:

php artisan --version

You should see the version number of Leantime.

Now, open your web browser and go to http://your-domain.com (replace your-domain.com with your actual domain name or IP address). You should see the Leantime login page.

Congratulations! You have successfully installed Leantime on Debian.

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!