To get started with Leantime, make sure you meet the system requirements and dependencies, and then follow the installation steps below either using Apache or Nginx:
-
Download the latest release package
-
Create a empty MySQL database
-
Create a leantime directory and set appropriate permissions
cd /var/www/html/
sudo mkdir leantime
sudo chown -R www-data:www-data leantime
sudo chmod -R 755 leantime
- Upload the unzipped release package in the newly created
leantime
directory
- Configure Apache to point to
public\
of leantime
cd /etc/apache2/sites-available/
sudo nano leantime.conf
- Add the following code in
leantime.conf
and save it:
<VirtualHost *:8080>
ServerName leantime
DocumentRoot /var/www/html/leantime/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Use a port other than 80
, as it is the default port. Then add the following line in etc/apache2/ports.conf
file:
Listen <<your port number>>
- Enable the new site configuration, rewrite module and restart apache:
sudo a2ensite leantime.conf
sudo a2enmod rewrite
sudo systemctl restart apache2
-
Navigate to the
config/
directory in your leantime installation. Rename.env.sample
to.env
-
Fill in your database credentials (username, password, host, dbname) in
.env
LEAN_DB_HOST=<your host name>
LEAN_DB_USER=<your db_user name>
LEAN_DB_PASSWORD=<your db_user password>
LEAN_DB_DATABASE=<your db name. From step 1>
LEAN_DB_PORT='3306' # Database default port
-
Navigate to
<yourdomain.com>/install
-
Follow instructions to install database and set up User Account
- Configure Nginx to point to
public\
of leantime
cd /etc/nginx/sites-available/
sudo nano leantime
- Add the following code in
leantime
file and save it:
server {
listen 80;
server_name leantime;
root /var/www/html/leantime/public;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}
Note: Make sure PHP-FPM
is installed and running
- Enable the new site configuration, rewrite module and restart apache:
sudo ln -s /etc/nginx/sites-available/leantime /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl restart nginx
-
Navigate to the
config/
directory in your leantime installation. Rename.env.sample
to.env
-
Fill in your database credentials (username, password, host, dbname) in
.env
LEAN_DB_HOST=<your host name>
LEAN_DB_USER=<your db_user name>
LEAN_DB_PASSWORD=<your db_user password>
LEAN_DB_DATABASE=<your db name. From step 1>
LEAN_DB_PORT='3306' # Database default port
-
Navigate to
<yourdomain.com>/install
-
Follow instructions to install database and set up User Account