How to install Kanboard on Ubuntu 20.04 with Nginx

You can download this article in PDF format via the link below to support us.Download the guide in PDF formatClose

Kanboard is an open source project management software that focuses on the Kanban method. Kanban is a project management method originally developed by Toyota, but it has been widely adopted by most organizations to improve efficiency. The Kanban method helps you visualize the workflow and provide more features with minimal effort. In this article, we have introduced the steps to install Kanboard on Ubuntu 20.04 using Nginx web server.

This is the main function of Kanboard project management platform.

  • It is a free and open source
  • It enables you to customize the board according to business activities
  • Native support for reporting and analysis
  • You can have multiple items that can drag and drop tasks
  • Provides an easy-to-use web dashboard that can be accessed from anywhere using modern browsers
  • Ability to extend functions and integrate with other external services through plug-ins

Kanban dependence

  • data storage – By default, Kanboard uses SQLite, but you can replace it with a relational database, such as MySQL/MariaDB or PostgreSQL. MySQL>= 5.6 or MariaDB>=10. For large teams that require high availability configuration, Mysql / Postgres is recommended
  • Network Server: You can use Nginx, Apache or Caddy Server
  • PHP>= 5.6.0
  • Need PHP extension:
PHP extension description
pdo_sqliteOnly if you use SQLite
pdo_mysqlOnly if you use Mysql/MariaDB
pdo_pgsqlOnly if you use Postgres
d
mbstring
Openssl
json
Hash
Types of
meeting
filter
XML file
SimpleXML
dom

Optional PHP extension

PHP extension description
compressionUsed to install plugins from the website
ldapOnly used for LDAP authentication

Install Kanboard on Ubuntu 20.04 LTS

Please follow the steps in the next section to install Kanboard on Ubuntu 20.04 LTS. You may consider performing a complete system update before proceeding.

sudo apt update
sudo apt -y upgrade
sudo reboot

Step 1: Install MariaDB database server

Let’s start by installing MariaDB database server on Ubuntu:

sudo apt install mariadb-server mariadb-client -y

Protect the application by setting a root password:

$ sudo mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] y
New password:
Re-enter new password:
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
 ... Success!

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

Update the authentication plugin:

$ sudo mysql -u root
UPDATE mysql.user SET plugin = 'mysql_native_password' WHERE User="root";
FLUSH PRIVILEGES;
q

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

$ mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or g.
Your MariaDB connection id is 62
Server version: 10.3.25-MariaDB-0ubuntu0.20.04.1 Ubuntu 20.04

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 command to create a database and user with the 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 PHP extension and Nginx web server

Next is to install PHP, necessary extensions and Nginx web server.

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

Accept the installation prompt:

...
Suggested packages:
  apache2-doc apache2-suexec-pristine | apache2-suexec-custom www-browser php-pear libgd-tools openssl-blacklist
The following NEW packages will be installed:
  apache2 apache2-bin apache2-data apache2-utils fontconfig-config fonts-dejavu-core libapache2-mod-php7.4 libapr1 libaprutil1 libaprutil1-dbd-sqlite3
  libaprutil1-ldap libfontconfig1 libgd3 libjansson4 libjbig0 libjpeg-turbo8 libjpeg8 liblua5.2-0 libonig5 libtiff5 libwebp6 libxpm4 libzip5 php php-cli
  php-common php-fpm php-gd php-json php-ldap php-mbstring php-mysql php-sqlite3 php-xml php-zip php7.4 php7.4-cli php7.4-common php7.4-fpm php7.4-gd
  php7.4-json php7.4-ldap php7.4-mbstring php7.4-mysql php7.4-opcache php7.4-readline php7.4-sqlite3 php7.4-xml php7.4-zip ssl-cert
0 upgraded, 50 newly installed, 0 to remove and 0 not upgraded.
Need to get 10.1 MB of archives.
After this operation, 40.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

Install the Nginx web server software package.

sudo apt install nginx -y

Step 3: Download and install Kanban

Kanboard has two standard installation options:

  • From stable release
  • From the Github development branch

To download a specific stable version of Kanboard, please check Kanban version page.At the time of writing, the latest version is the version 1.2.18

Let’s download the latest stable version:

export VER=1.2.18
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 the development version, use:

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

Create a Kanban profile

Copy the Kanban configuration template.

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

file config.php Should contain the database access value.

// 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 one Extensive configuration reference about Kanboard It helps to configure other functions correctly, such as LDAP authentication, SMTP settings, brute force protection, logging, secure HTTP header settings, etc.

Make the www-data user the owner of the directory and group it:

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

Step 4: Configure Nginx web server

Create Nginx configuration file /etc/nginx/conf.d/kanboard.conf

sudo vim /etc/nginx/conf.d/kanboard.conf

Paste the following content and modify it to suit your use.

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; # Set domain name
        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/php-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;
 }

If you want to use it, uncomment the SSL configuration line https

Use our encrypted SSL

This example is used for http to https redirection and encrypted 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/php-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

$ sudo 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 the nginx service

sudo systemctl disable --now apache2
sudo systemctl restart nginx
sudo systemctl enable nginx

Check nginx service status:

$ systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
     Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
     Active: active (running) since Tue 2021-01-26 08:49:19 UTC; 10s ago
       Docs: man:nginx(8)
   Main PID: 18730 (nginx)
      Tasks: 2 (limit: 1137)
     Memory: 2.6M
     CGroup: /system.slice/nginx.service
             ├─18730 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
             └─18731 nginx: worker process

Jan 26 08:49:19 ubuntu systemd[1]: Starting A high performance web server and a reverse proxy server...
Jan 26 08:49:19 ubuntu systemd[1]: Started A high performance web server and a reverse proxy server.

Step 5: Access Kanboard Web UI

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

To log in using:

username: administratorpassword: administrator

You should enter the dashboard as shown below

kanboard ubuntu 18.04 management dashboard minutes

Reset the administrator password

Improve dashboard access security by setting an administrator password below Administrator>User Management>Administrator >change password

Kanboard ubuntu 18.04 change the administrator password 01 minutes

Enter the current password and new password of the administrator user.

Kanboard ubuntu 18.04 change the administrator password 02 minutes

You have successfully installed Kanboard project management on Ubuntu 20.04 using Nginx as the web server.

Similar guides:

Install Taiga project management tool on CentOS 8

Install Taiga Project Management Platform on Ubuntu 20.04

You can download this article in PDF format via the link below to support us.Download the guide in PDF formatClose

Sidebar