Install Restyaboard, an Open Source Kanban board. I am using it daily to manage this blog.

This blog post is outdated. Install Restyaboard 0.6.8 on Debian Buster.



Update package index.

$ sudo apt-get update

Upgrade installed packages.

$ sudo apt-get upgrade

Install basic utilities.

$ sudo apt-get install unzip wget git

Install the PostgreSQL server.

$ sudo apt-get install postgresql

Create the user and password for the Restyaboard application.

$ sudo -u postgres psql -c "CREATE ROLE restyaboard WITH LOGIN PASSWORD 'restyaboard'"

Create database.

$ sudo -u postgres createdb -O restyaboard -E UTF8 restyaboard

Configure database authentication for the created user.

$ cat << EOF | sudo tee -a /etc/postgresql/9.6/main/pg_hba.conf 
# restyaboard
host    restyaboard      restyaboard          md5

Reload PostgreSQL server configuration.

$ sudo -u postgres psql -c "SELECT pg_reload_conf()"

Install nginx web server.

$ sudo apt-get install nginx-full

Install PHP Fast Process Manager with additional modules.

$ sudo apt-get install php-fpm php-pgsql php-curl php-imagick php-mbstring php-xml

Specify the default PHP timezone.

$ sudo sed -i -e "s/^;date.timezone =/date.timezone = Europe\/Warsaw/"  /etc/php/7.0/fpm/php.ini

Reload PHP Fast Process Manager.

$ sudo systemctl reload php7.0-fpm

Create a directory to store the SSL certificate.

$ sudo mkdir /etc/nginx/ssl

Create a single-domain SSL certificate.

$ sudo openssl req -subj "/" -x509 -nodes -days 730 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt

Create Nginx site configuration. It is the default configuration located in a project repository.

$ sudo cat << EOF | sudo tee /etc/nginx/sites-available/restyaboard
server {
        #listen 80 default_server;
        listen 443 ssl;

        ssl_certificate ssl/nginx.crt;
        ssl_certificate_key ssl/nginx.key;

        server_name _;

        root /var/www/html;
        index  index.html index.php;

        gzip on;
        gzip_disable "msie6";

        gzip_comp_level 6;
        # gzip_comp_level 9;
        gzip_min_length  1100;
        gzip_buffers 16 8k;
        gzip_proxied any;
        # gzip_http_version 1.1;
        gzip_types       text/plain application/xml text/css text/js text/xml application/x-javascript text/javascript application/json application/xml+rss;

        client_max_body_size 300M;

        rewrite ^/oauth/authorize$ /server/php/authorize.php last;
        rewrite ^/oauth_callback/([a-zA-Z0-9_\.]*)/([a-zA-Z0-9_\.]*)\$ /server/php/oauth_callback.php?plugin=\$1&code=\$2 last;
        rewrite ^/download/([0-9]*)/([a-zA-Z0-9_\.]*)\$ /server/php/download.php?id=\$1&hash=\$2 last;
        rewrite ^/ical/([0-9]*)/([0-9]*)/([a-z0-9]*).ics\$ /server/php/ical.php?board_id=\$1&user_id=\$2&hash=\$3 last;
        rewrite ^/api/(.*)$ /server/php/R/r.php?_url=\$1&\$args last;
        rewrite ^/api_explorer/api-docs/$ /client/api_explorer/api-docs/index.php last;

        location / {
                root /var/www/html/client;

        location ~ \.php\$ {
                try_files \$uri =404;
                include fastcgi_params;
                fastcgi_pass    unix:/run/php/php7.0-fpm.sock;
                fastcgi_index   index.php;
                fastcgi_param   SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
                fastcgi_param   PHP_VALUE "upload_max_filesize=80M \n post_max_size=120M \n max_execution_time=200 \n max_input_time=200 \n memory_limit=256M";

        location ~* \.(css|js|less|html|ttf|woff|jpg|jpeg|gif|png|bmp|ico) {
                root /var/www/html/client;
                if (-f \$request_filename) {
                rewrite ^/img/([a-zA-Z_]*)/([a-zA-Z_]*)/([a-zA-Z0-9_\.]*)\$ /server/php/image.php?size=\$1&model=\$2&filename=\$3 last;
                add_header        Cache-Control public;
                add_header        Cache-Control must-revalidate;
                expires           7d;


Disable default Nginx site.

$ sudo unlink /etc/nginx/sites-enabled/default

Enable configured site.

$ sudo ln -s /etc/nginx/sites-available/restyaboard /etc/nginx/sites-enabled/

Reload Nginx configuration.

$ sudo systemctl reload nginx

Remove the default index file.

$ sudo rm /var/www/html/index.nginx-debian.html

Download recent Restyaboard release.

$ wget

Extract application to the /var/www/html/ directory.

$ sudo unzip -d /var/www/html/

Change user and group to www-data:www-data.

$ sudo chown -R www-data:www-data /var/www/html

Configure database access.

$ sudo sed -i -e "/^define('R_DB_HOST'/c\define('R_DB_HOST', 'localhost');" /var/www/html/server/php/
$ sudo sed -i -e "/^define('R_DB_USER'/c\define('R_DB_USER', 'restyaboard');" /var/www/html/server/php/
$ sudo sed -i -e "/^define('R_DB_PASSWORD'/c\define('R_DB_PASSWORD', 'restyaboard');" /var/www/html/server/php/
$ sudo sed -i -e "/^define('R_DB_NAME'/c\define('R_DB_NAME', 'restyaboard');" /var/www/html/server/php/
$ sudo sed -i -e "/^define('R_DB_PORT'/c\define('R_DB_PORT', 5432);" /var/www/html/server/php/

Load database schema.

$ sudo cat restyaboard/var/www/html/sql/restyaboard_with_empty_data.sql | psql restyaboard --username=restyaboard --password --host=localhost

Get basic board applications.

$ sudo git clone /var/www/html/client/apps

Remove .git directory. Alternatively, you can deny access to this directory using Nginx.

$ sudo rm -rf /var/www/html/client/apps/.git

Fix permissions for additional applications.

$ sudo chown -R www-data:www-data /var/www/html/client/apps

The Restyaboard installation process does not require any particular actions. The official installer performs too many operations, so I decided to describe it using the simplest possible way. Just remember to change passwords.

Additional information

Restyaboard » Install & Configure

Restyaboard » Apps