Sngine supports real-time chat through Socket.io.
You can run the chat server in two modes:
- Proxied (Recommended) β works on standard HTTPS port (443), no SSL cert needed inside Sngine.
- Not Proxied β works directly on a custom port (e.g., 3000), requires SSL cert & key paths.
π Step 1 β Enable Socket.io
- Go to Admin Panel β Settings β Chat β Socket.io.
- Turn Chat Socket Enabled β β ON.
π Step 2 β Select Socket Server
- Choose PHP (default, works with PHPSocketIO bundled with Sngine).
- (Node.js is coming soon and requires a Node server, not covered here).
- For PHP Path you can get from your server admin or run this command in your server terminal “which php”

π Step 3 β Choose Proxy Mode
πΉ Option A: Proxied (Recommended)
In this mode, Apache or Nginx proxies WebSocket traffic to your chat server.
- Toggle Chat Socket Proxied β ON.
- Set Socket Port to
3000
(or whatever you run PHPSocketIO on). - Leave SSL Certificate Path and Key Path empty (not needed).
π Server Setup Needed
If using Nginx, add to your vhost or nginx.cong file
# Socket.io
location /socket.io/ {
proxy_pass https://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_read_timeout 86400s;
}
If using Apache, add inside your <VirtualHost *:443>
:
ProxyPass /socket.io http://localhost:3000/socket.io retry=0 timeout=30
ProxyPassReverse /socket.io http://localhost:3000/socket.io
RewriteEngine On
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/socket.io/?(.*) ws://localhost:3000/socket.io/$1 [P,L]
β
In this mode, your site SSL (from cPanel/Letβs Encrypt) secures the connection.
β No certificate configuration needed in Sngine.
This mode is highly recommended, particularly if you are using Cloudflare, which only permits default ports 80 and 443 (SSL).


πΉ Option B: Not Proxied (Direct SSL on Socket Server)
In this mode, the chat server itself handles SSL.
- Toggle Chat Socket Proxied β OFF.
- Enter Socket Port β
3000
(or another free port). - Fill in:
- SSL Certificate Path β e.g.
/home/username/ssl/domain.com.crt
- SSL Certificate Key Path β e.g.
/home/username/ssl/domain.com.key
- SSL Certificate Path β e.g.
- (Optional) Add CA bundle path if required.
π You must download/export SSL certificate & private key from cPanel (under SSL/TLS β Certificates & Private Keys) and upload them into your hosting account (if not already available).
β οΈ Important: Many shared hosting providers block external ports like 3000
. If your browser canβt connect, you must switch to proxied mode.
π Step 4 β Save and Test
- Click Save Changes.
- Use Check Certificate (only available if not proxied).
- Open your site, login, and test chat in multiple tabs.
π Summary
- If youβre on VPS or dedicated server β you can use either proxied or not-proxied.
- If youβre on shared hosting (cPanel) β usually you can only use proxied (since non-standard ports are blocked).
Thatβs it.
Happy Sngine π
Buy Sngine or Extend your support: https://bit.ly/BuySngine