Kanboard Setup Guide on Ubuntu 18.04

Overview

Kanboard is a cost-free and open-source project management application crafted to streamline and visualize team workflows through the Kanban technique.

This tutorial provides a step-by-step walkthrough on how to deploy Kanboard on a system running Ubuntu 18.04.

Requirements

  • An Ubuntu 18.04 server. This guide assumes the example IP address 203.0.113.1.
  • A user account with sudo privileges.

Step 1: System Update

Start by connecting to your server using an SSH terminal as a sudo user. Proceed to upgrade the existing packages and install Git.

sudo apt update && sudo apt upgrade -y
sudo apt install -y git
sudo reboot

Once the server has restarted, log back in using the same sudo user to continue.

Step 2: Apache Installation

Kanboard requires a web server. Here, Apache 2.4 will be installed.

sudo apt install apache2 -y

Then, start the Apache service and set it to launch at boot:

sudo systemctl enable --now apache2.service

Step 3: MariaDB Installation

Although Kanboard relies on SQLite by default, using MariaDB (or MySQL) offers enhanced performance for production-grade deployments.

Install the MariaDB server and client tools:

sudo apt install -y mariadb-server mariadb-client

Activate the MariaDB service and configure it to start automatically:

sudo systemctl enable --now mariadb.service

Secure your MariaDB setup by running the following script:

sudo mysql_secure_installation

When prompted, respond as outlined below. It’s critical to choose a strong, private password for the root user.

  • Enter current password for root (enter for none): Press Enter
  • Set root password? [Y/n]: Y
  • New password: <your-password>
  • Re-enter new password: <your-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

Step 4: Install PHP 7

Kanboard requires PHP version 5.3.9 or later. We’ll use PHP 7.2 along with essential extensions, as it’s readily available from Ubuntu’s official repositories.

sudo apt install -y php7.2 php7.2-mysql php7.2-gd php7.2-mbstring php7.2-common php7.2-opcache php7.2-cli php7.2-xml

Step 5: Install Kanboard

Begin by downloading the latest version of Kanboard and placing it in the appropriate directory.

cd /var/www/html
sudo git clone https://github.com/kanboard/kanboard.git
sudo chown -R www-data:www-data kanboard/data

Create a dedicated MySQL database and user for Kanboard.

mysql -u root -p -e "CREATE DATABASE kanboard;"
mysql -u root -p kanboard < /var/www/html/kanboard/app/Schema/Sql/mysql.sql
mysql -u root -p -e "CREATE USER 'kanboarduser'@'localhost' IDENTIFIED BY 'yourpassword';"
mysql -u root -p -e "GRANT ALL PRIVILEGES ON kanboard.* TO 'kanboarduser'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;"
mysql -u root -p -e "FLUSH PRIVILEGES;"

Note: Use the MariaDB root password you previously configured. Replace yourpassword with a strong password.

Proceed to adjust the Kanboard configuration file to utilize MySQL instead of SQLite.

cd /var/www/html/kanboard
sudo mv config.default.php config.php

Now, open the config file with your preferred text editor.

Locate the following configuration block:

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

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

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

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

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

Update the entries so they look like the following:

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

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

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

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

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

To apply these changes, restart the Apache service:

sudo systemctl restart apache2.service

To begin using Kanboard, launch a browser and navigate to http://203.0.113.1/kanboard.

Log in using the default credentials:

  • Username: admin
  • Password: admin

Note: For security reasons, it’s important to change the admin password immediately. You can do this through the user management option available in the top-right admin menu.

Step 6 (Optional): Configure Zend OpCache

For optimal performance of your Kanboard instance, consider fine-tuning the Zend OpCache settings. This caching mechanism is enabled by default.

If you’re deploying Kanboard in a single-server production environment, the following settings can help you get started with performance optimization.

Open the Zend OpCache configuration file:

sudo vi /etc/php/7.2/apache2/conf.d/10-opcache.ini

Apply these settings to the file:

zend_extension=opcache.so;
opcache.enable=1;
opcache.file_cache=/tmp/opcache
opcache.validate_timestamps=0
opcache.revalidate_freq=0
opcache.memory_consumption=192
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=1979
opcache.fast_shutdown=1

To activate the new configuration, restart Apache:

sudo systemctl restart apache2.service

Step 7 (Optional): Schedule Daily Cron Job for Reports and Analytics

For Kanboard to automatically generate up-to-date reports and analytics, a daily cron job should be set up under the www-data user.

Edit the crontab for www-data:

sudo crontab -u www-data -e

Insert the following line to schedule the cron job:

0 3 * * * cd /var/www/html/kanboard && ./cli cronjob >/dev/null 2>&1

Save and close the file. This ensures that analytics and reports will be refreshed automatically each day at 3:00 AM.

Conclusion

By completing the steps outlined in this guide, you now have a functional Kanboard instance running on Ubuntu 18.04 with optimized performance and automated analytics updates. This setup supports collaboration through Kanban boards and can be further tailored to suit your team’s specific workflow needs. Be sure to maintain security best practices by updating passwords and monitoring server activity regularly.

Source: vultr.com

Create a Free Account

Register now and get access to our Cloud Services.

Posts you might be interested in: