Skip to content

Install RBT: RBT server

This is the main RBT application installation step. It places the server code under /opt/rbt, installs application dependencies and prepares the configuration consumed by the system services.

This page is one step in the complete RBT installation guide.

Before you start

  • Complete the operating-system, Node.js and database steps first.
  • Prepare production hostnames, database credentials and service secrets.
  • Keep environment-specific configuration outside source-control history.

Expected result

The RBT application tree and dependencies should be present, and its configuration should reference the databases and hostnames for this deployment.

Verify this step

test -d /opt/rbt/server
test -d /opt/rbt/install

Install app

use justfile or manual installation


Manual

Get app

git clone https://github.com/rosteleset/rbt /opt/rbt
cd /opt/rbt
git -c advice.detachedHead=false checkout `curl -s https://api.github.com/repos/rosteleset/SmartYard-Server/releases/latest | jq -r ".tag_name"`
curl -s https://api.github.com/repos/rosteleset/SmartYard-Server/releases/latest | jq -r ".tag_name" > version
ln -sf /opt/rbt/version /opt/rbt/client/version.app

restart pgbouncer service

systemctl restart pgbouncer.service

restart the clickhouse-server service

systemctl restart clickhouse-server.service

install server dependencies

cd /opt/rbt/server
composer install

download client libs

cd /opt/rbt/client/lib
git clone --branch v3.2.0 https://github.com/ColorlibHQ/AdminLTE
git clone https://github.com/davidshimjs/qrcodejs
git clone https://github.com/ajaxorg/ace-builds/
git clone --branch v1.9.2 https://github.com/Leaflet/Leaflet
cd Leaflet
npm install
npm run build

create client config

cp /opt/rbt/client/config/config.sample.json5 /opt/rbt/client/config/config.json

create server config

cp /opt/rbt/server/config/config.sample.json5 /opt/rbt/server/config/config.json

after copying client and server configs, MODIFY it to your realms

after modifying SERVER config, strip it (to convert from json5 to pure json)

php /opt/rbt/server/cli.php --strip-config

initialize db

php /opt/rbt/server/cli.php --init-db
php /opt/rbt/server/cli.php --init-clickhouse-db
php /opt/rbt/server/cli.php --admin-password=<your very secret admin password>
php /opt/rbt/server/cli.php --reindex
php /opt/rbt/server/cli.php --install-crontabs

The metadata.type,filename GridFS index is recommended for efficient loading of TT workflows, filters, viewers, and print templates. Standard GridFS indexes do not cover application-specific metadata.* fields:

php /opt/rbt/server/cli.php files --create-index=metadata.type,filename

justfile

justfile installation (experimental)

Ubuntu 24.04 does not ship just in apt. Install once:

curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin
git clone https://github.com/rosteleset/rbt /opt/rbt && cd /opt/rbt
export RBT_HOST=<your public hostname or IP>
export RBT_ADMIN_PASSWORD=<your very secret admin password>
just all

just all gets the app into /opt/rbt (clone if missing, checkout latest release, write version), restarts pgbouncer/clickhouse/nginx, installs PHP and client libs, generates configs from samples (example.com / SIP / NTP / syslog → RBT_HOST, drops unused db.schema), strips server config, initializes databases and creates the GridFS index.

Optionally review generated configs afterwards:

/opt/rbt/server/config/config.json
/opt/rbt/client/config/config.json

If you change the server config, strip it again:

just strip-config

List recipes with just --list.

Next