Skip to main content
Skip table of contents

Installation - Linux

Required package

Update the Ubuntu repository and install common packages:

CODE
$ sudo apt-get update
$ sudo apt-get install curl
$ sudo apt-get install git
$ sudo apt-get install unzip
$ sudo apt-get install mbstring

Install PHP7.4

It’s crucial to install 7.4, not 8.x

CODE
$ sudo add-apt-repository ppa:ondrej/php  
$ sudo apt-get update
$ sudo apt-get install php7.4
$ sudo apt-get install php7.4-fpm php7.4-pgsql php7.4-curl php7.4-cli php7.4-mbstring php7.4-xml

Make sure that curl, pgsql and pdo_pgsql extensions are installed

CODE
$ php -m

In case of any problems, try to remove php-common and repeat the installation of modules

$ sudo apt-get --purge remove php-common

Install composer

CODE
$ sudo php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
$ sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer

Install postgres

CODE
$ sudo apt-get install postgresql

Configuring the database

CODE
$ sudo -u postgres psql -c "create database webclient;"
$ sudo -u postgres psql -c "create user webclient;"
$ sudo -u postgres psql -c "alter user webclient with encrypted password 'webclient';"
$ sudo -u postgres psql -c "grant all privileges on database webclient to webclient;"

For Postgres 15 and newer here are additional steps:

CODE
GRANT ALL PRIVILEGES ON DATABASE webclient TO webclient;
\c webclient postgres
# You are now connected to database "webclient" as user "postgres".
GRANT ALL ON SCHEMA public TO webclient;

Install nginx

CODE
$ sudo apt-get install nginx

Make sure you have the following in your ngnix.conf file

CODE
index index.php index.html index.htm

location / {

        set $a "";
        if ($uri = "/") {
                set $a 1;
        }
        if (-f /var/www/html/init/index.php) {
                set $a 1$a;
        }
        if (!-f /var/www/html/api/conf.d/config.php) {
                set $a 1$a;
        }
        if ($a = 111) {
                rewrite ^(.*)$ /init/index.php last;
        }
        # First attempt to serve request as file, then
        # as directory, then fall back to displaying a 404.
        try_files $uri $uri/ =404;
}

location = /api/conf.d/admin_channel.json {
		deny all;
		return 404;
	}

location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/run/php/php7.4-fpm.sock;
  }

Disable apache

CODE
$ sudo systemctl stop apache2
$ sudo systemctl disable apache2

Restart ngnix

CODE
$ sudo systemctl restart nginx

Copy and prepare the code

Clone the Web Client package from GitHub to /var/www/html

Go to /api folder and run composer

CODE
$ sudo composer install

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.