NetBeez Agents can connect to the NetBeez server's communication service (nb-commsrv) using either a standard TCP/TLS socket (port 20018) or a Secure WebSocket connection over HTTPS (port 443 at wss://<your-netbeez-hostname>/agent/ws). WebSocket transport is helpful in restrictive firewall or proxy environments that block outbound traffic on non-standard TCP ports.
In this article:
How Agent WebSocket Connectivity Works
Port 443 Reverse Proxy: When WebSockets are enabled on the server,
nb-nginxterminates TLS on TCP port443at/agent/wsand upgrades the connection tonb-commsrv(internal port4443). See Network Firewall Settings for complete port requirements.Full TCP/TLS Compatibility & Automatic Fallback: Standard TCP/TLS socket connections (port
20018) remain enabled and supported alongside WebSockets—no immediate change is required on existing agents. If an agent cannot establish a WebSocket connection, it automatically falls back to a TCP/TLS socket connection (see Agent Doesn't Connect to the Dashboard).
Offline Test Result Caching Limitation
WebSocket connections use a stateless JSON framing protocol that does not cache continuous test results locally on the agent if the agent loses connectivity to the NetBeez server. If your deployment requires agents to buffer test metrics locally while unreachable and flush them upon reconnection, keep agents on the default TCP/TLS socket connection (port 20018).
Enabling WebSockets on Self-Hosted NextGen Servers
By default, NetBeez NextGen ships with agent WebSockets disabled (WEBSOCKET_DISABLED=true in app_data/env_files/nb-commsrv.env). On a self-hosted server where you have root SSH access, enable WebSockets in the persistent user_data override directory so your setting survives NetBeez Software Updates:
SSH into your NetBeez server and edit (or create)
/opt/netbeez/user_data/env_files/nb-commsrv.envasroot, setting:WEBSOCKET_DISABLED=false
Note: Do not edit
/opt/netbeez/app_data/env_files/nb-commsrv.envdirectly, asapp_datais replaced during server upgrades.Recreate the
commsrvservice container (nb-commsrv) so the override takes effect:/opt/netbeez/app_data/bin/nb-docker-compose up -d --force-recreate --no-deps commsrv
Verify that each
nb-commsrvworker process initialized its WebSocket listener by checking the container logs:docker logs nb-commsrv
Confirm that the worker startup output logs
New Websocket server: true(rather thanWebsocket server: DISABLED).
NetBeez Cloud-Hosted Servers
If your NetBeez NextGen server is cloud-hosted by NetBeez and you do not have root OS access, open Help & Support in the primary navigation or email support@netbeez.net to request enabling agent WebSockets on your instance.
