How to Install Kanboard Project Management Software on Debian 10
Kanboard is a free, open-source and self-hosted project management software that can be used to manage projects using Kanban methodology. You can visualize the work-flow, limiting work in progress and work efficiently from the Kanboard web interface. Kanban enables you to customize your boards according to your needs. You can extend the functionality of Kanbord with plugins and third-party services.
In this tutorial, we will walk you through the step by step instructions on how to install and configure Kanboard on Debian 10.
Requirements
- A server running Debian 10.
- A root password is configured on your server.
Getting Started
It is recommended to update your system with the latest version. You can update all the packages with the following command:
apt-get update -y
apt-get upgrade -y
Once all the packages are updated, restart your system to apply the configuration changes.
Install LEMP Server
Kanboard runs on the webserver, written in PHP and uses MariaDB for the database backend. So, you will need to install Nginx, MariaDB, PHP and other PHP modules to your system.
apt-get install nginx mariadb-server php7.3 php7.3-common php7.3-cli php7.3-fpm php7.3-mbstring php7.3-json php7.3-opcache php7.3-zip php7.3-xml php7.3-gd php7.3-ldap php7.3-mysql php7.3-json php7.3-sqlite3
Once the installation has been completed, start Nginx and MariaDB service, and enable them to start after system reboot with the following command:
systemctl start nginx
systemctl start mariadb
systemctl enable nginx
systemctl enable mariadb
Configure MariaDB for Kanboard
By default, MariaDB is not secured so it is recommended to secure it. You can secure it by running the following script.
mysql_secure_installation
Answer all the questions as shown below:
Enter current password for root (enter for none): Set root password? [Y/n]: N 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
Once the MariaDB is secured, log in to MariaDB shell:
mysql -u root -p
Enter your root password when prompt, then create a database and user for Kanboard:
MariaDB [(none)]>CREATE DATABASE kanboard CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
Next, grant all the privileges to Kanboard database with the following command:
MariaDB [(none)]>GRANT ALL PRIVILEGES ON kanboard.* TO 'kanboard'@'localhost' IDENTIFIED BY 'mypassword';
Replace the word 'mypassword' with a secure password of your choice in the above SQL command. Next, flush the privileges with the following command:
MariaDB [(none)]>FLUSH PRIVILEGES;
Finally, exit from the MariaDB shell with the following command:
MariaDB [(none)]>\q
Install Kanboard
First, download the latest version of Kanboard from the Git repository with the following command:
wget https://github.com/kanboard/kanboard/archive/v1.2.10.tar.gz
Once the download is completed, extract the downloaded file with the following command:
tar -xvf v1.2.10.tar.gz
Next, copy the extracted directory to Apache web root directory with the following command:
cp -r kanboard-1.2.10 /var/www/html/kanboard
Next, copy the Kanboard sample configuration file with the following command:
cd /var/www/html/kanboard
cp config.default.php config.php
Next, open the config.php file with your preferred editor:
nano config.php
Define your database setting as shown below:
// 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', 'password'); // Mysql/Postgres hostname define('DB_HOSTNAME', 'localhost'); // Mysql/Postgres database name define('DB_NAME', 'kanboard');
Save and close the file, when you are finished. Then, set proper permissions with the following command:
chown -R www-data:www-data /var/www/html/kanboard
Once you have finished, you can proceed to the next step.
Configure Nginx for Kanboard
Next, you will need to create an Nginx virtual host file for Kanboard. You can create it with the following command:
nano /etc/nginx/conf.d/kanboard.conf
Add the following lines:
server { listen 80; server_name example.com; index index.php; root /var/www/html/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.3-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; }
Save and close the file, when you are finished. Then, check Nginx for any syntax error with the following command:
nginx -t
You should see the following output:
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
Finally, restart Nginx and php-fpm service with the following command:
systemctl restart nginx
systemctl restart php7.3-fpm
You can check the status of Nginx service with the following command:
systemctl status nginx
You should see the following output:
? 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 Sat 2019-07-13 06:05:09 EDT; 26s ago Docs: man:nginx(8) Process: 13412 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Process: 13413 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS) Main PID: 13414 (nginx) Tasks: 2 (limit: 1138) Memory: 2.9M CGroup: /system.slice/nginx.service ??13414 nginx: master process /usr/sbin/nginx -g daemon on; master_process on; ??13415 nginx: worker process Jul 13 06:05:09 debian systemd[1]: Starting A high performance web server and a reverse proxy server... Jul 13 06:05:09 debian systemd[1]: nginx.service: Failed to parse PID from file /run/nginx.pid: Invalid argument Jul 13 06:05:09 debian systemd[1]: Started A high performance web server and a reverse proxy server.
Access Kanboard Web Interface
Kanboard is now installed and configured, it's time to access Kanboard web interface.
Open your web browser and type the URL http://example.com. You will be redirected to the following page:
Provide default admin username and password as admin / admin and click on the Sign In button. You should see the Kanboard default dashboard in the following page:
It is recommended to change your default admin password. To do so, go to the Admin > Users Management > admin. You should see the following page:
Now, click on the Change password button. You should see the following page:
provide your new password and click on the Save button.
Congratulations! you have successfully installed and configured Kanboard on Debian 10. You can now manage your tasks easily from Kanboard web interface. Feel free to ask me if you have any questions.