How to Install Kanboard on Debian 9

Spread the love

In this tutorial, we will show you how to install Kanboard on a Debian 9 Server.

Kanboard is a Project Management Software utilizing the Kanban methodology. Kanboard helps teams visualize their workflow by showing projects and tasks in an easy-to-understand format. This helps teams collaborate more efficiently and complete their projects on time and with as little conflict as possible. We can also use Kanboard to manage multiple projects simultaneously. We can easily move the project or task status by simply dragging and dropping the task into its respective column, each of which represents a stage in the project’s completion. Kanboard supports plugins as well as full integration with external services.

Prerequisites

  • A computer or server running Debian 9
  • SSH access with a root-privileged account, or access to the root user itself

Step 1 – Install Package Updates

Log in to your Debian 9 VPS

ssh root@IP_Address -p Port_number

You can check whether you have the proper Debian version installed on your server with the following command:

# lsb_release -a

You should get this output:

Distributor ID: Debian
Description: Debian GNU/Linux 9.9 (Stretch)
Release: 9.9
Codename: stretch

Then, run the following command to make sure that all installed packages on the server are updated to the latest available version. This maximizes compatibility and gives you all of the latest features.

# apt update && apt upgrade

Step 2 – Install the Apache Web Server

Kanboard supports Apache, Nginx, Microsoft IIS, and Caddy Server web servers. If you choose Apache, make sure you have the mod_version module installed. Make sure that you do not have the mod_security module installed, because Kanboard is not compatible with mod_security. In this tutorial, we will install and use Apache as a web server.

Let’s install Apache by issuing this command:

# apt install apache2 -y

We would also want to enable it to run on server boot:

# systemctl enable apache2
# systemctl start apache2

2.1. Create an Apache VirtualHost

We can now create our virtual host files. The virtual host configuration files usually end with the .conf extension.
Run the following command to create the virtual host configuration file for our web domain, yourdomain.com:

Make sure you replace all instances of yourdomain.com with your registered domain name in order for the configuration file to work.

# nano /etc/apache2/sites-available/yourdomain.com.conf

And add the following content to the file:

<VirtualHost *:80>
ServerAdmin [email protected]
ServerName yourdomain.com
ServerAlias www.yourdomain.com
DocumentRoot /var/www/html/kanboard

ErrorLog ${APACHE_LOG_DIR}/yourdomain.com_error.log
CustomLog ${APACHE_LOG_DIR}/yourdomain.com_access.log combined

<Directory /var/www/html/kanboard/>
    AllowOverride FileInfo Options=All,MultiViews AuthConfig
</Directory>

</VirtualHost>

Once added and saved, we can enable the virtual host by running this command:

# a2ensite yourdomain.com
# systemctl restart apache2

Step 3 – Install a Database Server

Kanboard supports the following types of databases

  • SQLite
  • MySQL
  • PostgreSQL

In this tutorial, we will use MySQL/MariaDB as the database storage engine.

# apt install mariadb-server

To start the MariaDB service and enable it to start on boot, execute the following commands:

# systemctl start mariadb
# systemctl enable mariadb

Now, you can skip the following step if you prefer not to have a MySQL root password.

# mysql_secure_installation

When prompted, answer the questions below by following the guide.

Enter current password for root (enter for none): Just press the [Enter] key, there is no password set by default
Set root password? [Y/n]: Y
New password: Enter password
Re-enter new password: Repeat password
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

If you followed the above step, then you will have a password set for your MySQL root user, so you can run this command to access the MySQL shell:

# mysql -u root -p

3.1 Create a Database

Let’s proceed with creating a database for Kanboard. Run these commands one by one to log into the MySQL shell, create a database, create a user and grant access to the new database, and save the changes:

# mysql -u root -p
MariaDB [(none)]> CREATE DATABASE kanboard;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON kanboard.* TO 'kanboard'@'localhost' IDENTIFIED BY 'M0d1fyth15';
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> \q

Make sure you replace the phrase M0d1fyth15 with a unique and strong password.

After that is done, run the following command to import the database schema to the newly created Kanboard database.

# mysql -u root -p kanboard < /var/www/html/kanboard/app/Schema/Sql/mysql.sql

Step 4 – Install PHP and all Necessary PHP Modules

Since version 1.2, Kanboard requires at least PHP 5.6, and a later or the latest version of PHP is recommended. We will use PHP 7.0 in this tutorial. This command will install PHP and all of the required packages for it to function with Kanboard:

# apt install php php-mbstring php-imap php-mysql libapache2-mod-php7.0 php-gd php-json php-xml php-opcache php-fpm

Now that PHP 7.2 is installed, let’s check and verify it.

# php -v

Here’s the output we expect to see:

PHP 7.0.33-0+deb9u3 (cli) (built: Mar  8 2019 10:01:24) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.33-0+deb9u3, Copyright (c) 1999-2017, by Zend Technologies

Step 5 – Install Kanboard

In this step, we will download and install Kanboard from GitHub. First, let’s make sure that we have the git package installed:

# apt install git -y

From there, let’s switch into the Apache web server directory and clone the Kanboard GitHub project into it:

# cd /var/www/html/
# git clone https://github.com/kanboard/kanboard.git

After that, create a configuration file by copying the example that was included.

# cp kanboard/config.default.php kanboard/config.php

Let’s also make sure that all of the files in the directory are owned by the www-data user, which is the user that belongs to Apache:

# chown -R www-data: /var/www/html/

Now, it is time to modify the database configuration file to match with the database credentials.

# nano /var/www/html/kanboard/config.php

Modify the values as follows (change the values as needed if you used values different from the ones in the tutorial):

// Database driver: sqlite, mysql or postgres (sqlite by default)
define('DB_DRIVER', 'mysql');

// Mysql/Postgres username
define('DB_USERNAME', 'kanboard');

// Mysql/Postgres password
define('DB_PASSWORD', 'M0d1fyth15');

// Mysql/Postgres hostname
define('DB_HOSTNAME', 'localhost');

// Mysql/Postgres database name
define('DB_NAME', 'kanboard');

At this point, Kanboard has been successfully installed – you can navigate to your http://yourdomain.com to start using it. You can use the following credentials to access the Kanboard backend.

Username: admin
Password: admin

You will want to update the default password as soon as possible.

Additionally, if you want your Kanboard installation to use pretty permalinks, you can enable it by enabling the feature in your config.php file

define('ENABLE_URL_REWRITE', true);

Make sure that your Apache mod rewrite is also enabled. You can do so by running this command:

# a2enmod rewrite
# systemctl restart apache2

That’s all there is to it – you should be able to access your Kanboard application at http://yourdomain.com now.


Of course, you don’t have to install Kanboard on Debian 9 if you use one of our Fully Managed VPS Support services, in which case you can simply ask our expert Linux admins to install Kanboard on your Debian VPS for you. They are available 24×7 and will take care of your request immediately.

PS. If you liked this post on how to install Kanboard on Debian 9, please share it with your friends on the social networks using the buttons below or simply leave a reply in the comments sections. Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *