Focalboard Installation:Ubuntu 18.04
- Omkar Kanase
- May 20, 2024
- 3 min read
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.
wget https://github.com/mattermost/focalboard/releases/download/v0.15.0/
focalboard-server- linux-amd64.tar.gzAfter 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.gzMove the extracted focalboard directory to the /opt directory using the following command:
sudo mv focalboard /optStep 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 nginxCreate a new site config:
sudo vim /etc/nginx/sites-available/focalboardThis 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/focalboardWe just need to remove the default Nginx configuration to prevent a port clash.
sudo rm /etc/nginx/sites-enabled/default
sudo nginx -tWhich should give us a successful output.
Let's restart the Nginx service.
sudo systemctl restart nginxStep 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-contribOnce installed, we need to log in as the Postgres user to configure our database.
sudo --login --user postgres
psqlYou 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>';
\qWe 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.jsonModify 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.serviceAnd 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.targetMake systemd reload the new unit, and enable it.
sudo systemctl daemon-reload
sudo systemctl start focalboard.service
sudo systemctl enable focalboard.serviceOutput:
Enter the IP Address:8000 in browser to open the Focalboard.You will see following screen.

You will see the Focalboard dashboard.

Done.



Comments