### Download and Install Focalboard Server Source: https://www.focalboard.com/docs/personal-edition/ubuntu Download the Focalboard server archive and move it to the /opt directory. Ensure you use the latest version available in the GitHub releases. ```bash wget https://github.com/mattermost/focalboard/releases/download/v0.15.0/focalboard-server-linux-amd64.tar.gz tar -xvzf focalboard-server-linux-amd64.tar.gz sudo mv focalboard /opt ``` -------------------------------- ### Install NGINX Web Server Source: https://www.focalboard.com/docs/personal-edition/ubuntu Install NGINX on Ubuntu to act as a reverse proxy for the Focalboard server. This is recommended for handling HTTP and WebSocket requests. ```bash sudo apt update sudo apt install nginx ``` -------------------------------- ### Install MySQL Server Source: https://www.focalboard.com/docs/personal-edition/ubuntu Installs the MySQL server package on Debian/Ubuntu systems. This is a prerequisite for using MySQL as the Focalboard database. ```bash sudo apt-get install mysql-server ``` -------------------------------- ### Install PostgreSQL Database Source: https://www.focalboard.com/docs/personal-edition/ubuntu Install PostgreSQL and its contrib package on Ubuntu. This is recommended for production environments instead of the default SQLite database. ```bash sudo apt install postgresql postgresql-contrib ``` -------------------------------- ### Upgrade Focalboard Personal Server Source: https://www.focalboard.com/docs/personal-edition/ubuntu-upgrade Follow these commands to download, install, and configure the new version of Focalboard Personal Server. Ensure you back up your existing configuration and data before proceeding. ```bash # Download the new version (e.g. 0.9.2 here, check the release for the latest one) wget https://github.com/mattermost/focalboard/releases/download/v0.9.2/focalboard-server-linux-amd64.tar.gz tar -xvzf focalboard-server-linux-amd64.tar.gz # Stop the server sudo systemctl stop focalboard.service # Back up the old version sudo mv /opt/focalboard /opt/focalboard-old sudo mv focalboard /opt # Copy config and move uploaded files over sudo mv /opt/focalboard-old/files /opt/focalboard sudo cp /opt/focalboard-old/config.json /opt/focalboard # Start the server sudo systemctl start focalboard.service # (Optional) delete the backup after verifying sudo rm -rf /opt/focalboard-old ``` -------------------------------- ### Manage Focalboard Systemd Service Source: https://www.focalboard.com/docs/personal-edition/ubuntu Reloads systemd to recognize the new service, starts the Focalboard service, and enables it to start automatically on system boot. ```bash sudo systemctl daemon-reload sudo systemctl start focalboard.service sudo systemctl enable focalboard.service ``` -------------------------------- ### Configure MySQL Database Connection Source: https://www.focalboard.com/docs/personal-edition/ubuntu Sets the database type to MySQL and provides the connection string. Ensure the username, password, host, port, and database name match your MySQL setup. ```json "dbtype": "mysql", "dbconfig": "boardsuser:boardsuser-password@tcp(127.0.0.1:3306)/boards" ``` -------------------------------- ### Configure Focalboard to Use PostgreSQL Source: https://www.focalboard.com/docs/personal-edition/ubuntu Edit the Focalboard config.json file to specify the PostgreSQL database type and connection string. Ensure the user, password, and database name match your PostgreSQL setup. ```json "dbtype": "postgres", "dbconfig": "postgres://boardsuser:boardsuser-password@localhost/boards?sslmode=disable&connect_timeout=10" ``` -------------------------------- ### Create MySQL Database and User Source: https://www.focalboard.com/docs/personal-edition/ubuntu Creates a new database named 'boards' and a user 'boardsuser' with all privileges on this database. Remember to replace 'boardsuser-password' with a strong password. ```sql CREATE DATABASE boards; GRANT ALL on boards.* to 'boardsuser'@'localhost' identified by 'boardsuser-password'; ``` -------------------------------- ### Enable Focalboard NGINX Site and Reload Source: https://www.focalboard.com/docs/personal-edition/ubuntu Enable the Focalboard NGINX site configuration, test the configuration syntax, and reload NGINX to apply the changes. ```bash sudo ln -s /etc/nginx/sites-available/focalboard /etc/nginx/sites-enabled/focalboard sudo nginx -t sudo /etc/init.d/nginx reload ``` -------------------------------- ### Run Focalboard Personal Server with Docker Source: https://www.focalboard.com/docs/personal-edition/docker Use this command to download and run the latest version of Focalboard Personal Server. Access it via http://localhost. ```bash docker run -it -p 80:8000 mattermost/focalboard ``` -------------------------------- ### Create PostgreSQL Database and User Source: https://www.focalboard.com/docs/personal-edition/ubuntu Log in as the postgres user, create a new database named 'boards', and create a user with a password for accessing this database. Remember to replace placeholder credentials. ```bash sudo --login --user postgres psql CREATE DATABASE boards; CREATE USER boardsuser WITH PASSWORD 'boardsuser-password'; \q exit ``` -------------------------------- ### Create Focalboard Systemd Service File Source: https://www.focalboard.com/docs/personal-edition/ubuntu Creates a new systemd service configuration file for Focalboard. This allows Focalboard to run as a background service. ```bash sudo nano /lib/systemd/system/focalboard.service ``` -------------------------------- ### Edit Focalboard Configuration Source: https://www.focalboard.com/docs/personal-edition/ubuntu Opens the Focalboard configuration file in the nano editor. This is where database connection details are specified. ```bash nano /opt/focalboard/config.json ``` -------------------------------- ### Create NGINX Site Configuration for Focalboard Source: https://www.focalboard.com/docs/personal-edition/ubuntu Create a new NGINX configuration file for Focalboard. This file will define how NGINX proxies requests to the Focalboard server running on port 8000. ```bash sudo nano /etc/nginx/sites-available/focalboard ``` -------------------------------- ### Log in to MySQL Source: https://www.focalboard.com/docs/personal-edition/ubuntu Accesses the MySQL command-line interface as the root user. This is needed to create databases and users. ```bash sudo mysql ``` -------------------------------- ### Test Focalboard Server Locally Source: https://www.focalboard.com/docs/personal-edition/ubuntu Checks if the Focalboard server is running on the default port 8000 and if NGINX is proxying requests correctly. Both commands should return similar HTML output. ```bash curl localhost:8000 curl localhost ``` -------------------------------- ### Run Focalboard Personal Server on a Specific Port with Docker Source: https://www.focalboard.com/docs/personal-edition/docker This command allows you to run Focalboard Personal Server and specify a custom port number for access. ```bash docker run -it -p :8000 mattermost/focalboard ``` -------------------------------- ### Focalboard Systemd Service Configuration Source: https://www.focalboard.com/docs/personal-edition/ubuntu Defines the Focalboard service unit for systemd. It specifies the description, execution command, working directory, and restart behavior. ```ini [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 ``` -------------------------------- ### Exit MySQL Prompt Source: https://www.focalboard.com/docs/personal-edition/ubuntu Exits the MySQL command-line interface. ```bash exit ``` -------------------------------- ### NGINX Configuration for Focalboard Proxy Source: https://www.focalboard.com/docs/personal-edition/ubuntu This NGINX configuration sets up upstream for the Focalboard server and defines locations for handling standard HTTP requests and WebSocket connections, including necessary proxy headers and timeouts. ```nginx upstream focalboard { server localhost:8000; keepalive 32; } server { listen 80 default_server; 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; } } ``` -------------------------------- ### Remove Default NGINX Site Source: https://www.focalboard.com/docs/personal-edition/ubuntu If a default NGINX site is enabled, remove it to avoid conflicts with the Focalboard configuration. ```bash sudo rm /etc/nginx/sites-enabled/default ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.