(Last Updated On: September 15, 2018)

In this blog post, we will cover steps to install and configure Kanboard on Ubuntu 18.04 LTS Linux server. Kanboard is a project management software that focuses on the Kanban methodology. Kanban is a project management methodology originally developed by Toyota to be more efficient. Kanban aims at helping you to Visualize your workflow and to Limit your work in progress. It encourages focus by avoiding multitasking and quick identification of bottlenecks.

Features of Kanboard

Below are the key features of Kanboard:

  • It is a free and open source
  • It enables you to customize your boards according to your business activities
  • Has native support for reports and analytics
  • You can have multiple projects with the ability to drag and drop tasks
  • Provides an easy to use web dashboard that can be accessed from anywhere with a modern browser
  • Capability to extend functionalities with plugins and integration to other external services

Kanboard Dependencies

  • Data Store – By default Kanboard use SQLite but you can replace it with a relational database like MySQL/MariaDB or PostgreSQL. MySQL >= 5.6 or MariaDB >= 10. Mysql/Postgres is recommended for a large team that demands high-availability configuration
  • Web Servers: You can use Nginx, Apache or Caddy Server
  • PHP >= 5.6.0
  • PHP Extensions Required:
PHP Extension Note
pdo_sqlite Only if you use SQLite
pdo_mysql Only if you use Mysql/MariaDB
pdo_pgsql Only if you use Postgres
gd
mbstring
openssl
json
hash
ctype
session
filter
xml
SimpleXML
dom

Optional PHP extensions

PHP Extension Note
zip Used to install plugins from the website
ldap Only for LDAP authentication

Install Kanboard on Ubuntu 18.04 LTS

Here are the steps to install and configure Kanboard on Ubuntu 18.04. We’ll use MariaDB as our data store of choice, and Nginx web server.

Step 1: Install MariaDB database server

Install MariaDB database server on your Ubuntu 18.04 using the following guide:

Install MariaDB 10.x on Ubuntu 18.04 and CentOS 7

Once the installation is complete, create a database with a user. First, log in to the database CLI as a root user.

$ mysql -u root -p
Enter password: 
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 39
Server version: 10.3.9-MariaDB-1:10.3.9+maria~bionic-log mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

Then run the commands to create database and user with required privileges

CREATE DATABASE kanboard CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;;
GRANT ALL PRIVILEGES ON kanboard.* TO 'kanboard'@'localhost' IDENTIFIED BY 'StrongPassword';
FLUSH PRIVILEGES;
\q

Step 2: Install Nginx and PHP

Next, we can install the Nginx web server and required php extensions

sudo apt update
sudo apt install php php-{fpm,mbstring,cli,json,opcache,zip,xml,gd,ldap,mysql,json,sqlite3}
sudo apt-get install nginx

Step 3: Download and Install Kanboard

You have two options to download Kanboard:

  • From stable release
  • From Github development branch

To download a specific stable release of Kanboard, check Kanboard releases page. As of this writing, the latest release is version 1.2.5

export VER=1.2.5
wget https://github.com/kanboard/kanboard/archive/v${VER}.tar.gz
tar xvf v${VER}.tar.gz
rm -f v${VER}.tar.gz
sudo mv kanboard-${VER}/ /var/www/kanboard

To download development release, use

sudo git clone https://github.com/kanboard/kanboard.git /var/www/kanboard

Create a config file

Copy Kanboard configuration template.

sudo cp /var/www/kanboard/config.default.php /var/www/kanboard/config.php
sudo vim /var/www/kanboard/config.php

The file config.php should contain database access values.

// 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', 'StrongPassword');

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

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

This extensive configuration reference for Kanboard is helpful for proper configuration of other features like LDAP authentication, SMTP settings, Brute-force protection, Logging, Secure HTTP headers settings e.t.c.

Set Proper permissions

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

Step 4: Configure Nginx

Create Nginx configuration file /etc/nginx/conf.d/kanboard.confwith the following content

server {
        listen       80;
        #listen       443 ssl;
	#ssl_certificate /etc/nginx/ssl/kanboard.crt;
	#ssl_certificate_key /etc/nginx/ssl/kanboard.key;
        server_name  kanboard.example.com;
        index        index.php;
        root         /var/www/kanboard;
        client_max_body_size 32M;

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

        location ~ \.php$ {
            try_files $uri =404;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_index index.php;
            include fastcgi_params;
        }

        location ~* ^.+\.(log|sqlite)$ {
            return 404;
        }

        location ~ /\.ht {
            return 404;
        }

        location ~* ^.+\.(ico|jpg|gif|png|css|js|svg|eot|ttf|woff|woff2|otf)$ {
            log_not_found off;
            expires 7d;
            etag on;
        }

        gzip on;
        gzip_comp_level 3;
        gzip_disable "msie6";
        gzip_vary on;
        gzip_types
            text/javascript
            application/javascript
            application/json
            text/xml
            application/xml
            application/rss+xml
            text/css
            text/plain;
    }
Uncomment SSL configuration lines if you wish to use https

Using Let’s Encrypt SSL

This example is for http to https redirection and Let’s Encrypt SSL certificate

# HTTP
server {
	listen 80;
        server_name  kanboard.example.com;
        root         /var/www/kanboard;
	location / {
        	rewrite     ^ https://kanboard.example.com$request_uri? permanent;
    }
}
	
# HTTPS
server {
        listen       443 ssl;
	ssl_certificate /etc/letsencrypt/live/kanboard.example.com/fullchain.pem;
	ssl_certificate_key /etc/letsencrypt/live/kanboard.example.com/privkey.pem;
        server_name  kanboard.example.com;
        index        index.php;
        root         /var/www/kanboard;
        client_max_body_size 32M;

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

        location ~ \.php$ {
            try_files $uri =404;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_index index.php;
            include fastcgi_params;
        }

        location ~* ^.+\.(log|sqlite)$ {
            return 404;
        }

        location ~ /\.ht {
            return 404;
        }

        location ~* ^.+\.(ico|jpg|gif|png|css|js|svg|eot|ttf|woff|woff2|otf)$ {
            log_not_found off;
            expires 7d;
            etag on;
        }

        gzip on;
        gzip_comp_level 3;
        gzip_disable "msie6";
        gzip_vary on;
        gzip_types
            text/javascript
            application/javascript
            application/json
            text/xml
            application/xml
            application/rss+xml
            text/css
            text/plain;
    }

Check configuration syntax

# nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

If it returns OK then you can start nginx service

sudo systemctl restart nginx
sudo systemctl enable nginx

Step 5: Access Kanboard Web UI

Access  Kanboard Web UI by opening the link http://kanboard.example.com with your favorite web browser. Replace kanboard.example.com with your correct domain name.

To login use:

Username: admin
Password: admin

You should get to a dashboard like below

Reset admin password

To be safe, reset admin password by navigating to Admin > Users Management > admin

Save and test by logging out and logging in again.

Similar Articles

How to Install Wekan Open source Kanban on CentOS 7 with Nginx and Letsencrypt SSL