LinuxTutorialsUbuntu

How To Install Kanboard on Ubuntu 20.04 LTS

Install Kanboard on Ubuntu 20.04

In this tutorial, we will show you how to install Kanboard on Ubuntu 20.04 LTS. For those of you who didn’t know, Kanboard is a free and open-source project management tool that uses the Kanban methodology. Kanboard focuses on minimalism and simplicity, it is mainly designed for small teams. It also helps you to manage your projects and visualize your workflow.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you through the step by step installation of Kanboard on Ubuntu 20.04 (Focal Fossa). You can follow the same instructions for Ubuntu 18.04, 16.04, and any other Debian based distribution like Linux Mint.

Install Kanboard on Ubuntu 20.04 LTS Focal Fossa

Step 1. First, make sure that all your system packages are up-to-date by running these following apt commands in the terminal.

sudo apt update
sudo apt upgrade

Step 2. Installing the LAMP stack.

A Ubuntu 20.04 LAMP server is required. If you do not have LAMP installed, you can follow our guide here.

Step 3. Configuring MariaDB for Kanboard.

By default, MariaDB is not hardened. You can secure MariaDB using the mysql_secure_installation script. you should read and below each step carefully which will set a root password, remove anonymous users, disallow remote root login, and remove the test database and access to secure MariaDB:

mysql_secure_installation

Configure it like this:

- Set root password? [Y/n] y
- Remove anonymous users? [Y/n] y
- Disallow root login remotely? [Y/n] y
- Remove test database and access to it? [Y/n] y
- Reload privilege tables now? [Y/n] y

Next, we will need to log in to the MariaDB console and create a database for the Kanboard. Run the following command:

mysql -u root -p

This will prompt you for a password, so enter your MariaDB root password and hit Enter. Once you are logged in to your database server you need to create a database for Kanboard installation:

MariaDB [(none)]> CREATE DATABASE kanboarddb;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON kanboarddb.* TO 'kanboarduser'@'localhost' IDENTIFIED BY 'kanboardpasswd';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> Exit;

Step 4. Installing Composer on Ubuntu 20.04.

Now, We are downloading and installing the Composer with the following commands:

curl -sS https://getcomposer.org/installer | php

To make PHP Composer globally available, move it to the binary folder /usr/local/bin:

sudo mv composer.phar /usr/local/bin/composer
sudo chmod +x /usr/local/bin/composer
source ~/.bashrc

Finally, run the following commands if you want to verify the installed composer:

composer -v

Step 5. Installing Kanboard on Ubuntu 20.04.

Now we start downloading and installing Kanboard:

cd /tmp
git clone https://github.com/kanboard/kanboard.git

Once complete, move it to the Apache directory. Then, proceed to install it using the following commands:

sudo mv kanboard /var/www/kanboard
cd /var/www/kanboard
sudo mv config.default.php config.php
sudo composer install

After that, you have to modify the Kanboard configuration file to incorporate the MariaDB:

sudo nano /var/www/kanboard/config.php
define('DB_DRIVER', 'mysql');
define('DB_USERNAME', 'kanboarduser');
define('DB_PASSWORD', 'kanboardpasswd');
define('DB_NAME', 'kanboarddb');

Now, change the permission to the Kanboard folder:

sudo chown -R www-data:www-data /var/www/kanboard/
sudo chmod -R 755 /var/www/kanboard/

Step 5. Configuring Apache web server for Kanboard.

Create a new virtual host directive in Apache. For example, create a new Apache configuration file named ‘kanboard.conf’ on your virtual server:

touch /etc/apache2/sites-available/kanboard.conf
ln -s /etc/apache2/sites-available/kanboard.conf /etc/apache2/sites-enabled/kanboard.conf
nano /etc/apache2/sites-available/kanboard.conf

Add the following lines:

<VirtualHost *:80>
ServerAdmin admin@yourdomain.com
DocumentRoot /var/www/kanboard
ServerName your-domain.com
ServerAlias www.your-domain.com
<Directory /var/www/kanboard/>
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/your-domain.com-error_log
CustomLog /var/log/apache2/your-domain.com-access_log common
</VirtualHost>

Now, we can restart the Apache webserver so that the changes take place:

sudo a2enmod rewrite
sudo a2ensite kanboard.conf
sudo systemctl restart apache2

Step 6. Set up HTTPS.

We should enable a secure HTTPS connection on Nextcloud. We can obtain a free TLS certificate from Let’s Encrypt. Install Let’s Encrypt client (certbot) from Ubuntu 20.04 repository:

sudo apt install certbot python3-certbot-apache

Next, run the following command to obtain a free TLS certificate using the Apache plugin:

sudo certbot --apache --agree-tos --redirect --staple-ocsp --email you@example.com -d example.com

If the test is successful, reload Apache for the change to take effect:

sudo apache2ctl -t
sudo systemctl reload apache2

Step 7. Accessing Kanboard Web Interface.

Kanboard will be available on HTTP port 80 by default. Open your favorite browser and navigate to http://your-domain.com/ or http://server-ip-address/.

Congratulations! You have successfully installed Kanboard. Thanks for using this tutorial for installing Kanboard open source project management on your Ubuntu 20.04 LTS Focal Fossa. For additional help or useful information, we recommend you to check the official Kanboard website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button