Installing Leantime on Manjaro

Leantime is an open-source project management tool that is written in PHP, and it is built on top of the Symfony framework. Leantime can be used to manage projects, tasks, invoices, and more. In this tutorial, we will show you how to install Leantime on Manjaro.

Prerequisites

Before we proceed with the installation, please ensure that you have the following prerequisites:

Step 1: Install Dependencies

First, we need to install the necessary dependencies for Leantime to function correctly. Run the following commands in your terminal:

sudo pacman -Syu # updating the system
sudo pacman -S git curl unzip php php-fpm php-gd php-intl php-mbstring php-pgsql libpq postgresql composer

Step 2: Clone Leantime Repository

Now we need to clone the Leantime repository from Github. Run the following command in your terminal to clone the repo:

git clone https://github.com/Leantime/Leantime.git

After cloning the repo, navigate into the cloned directory:

cd Leantime

Step 3: Install Leantime Dependencies

Leantime requires some dependencies to be installed before we can proceed to run it. Run the following command in the directory you cloned Leantime:

composer install --no-dev --optimize-autoloader

Step 4: Create a PostgreSQL Database and User

Leantime requires a PostgreSQL database to store data. We will create a database and a user for it. Run the following command in your terminal:

sudo -u postgres createuser --interactive # follow prompts to create a user
sudo -u postgres createdb leantime_db # create a database for Leantime
sudo -u postgres psql -c "ALTER USER leantime WITH ENCRYPTED PASSWORD 'your_password';" # set password for Leantime DB user

Step 5: Update .env File

We need to update the .env file to include our database configuration. Navigate to the root directory of Leantime:

cd ..
cp .env.dist .env

Then open the .env file in your preferred text editor and insert the following values:

DATABASE_URL=postgresql://leantime:your_password@localhost:5432/leantime_db

Note: Change the your_password to the password you set for the leantime user in step 4.

Step 6: Setup Permissions

We need to ensure that the var/ and public/ directories have the correct permissions. Run the following command in your terminal:

sudo chown -R http:http var/ public/

Note: http is the user/group that your web server runs as. Change it as needed for your system.

Step 7: Update Web Server Configuration

We need to update our web server configuration file to point to Leantime. If you are using Apache, then you can use the following virtual host configuration:

<VirtualHost *:80>
    ServerName yourdomain.com
    DocumentRoot /path/to/Leantime/public

    <Directory /path/to/Leantime/public>
        DirectoryIndex index.php
        Options -Indexes +FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog /var/log/httpd/leantime_error.log
    CustomLog /var/log/httpd/leantime_access.log combined
</VirtualHost>

Note: Change yourdomain.com to your domain name, and /path/to/Leantime/public to the path to your Leantime installation.

If you are using Nginx, you can use the following server block:

server {
    listen 80;
    server_name yourdomain.com;
    root /path/to/Leantime/public;
    index index.php;

    location / {
        try_files $uri $uri/ /index.php$is_args$args;
    }

    location ~ \.php {
        include fastcgi_params;
        fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
        fastcgi_param SCRIPT_FILENAME /path/to/Leantime/public/$fastcgi_script_name;
        fastcgi_param APP_ENV prod;
        internal;
    }

    access_log /var/log/nginx/leantime_access.log;
    error_log /var/log/nginx/leantime_error.log;
}

Note: Change yourdomain.com to your domain name and /path/to/Leantime/public to the path to your Leantime installation.

Step 8: Finalize Leantime Installation

Now that all the configuration is done, we can proceed to finalize the installation. Navigate to the root directory of Leantime:

cd Leantime

Then run the following command in your terminal:

php bin/console doctrine:migrations:migrate --no-interaction

Finally, open your browser and navigate to http://yourdomain.com/ and create the admin account and setup of the project.

Congratulations! You have successfully installed Leantime on your Manjaro system.

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!