Installing Focalboard on Ubuntu 20.04

Hello,
In this week’s feature highlight, we look at How to Install Focalboard on Ubuntu 20.04

Focalboard is an open source, self-hosted alternative to Trello, Notion, and Asana. It’s a project management tool that helps define, organize, track and manage work across teams, using a familiar kanban board view

Update the System.

apt update

apt upgrade

Install Focalboard

Download the focalboard packages and then move it into /opt/focalboard directory.

wget https://github.com/mattermost/focalboard/releases/download/v0.9.2/focalboard-server-linux-amd64.tar.gz
tar -xvzf focalboard-server-linux-amd64.tar.gz
sudo mv focalboard /opt

Install NGINX

Now install NGINX using the following command. By default, the Focalboard server runs on port 8000.

sudo apt install nginx

Adjust firewall setting as per your need. You can open port 8000 in the firewall or you can disable the firewall in your server.

Configure NGINX

Create new config site.

sudo nano /etc/nginx/sites-available/focalboard

Copy and paste this configuration.

upstream focalboard {
server localhost:8000;
keepalive 32;
}

server {
listen 80 default_server;

server_name focalboard.example.com;

location ~ /ws/* {
     proxy_set_header Upgrade $http_upgrade;
     proxy_set_header Connection "upgrade";
     client_max_body_size 50M;
     proxy_set_header Host $http_host;
     proxy_set_header X-Real-IP $remote_addr;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     proxy_set_header X-Forwarded-Proto $scheme;
     proxy_set_header X-Frame-Options SAMEORIGIN;
     proxy_buffers 256 16k;
     proxy_buffer_size 16k;
     client_body_timeout 60;
     send_timeout 300;
     lingering_timeout 5;
     proxy_connect_timeout 1d;
     proxy_send_timeout 1d;
     proxy_read_timeout 1d;
     proxy_pass http://focalboard;
 }

 location / {
     client_max_body_size 50M;
     proxy_set_header Connection "";
     proxy_set_header Host $http_host;
     proxy_set_header X-Real-IP $remote_addr;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
     proxy_set_header X-Forwarded-Proto $scheme;
     proxy_set_header X-Frame-Options SAMEORIGIN;
     proxy_buffers 256 16k;
     proxy_buffer_size 16k;
     proxy_read_timeout 600s;
     proxy_cache_revalidate on;
     proxy_cache_min_uses 2;
     proxy_cache_use_stale timeout;
     proxy_cache_lock on;
     proxy_http_version 1.1;
     proxy_pass http://focalboard;
   }
}

If there is a default site, then delete it.

sudo rm /etc/nginx/sites-enabled/default

Test the config and reload NGINX using the following commands:

sudo ln -s /etc/nginx/sites-available/focalboard /etc/nginx/sites-enabled/focalboard
sudo nginx -t
sudo /etc/init.d/nginx reload

Install Postgresql

To install Postgresql, run the following commands on the server.

sudo apt install postgresql postgresql-contrib

Now login as a postgres user to create new database,

sudo --login --user postgres

psql

Currently you are in psql prompt, run the following commands,

CREATE DATABASE focal;
CREATE USER focaluser WITH PASSWORD 'focaluser-password';
\q

Exit the session.

exit

Edit the Focalboard /opt/focalboard/config.json,

nano /opt/focalboard/config.json

Modify the dbconfig in the file with the postgres database that was created.

"dbtype": "postgres",
"dbconfig": "postgres://boardsuser:boardsuser-password@localhost/boards?sslmode=disable&connect_timeout=10",

Move focalboard-server file in /opt/focalboard/ directory,

 mv /opt/focalboard/bin/focalboard-server /opt/focalboard/

Configure Focalboard Service

Create a new service config file,

sudo nano /lib/systemd/system/focalboard.service

And paste following lines in file.

[Unit]
Description=Focalboard server

[Service]
Type=simple
Restart=always
RestartSec=5s
ExecStart=/opt/focalboard/focalboard-server
WorkingDirectory=/opt/focalboard

[Install]
WantedBy=multi-user.target

Make systemd reload the new unit, and enable it.

sudo systemctl daemon-reload
sudo systemctl start focalboard.service
sudo systemctl enable focalboard.service

Enter the IP Address:8000 in browser to open the focalboar. You will see following screen.

image

You will see the Focalboard dashboard,

image

Done.

(Visited 1,068 times, 1 visits today)