How to Install Focalboard on Ubuntu 22.04



How to Install Focalboard on Ubuntu 22.04

How to Install Focalboard on Ubuntu 22.04

Focalboard is an open-source and self-hosted project management tool. It is multilingual and an alternative to Asana, Trello, and Notion that can be used by developers to track and manage work across teams. It is based on kanban and is available for desktops and servers. It can be used as a stand-alone personal server for testing and development. Focalboard helps developers stay aligned to complete tasks, reach milestones, and achieve their goals.

In this post, we will show you how to install Focalboard with Nginx as a reverse proxy on Ubuntu 22.04.

Useful Links:
VPS/VDS – https://www.mivocloud.com/
focalboard – https://www.focalboard.com/

Commands Used:
apt-get install curl wget gnupg2 -y
apt-get install postgresql postgresql-contrib -y
su – postgres
psql
CREATE DATABASE focaldb;
CREATE USER focaluser WITH PASSWORD ‘password’;
q
exit
VER=$(curl -s https://api.github.com/repos/mattermost/focalboard/releases/latest|grep tag_name | cut -d ‘”‘ -f 4)
wget https://github.com/mattermost/focalboard/releases/download/${VER}/focalboard-server-linux-amd64.tar.gz
tar -xvzf focalboard-server-linux-amd64.tar.gz
mv focalboard /opt
nano /opt/focalboard/config.json

“dbtype”: “postgres”,
“dbconfig”: “postgres://focaluser:password@localhost/focaldb?sslmode=disable&connect_timeout=10”,

nano /lib/systemd/system/focalboard.service

[Unit]
Description=Focalboard server

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

[Install]
WantedBy=multi-user.target

systemctl daemon-reload
systemctl start focalboard
systemctl enable focalboard
systemctl status focalboard
ss -antpl | grep focalboard
apt-get install nginx -y
nano /etc/nginx/conf.d/focalboard.conf

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

server {
listen 80;

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;
}
}

nginx -t
systemctl restart nginx
systemctl status nginx