Setting up Bitrix Push & Pull server
Push & Pull is a Bitrix technology for real-time notifications: new chat messages, task updates, order notifications. Works via WebSocket or Long Polling. Without Push & Pull, Bitrix24 out of the box and live notifications in an online store (order status change) don't work.
Push & Pull architecture
Push server — separate Node.js process that holds WebSocket connections with user browsers. PHP backend sends messages to Push server via HTTP, Push server broadcasts them to connected clients.
Components:
- nodejs — runs Push server
-
push.sendermodule in Bitrix — PHP API for sending messages -
pullmodule — client part, browser subscription
Installing Node.js
# Via NodeSource (LTS recommended)
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt-get install -y nodejs
# Check
node --version # v20.x.x
npm --version
Installing Bitrix Push server
Push server is distributed via npm:
npm install -g bitrix-push-server
Or download manually from marketplace.1c-bitrix.ru — package bitrix.push-server.
Launch:
bitrix-push-server --config /etc/bitrix/push-server.json
Example config /etc/bitrix/push-server.json:
{
"security": {
"key": "SECRET_KEY_HERE"
},
"server": {
"port": 8893,
"hostname": "0.0.0.0"
},
"serverHTTPS": {
"port": 8894,
"hostname": "0.0.0.0",
"key": "/etc/ssl/private/site.key",
"cert": "/etc/ssl/certs/site.crt"
},
"log": {
"level": "info",
"file": "/var/log/bitrix-push-server.log"
}
}
SECRET_KEY_HERE — any long random string. Same key is set in Bitrix Push module settings.
Nginx configuration for proxying
Push server listens on port 8893 (HTTP) and 8894 (HTTPS). Nginx proxies WebSocket connections:
location /bitrix/subws/ {
proxy_pass http://127.0.0.1:8893/bitrix/subws/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_read_timeout 3600;
proxy_send_timeout 3600;
}
location /bitrix/sub/ {
proxy_pass http://127.0.0.1:8893/bitrix/sub/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_read_timeout 3600;
}
location /bitrix/rest/ {
proxy_pass http://127.0.0.1:8893/bitrix/rest/;
proxy_set_header Host $host;
}
Configuring module in Bitrix
Settings → Product Settings → Module Settings → Push and Pull:
-
Public path —
https://yoursite.ru/bitrix/ -
Private path —
http://127.0.0.1:8893/bitrix/(for PHP backend) -
Signature key — same
SECRET_KEY_HERE
After saving, check: go to Bitrix24 or notification section — in DevTools → Network WebSocket connections to /bitrix/subws/ should appear.
Auto-start via systemd
# /etc/systemd/system/bitrix-push.service
[Unit]
Description=Bitrix Push Server
After=network.target
[Service]
Type=simple
User=www-data
ExecStart=/usr/bin/bitrix-push-server --config /etc/bitrix/push-server.json
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
systemctl enable bitrix-push
systemctl start bitrix-push
systemctl status bitrix-push







