You are browsing upcoming documentation for version 6.1 of OroCommerce, scheduled for release in 2025. Read the documentation for version 6.0 (the latest LTS version) to get up-to-date information.

See our Release Process documentation for more information on the currently supported and upcoming releases.


Regular Connection Configuration (Not Secure/WS) 

Set DSN string based connection options for the WebSocket server in the corresponding environment variables.


Since the WebSocket server is running as a service, there are three DSN string based configuration: - ‘websocket_server_dsn’ specifies port and address(DSN’s host plus URI parts) to which WebSocket server binds on startup and waits for incoming requests. “” host means that it listens to all addresses on the machine. - ‘websocket_frontend_dsn’ specifies port and address(DSN’s host plus URI parts) to which the browser should connect (JS). “*” host value means that it connects to the host specified in the browser. - ‘websocket_backend_dsn’ DSN string specifies protocol(DSN’s scheme part), port and address(DSN’s host plus URI parts) to which the application should connect (PHP).

Secure Connection Configuration (SSL/WSS) 

To achieve a WSS connection for your WebSocket communication in the frontend, configure additional reverse proxy before the WebSocket server. See an example of the configuration below.

Set WebSocket settings in corresponding environment variables.


If you want to make backend work under secure connection as well, change the corresponding DSN in the next way:


If you use untrusted SSL certificate, use the following DSN:



Remember that having peer verification disabled is not recommended in production.

NGINX server configuration:

server {
    # This is your regular configuration for SSL connections to website
    listen 443 ssl;

    ssl_certificate_key /etc/ssl/private/;
    ssl_certificate /etc/ssl/private/;
    ssl_protocols TLSv1.2;

    # ...
    # ... Other website instructions here ...
    # ...

    # You need to add additional "location" section for Websockets requests handling
    location /ws {
        # redirect all traffic to localhost:8080;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-NginX-Proxy true;
        proxy_set_header X-Forwarded-Proto $scheme;

        proxy_redirect off;
        proxy_read_timeout 86400;

        # enables WS support
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";

        # prevents 502 bad gateway error
        proxy_buffers 8 32k;
        proxy_buffer_size 64k;

        reset_timedout_connection on;

        error_log /var/log/nginx/oro_wss_error.log;
        access_log /var/log/nginx/oro_wss_access.log;

    # ...

    error_log /var/log/nginx/oro_https_error.log;
    access_log /var/log/nginx/oro_https_access.log;