How to Install Lavagna on Debian Latest

Lavagna is an open-source web-based project management tool that can be hosted on your own server. In this tutorial, we will walk you through step-by-step instructions to install Lavagna on Debian Latest.

Prerequisites

Before proceeding with the installation, make sure that you have the following prerequisites:

Step 1: Installing Required Dependencies

First, we need to install all the required dependencies for installing Lavagna. You can do this by running the following command:

sudo apt update
sudo apt install git curl unzip php-xml php-mysql php-curl php-gd php-mbstring mysql-server composer

Step 2: Downloading Lavagna

Lavagna source code can be downloaded from its official GitHub repository. You can download it by running the following command:

cd /var/www/
sudo git clone https://github.com/digitalidea/lavagna.git

Now, change the directory to the Lavagna folder:

cd lavagna

Step 3: Installing Lavagna

Before installing Lavagna, we need to create a new database and user for Lavagna. You can do this by following the below steps:

sudo mysql -u root -p

Enter password: 

mysql> CREATE DATABASE lavagna;
mysql> CREATE USER 'lavagna'@'localhost' IDENTIFIED BY 'YOUR_PASSWORD';
mysql> GRANT ALL PRIVILEGES ON lavagna.* TO 'lavagna'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> exit;

Now, we need to install the dependencies using Composer. You can do this by running the following command:

sudo composer install --no-dev

After that, copy the .env.example file to .env file:

sudo cp .env.example .env

Open the .env file using your favorite text editor:

sudo nano .env

Update the following fields with your database credentials:

DB_HOST=localhost
DB_DATABASE=lavagna
DB_USERNAME=lavagna
DB_PASSWORD=YOUR_PASSWORD

Save and exit the file.

Now, we need to create a new Laravel application key by running the following command:

sudo php artisan key:generate

Finally, run the following command to migrate and seed the database:

sudo php artisan migrate --seed --force

Step 4: Configuring Nginx Web Server

We need to create a virtual host for Lavagna in the Nginx web server. You can do this by creating a new .conf file in the sites-available directory:

sudo nano /etc/nginx/sites-available/lavagna.conf

Add the following code to the file:

server {
    listen 80;
    server_name example.com;
    root /var/www/lavagna/public;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
    }
}

Replace the server_name with your domain name and save the file.

Now create a symlink to the newly created file in the sites-enabled directory:

sudo ln -s /etc/nginx/sites-available/lavagna.conf /etc/nginx/sites-enabled/

Test the Nginx configuration using the following command:

sudo nginx -t

If there are no errors, restart the Nginx service:

sudo systemctl restart nginx.service

Step 5: Accessing Lavagna in the browser

Finally, you can access Lavagna on your web browser using your domain name or the server IP address:

http://example.com

Conclusion

Congratulations! You have successfully installed Lavagna on Debian Latest. Now you can start using Lavagna to manage your projects.

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!