How to Install Planka – A Real-Time Kanban Board Application

If you have used a project management tool such as Trello, Wekan, and any other related one, you may find yourself at home when using Planka. What I like about Planka is that it has a clean UI and a handful of features. So let’s dive into how to install Planka – A real-time Kanban board application.

It is written using React and Redux-related tools with a Postgres database as the backend database.

This installation follows the manual setup of Planka with Postgres on Ubuntu OS.

1- Setup database

The first thing we will do is install the PostgreSQL database and create a database and user.

apt install postgresql postgresql-contrib ca-certificates curl gnupg

Start the service and enable it at boot.

systemctl start postgresql
systemctl enable postgresql

Login to PostgreSQL as the postgres user.

sudo -iu postgres

Create a new user and database with:

createuser planka_user -P

createdb planka

We will assign the planka_user to the planka database in the psql shell.





2- Install Nodejs

We will install Nodejs from its repositories.

mkdir -p /etc/apt/keyrings

curl -fsSL | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg

echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg]$NODE_MAJOR.x nodistro main" | sudo tee /etc/apt/sources.list.d/nodesource.list

Update the system and install Nodejs now.

apt update
apt install nodejs

Check the Nodejs version with, node -v.

3- Install Planka

As we will be using Apache as a reverse proxy, the user www-data will suffice here.

apt install apache2 vim

Download the package (1.16.1 at this time).

cd /var/www
curl -fsSL -o

chown -R www-data:www-data /var/www/planka/

Install all the dependencies:

cd planka
npm install

The configuration is .env and we need to make a few changes there.

cp .env.sample .env

Create a secret key and copy it:

openssl rand -hex 64
vim .env

Change the variable in bold:

## Required

## Optional

# TOKEN_EXPIRES_IN=365 # In days

# related:
# As knex does not pass query parameters from the connection string we
# have to use environment variables in order to pass the desired values, e.g.
# PGSSLMODE=<value>

# Configure knex to accept SSL certificates

DEFAULT_ADMIN_EMAIL=YOUR_ADMIN_EMAIL # Do not remove if you want to prevent this user from being edited/deleted

# OIDC_SCOPES=openid email profile

## Do not edit this


Start Planka while in /var/www/planka directory:

npm run db:init && npm start --prod

Until here, everything is good so far. Before we proceed to the browser side of things, let’s set up the proxy.

4- Apache proxy with SSL

Create a virtual host file.

cd /etc/apache2/sites-available
vim planka.conf

Copy the following into it while making changes to suit your needs.

<VirtualHost *:80>

	ServerName DOMAIN.COM

	DocumentRoot /var/www/html

	<Directory "/var/www/html">
		AllowOverride All
		Options -Indexes +FollowSymLinks

	ErrorLog /var/log/apache2/DOMAIN.COM_error.log


Save and enable this virtual host.

a2dissite 000-default.conf
a2ensite planka.conf

apachectl -t
systemctl restart apache2

Once you restart Apache, you can now get an SSL certificate from Let’s encrypt.

apt install snap snapd
certbot certonly --webroot -w /var/www/html -d DOAMIN.COM

After successfully obtaining the certificates, we will now add the port 443 block to the virtual host. Change domain name to your actual domain.

<VirtualHost *:443>
	ServerName DOMAIN.COM

	DocumentRoot /var/www/html

	SSLProtocol All -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
	SSLHonorCipherOrder On
	Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
	Header always set X-Frame-Options DENY
	Header always set X-Content-Type-Options nosniff

	Protocols h2 http/1.1

	<Directory "/var/www/html">
		AllowOverride All
		Options -Indexes +FollowSymLinks

	ErrorLog /var/log/apache2/DOMAIN.COM_error.log

	RewriteEngine On
	RewriteCond %{HTTP:Upgrade} =websocket [NC]
	RewriteRule /(.*)            ws://localhost:1337/$1 [P,L]

	SSLProxyEngine on
	ProxyPreserveHost On
	ProxyRequests Off
	ProxyPass /.well-known !
	ProxyPassReverse /.well-known !
	ProxyPass /robots.txt !
	ProxyPassReverse /robots.txt !
	ProxyPass / http://localhost:1337/
	ProxyPassReverse / http://localhost:1337/

	SSLEngine on
	SSLCertificateKeyFile /etc/letsencrypt/live/DOMAIN.COM/privkey.pem
	SSLCertificateFile /etc/letsencrypt/live/DOMAIN.COM/fullchain.pem

Check the configuration file and restart Apache.

apachectl -t
systemctl restart apache2

You can now browse to your domain name and log in with the admin email and password provided in the .env file.

To automatically redirect to HTTPS, add the following in the port 80 block and restart Apache.

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Leave a Reply

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