top of page
Search

Focalboard Installation:Ubuntu 18.04

Focalboard:


Focalboard is an open-source productivity tool designed to help individuals and teams organize tasks, documents, and ideas in a visual and collaborative workspace. It's essentially a digital whiteboard where you can create boards, lists, and cards to manage projects, track progress, and brainstorm ideas..


In this comprehensive guide, we will walk you through the step-by-step process of installing Focalboard on your Ubuntu 18.04 server. We will also demonstrate how to configure Nginx as a reverse proxy to enable secure access to Focalboard. So let’s get started!


Step 1: Updating your server to the latest version


The first step is to just make sure our server is up to date. Run the following commands to pull down the latest updates from our repositories.


Update the System.

apt update
&
apt upgrade

Step 2: Installing the Focalboard Personal Server


Firstly, we need to download the latest release package from the Focalboard GitHub release page. This can be done using the wget command.

After executing that command, run ls to make sure that your file is present.


  • Now, we need to extract this tar.gz file:

tar -xvzf focalboard-server-linux-amd64.tar.gz
  • Move the extracted focalboard directory to the /opt directory using the following command:

sudo mv focalboard /opt

Step 3: Installing and configuring Nginx


Nginx is often used as a reverse proxy server to help manage and route HTTP traffic to Focalboard application. When deploying Focalboard on a server, Nginx acts as an intermediary between the users' web browsers and the Focalboard application server.


  • First, we need to install Nginx.

sudo apt install nginx
  • Create a new site config:

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

This will open up a new window that allows us to add our Nginx configuration.

Paste in the following code.

upstream focalboard {
server localhost:8000;
keepalive 32;
}
server {
listen 80 default_server;
server_name IP_ADDRESS_OF_SERVER;
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;
}
}
  • Now, we just need to register our new site with Nginx, you can do this by running the following command.

sudo ln -s /etc/nginx/sites-available/focalboard/etc/nginx/sites-enabled/focalboard
  • We just need to remove the default Nginx configuration to prevent a port clash.

sudo rm /etc/nginx/sites-enabled/default
  • Now, we can test the Nginx configuration. Run the following command.

sudo nginx -t

Which should give us a successful output.


  • Let's restart the Nginx service.

sudo systemctl restart nginx

Step 4: Installing Postgresql


For your server, it is recommended to use Postgres to store your data in a production environment. To install Postgres, you need to run the following command.

Commands:

sudo apt install postgresql postgresql-contrib

Once installed, we need to log in as the Postgres user to configure our database.

sudo --login --user postgres 
psql

You should now be in the Postgres prompt.


  • Let's create our database to store our Focalboard data.

CREATE DATABASE boards;
CREATE USER <b>boardsuser</b> WITH PASSWORD '<b>boardsuser-password</b>'; 
\q
  • We now need to tell Focalboard to use the new user we just created. This can be done by updating the Focalboard config file. Type the following command to edit the config.json file.

vim /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=d
isable&connect_timeout=10",

Make sure to update the dbconfig with your username and password.

Save and exit.


Step 5: Configure Focalboard Service


  • Create a new service config file.

sudo vim /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

Output:


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




You will see the Focalboard dashboard.


Done.

 
 
 

Comments


bottom of page