Nginx proxies query to push service of selected type. Message getting queries (for example, sub) are public and proxied from standard ports 80/443. Publication queries (pub) are available only from internal server address.
Nodejs processes are split into two types:
Processes responsible for connecting user to selected channel and message reception. Listen to ports: 8010-8015;
Processes responsible for sending message to channel. Listen to ports: 9010-9011.
To start Push-server we need:
nodejs & npm ;
service and its modules archive.
For installation we require Python or a make utility:
dnf install python3 make -y
Execute the following actions:
Download and install archive push-server-0.3.0.tgz:
su -
cd /opt
wget https://repo.bitrix.info/vm/push-server-0.3.0.tgz
npm install --production ./push-server-0.3.0.tgz
Edit config file /etc/sysconfig/push-server-multi. The following parameters must be corrected/added:
SECURITY_KEY - secret key for connection signature between customers and push server;
Note: Key length doesn't matter. The key can use only Latin letter and numbers, special characters are prohibited. But, be advised, that a too short of a key is unsafe. It can be generated as follows:
Go to push module config (site settings) and enable local push server (latest version).
Additionally, indicate SECURITY_KEY parameter, configured previously above in the file /etc/sysconfig/push-server-multi.