Update Server:
apt update && apt upgrade -y
Install Focalboard:
sudo apt install wget
VER=$(curl -s https://api.github.com/repos/mattermo...|grep tag_name | cut -d '"' -f 4)
wget https://github.com/mattermost/focalbo...{VER}/focalboard-server-linux-amd64.tar.gz
tar -xvzf focalboard-server-linux-amd64.tar.gz
sudo mv focalboard /opt
Install and Configure NGINX:
sudo apt update
sudo apt install nginx
sudo vi /etc/nginx/sites-available/focalboard
paste
------
upstream focalboard {
server localhost:8000;
keepalive 32;
}
server {
listen 80 default_server;
server_name server _ip;
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;
}
}
--------------
Remove the default Nginx site:
sudo rm /etc/nginx/sites-enabled/default
Enable the site:
sudo ln -s /etc/nginx/sites-available/focalboard /etc/nginx/sites-enabled/focalboard
sudo nginx -t
sudo systemctl restart nginx
Install PostgreSQL:
sudo apt install postgresql postgresql-contrib
sudo --login --user postgres
psql
CREATE DATABASE boards;
CREATE USER boardsuser WITH PASSWORD 'Passw0rd';
\q
exit
Configure Focalboard to use the database:
vi /opt/focalboard/config.json
update
"dbtype": "postgres",
"dbconfig": "postgres://boardsuser:Passw0rd@localhost/boards?sslmode=disable&connect_timeout=10",
Manage the Focalboard Service:
sudo vi /lib/systemd/system/focalboard.service
paste
------------
[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
----------
sudo systemctl daemon-reload
sudo systemctl start focalboard.service
sudo systemctl enable focalboard.service
systemctl status focalboard.service
Access the Focalboard Web UI:
http://server _ip