Introduction
This tutorial explains how to install Focalboard Personal Server with Docker on Ubuntu 20.04. It also describes how to secure your Focalboard installation with an Nginx reverse proxy and a Let's Encrypt SSL certificate to secure your server. Focalboard is a free, open-source alternative to Trello, Asana, and Notion, which helps you organize, track, and manage your work and projects.
Prerequisites
Before you begin, you should:
- Deploy an Ubuntu 20.04 server.
- Update the server.
- Create a non-root user with sudo privileges.
- Log in to your server as a non-root user.
- Make sure port 433 is open on your Rcs firewall and ufw.
- A domain name that points to your server.
Installation
Install Nginx using
apt
.$ sudo apt install nginx
Ensure that any
apt
versions of Certbot are uninstalled, as well as old versions of Docker. It is okay ifapt
reports that none of these packages are installed.$ sudo apt remove certbot docker docker.io containerd runc
Ensure that your version of Snap is up to date.
$ sudo snap install core; sudo snap refresh core
Install Certbot with Snap.
$ sudo snap install --classic certbot
Run Certbot and follow the prompts to enter your domain name and redirect all traffic to HTTPS.
$ sudo certbot certonly --standalone
Take note of your certificate and private key paths when provided. It may be different depending on the domain used.
Certificate Path: /etc/letsencrypt/live/example.com/fullchain.pem Private Key Path: /etc/letsencrypt/live/example.com/privkey.pem
If you used a different SSL provider, ensure the certificate and private key files are stored somewhere on your system and that you know the full path to them.
Install Docker with Snap.
$ sudo snap install docker
Create a new folder and change to it.
$ mkdir focalboard $ cd focalboard
Create a new Docker compose file.
$ nano docker-compose.yml
Add the following lines to the file.
version: '3.8' services: focalboard: ports: - '8000:8000' restart: always image: mattermost/focalboard
Exit the file using Control + X, then press Y, followed by Enter.
Run Focalboard by using
docker-compose
in detached mode. This may take a few seconds.$ sudo docker-compose up -d
Check that Focalboard is running by using
docker
. The status should beUp
.$ sudo docker ps STATUS Up x seconds/minutes
You have now successfully installed Focalboard and have obtained a signed SSL certificate.
Secure Focalboard with an Nginx Reverse Proxy
You can now use your SSL certificate and Nginx to secure your Focalboard installation. Make sure to replace example.com
with your chosen domain name or IP address.
Remove the Nginx default configuration file.
$ sudo rm /etc/nginx/sites-enabled/default
Create and open the new configuration file in Nginx's
sites-available
directory in your text editor.$ sudo nano /etc/nginx/sites-available/focalboard
Paste the following into the file and replace
example.com
with your domain name or IP address. Ensure that thessl_certificate
andssl_certificate_key
lines point to your SSL certificate.upstream focalboard { server localhost:8000; } server { listen 443 ssl http2; server_name example.com; gzip on; ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; ssl_session_cache builtin:1000 shared:SSL:10m; ssl_session_cache shared:MySSL:10m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4; ssl_prefer_server_ciphers on; 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_pass http://focalboard; } }
Exit your text editor and save changes by pressing Control + X, then Y, followed by Enter.
Create a link to the new configuration file in Nginx's
sites-enabled
directory.$ sudo ln -s /etc/nginx/sites-available/focalboard /etc/nginx/sites-enabled/focalboard.conf
Test the configuration file. If the test is successful, you will see the success messages.
$ sudo nginx -t nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
Reload Nginx to apply your changes.
$ sudo /etc/init.d/nginx reload
Finishing Steps
You should now navigate to your Focalboard installation and create an account.
https://example.com
After you log in, you can create a new board by clicking the + Add board button in the bottom left corner.
This completes the Focalboard installation with an SSL certificate and Nginx reverse proxy.