Focalboard is a powerful, open-source, and self-hosted project management tool designed to help developers track and manage work across teams. With its multilingual capabilities and kanban-based interface, Focalboard offers a flexible alternative to popular project management platforms like Asana, Trello, and Notion. Whether you’re a solo developer or part of a large team, Focalboard can help you stay organized, collaborate effectively, and achieve your project goals.
In this comprehensive guide, we will walk you through the step-by-step process of installing Focalboard on your Ubuntu 22.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!
Prerequisites
Before we begin, make sure you have the following prerequisites in place:
- A server running Ubuntu 22.04.
- A valid domain name pointed to your server’s IP address.
- A root password configured on your server.
Step 1: Install and Configure PostgreSQL
Focalboard relies on PostgreSQL as its database server. If you don’t have PostgreSQL installed on your system, you can install it using the following commands:
sudo apt-get update sudo apt-get install postgresql postgresql-contrib -y
Once PostgreSQL is installed, you need to connect to the PostgreSQL server and create a database and user for Focalboard. Use the following commands to connect to PostgreSQL and create the necessary entities:
sudo su - postgres
psql
Inside the PostgreSQL shell, run the following commands to create a database and user:
CREATE DATABASE focaldb; CREATE USER focaluser WITH PASSWORD 'password';
Replace 'password'
with a strong password of your choice. After creating the database and user, exit the PostgreSQL shell by typing q
.
Step 2: Install and Configure Focalboard
Now that PostgreSQL is set up, we can proceed with installing and configuring Focalboard. Follow the steps below:
- Visit theFocalboard GitHub download page and download the latest version of Focalboard. You can use the following command to download the latest release:
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
- Once the download is complete, extract the downloaded file using the following command:
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
- Next, open the Focalboard configuration file for editing:
sudo nano /opt/focalboard/config.json
- In the configuration file, locate the following lines and update them with the appropriate values:
"dbtype": "postgres", "dbconfig": "postgres://focaluser:password@localhost/focaldb?sslmode=disable&connect_timeout=10",
Replace focaluser
with the PostgreSQL username you created earlier, and replace password
with the corresponding password. Save the changes and exit the text editor.
Step 3: Create a Systemd Service File for Focalboard
To ensure seamless management of Focalboard, it’s recommended to use systemd to start and control the Focalboard service. Let’s create a systemd service file for Focalboard:
- Open the service file for editing:
sudo nano /lib/systemd/system/focalboard.service
- Add the following lines to the service file:
[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
Save the changes and exit the text editor.
- Reload the systemd daemon to apply the changes:
sudo systemctl daemon-reload
- Start the Focalboard service and enable it to start at boot:
sudo systemctl start focalboard sudo systemctl enable focalboard
- Verify the status of the Focalboard service:
sudo systemctl status focalboard
If everything is set up correctly, you should see the status as active (running)
.
Step 4: Configure Nginx as a Reverse Proxy
To provide secure access to Focalboard over the internet, we’ll use Nginx as a reverse proxy. Let’s install and configure Nginx:
- Install Nginx using the following command:
sudo apt-get install nginx -y
- Once Nginx is installed, create a virtual host configuration file for Focalboard:
sudo nano /etc/nginx/conf.d/focalboard.conf
- Add the following configuration to the file:
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; } }
- Verify the Nginx configuration for any syntax errors:
sudo nginx -t
If the configuration is valid, you should see nginx: configuration file /etc/nginx/nginx.conf test is successful
.
- Restart Nginx to apply the configuration changes:
sudo systemctl restart nginx
- Check the status of Nginx:
sudo systemctl status nginx
If everything is set up correctly, you should see the status as active (running)
.
Step 5: Access the Focalboard Web Interface
Now that Focalboard and Nginx are configured, you can access the Focalboard web interface using your domain name. Follow the steps below:
- Open your web browser and enter the URL
http://focalboard.example.com/login
(replacefocalboard.example.com
with your actual domain name). - You will be redirected to the Focalboard login page. Click on the “Create an account” button.
- Fill in the required details, including your email address, admin username, and password. Click on the “Register” button to create your Focalboard account.
- After successful registration, you will be redirected to the Focalboard dashboard. From here, you can start managing and tracking your projects.
Step 6: Enable SSL on Focalboard
To ensure the security of your Focalboard installation, it’s recommended to enable SSL using Let’s Encrypt. Follow the steps below to install and configure SSL on Focalboard:
- Install the Certbot client package:
sudo apt-get install python3-certbot-nginx -y
- Once the installation is complete, run the following command to obtain and install the Let’s Encrypt SSL certificate:
sudo certbot --nginx -d focalboard.example.com
Replace focalboard.example.com
with your actual domain name.
- Follow the prompts to enter a valid email address and agree to the terms of service.
- Choose whether or not to redirect HTTP traffic to HTTPS. Select option 2 to redirect all traffic to HTTPS.
- Let’s Encrypt will automatically handle the certificate installation and configuration for you.
Congratulations! You have successfully installed and configured Focalboard on your Ubuntu 22.04 server with Nginx as a reverse proxy. You can now securely access Focalboard using your domain name and start managing your projects efficiently.
Shape.host offers reliable and scalable Cloud VPS hosting solutions to power your Focalboard installation. Experience the benefits of high-performance cloud infrastructure and exceptional customer support. Visit Shape.host to explore our hosting services and start your cloud journey today.