Sockudo is a drop-in replacement for Pusher, which means you can use any Pusher-compatible client library without modifications. This guide shows you how to configure popular client libraries to connect to Sockudo.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/sockudo/sockudo/llms.txt
Use this file to discover all available pages before exploring further.
JavaScript (pusher-js)
The official Pusher JavaScript library works seamlessly with Sockudo.Installation
Configuration
Configurepusher-js to point to your Sockudo server:
Production Configuration
For production with SSL/TLS:PHP (pusher-php-server)
Use the official Pusher PHP library for server-side event triggering.Installation
Configuration
Production Configuration
Python (pusher)
The Pusher Python library works with Sockudo for server-side operations.Installation
Configuration
Ruby (pusher-gem)
Installation
Configuration
Node.js (pusher)
For server-side Node.js applications.Installation
Configuration
React Native
Usepusher-js with React Native.
Installation
Configuration
Common Configuration Options
Connection Options
| Option | Description | Default |
|---|---|---|
wsHost | Sockudo server hostname | - |
wsPort | WebSocket port | 6001 |
forceTLS | Use secure WebSocket (wss) | false |
cluster | Leave empty for Sockudo | '' |
enabledTransports | Transport protocols | ['ws', 'wss'] |
activityTimeout | Connection activity timeout (ms) | 120000 |
pongTimeout | Pong response timeout (ms) | 30000 |
Authentication
For private and presence channels:Troubleshooting
Connection Refused
Problem: Client cannot connect to Sockudo. Solution:- Verify
wsHostandwsPortmatch your Sockudo configuration - Check firewall rules allow connections to port
6001 - Ensure Sockudo is running:
curl http://localhost:6001/up/app-id
Authentication Failures
Problem: Private/presence channel subscriptions fail. Solution:- Verify app credentials (
key,secret,id) match Sockudo configuration - Check authentication endpoint returns proper signature format
- Ensure HMAC signature uses correct app secret
SSL/TLS Errors
Problem: Connection fails with SSL errors in production. Solution:- Set
forceTLS: truewhen usingwss:// - Verify SSL certificates are properly configured on your reverse proxy
- Check that WebSocket upgrade headers are preserved through proxy
Messages Not Received
Problem: Client connects but doesn’t receive events. Solution:- Verify channel name matches exactly (case-sensitive)
- Check event binding uses correct event name
- Ensure server is triggering events to the correct channel
- Check browser console for error messages
CORS Issues
Problem: Browser blocks WebSocket connection due to CORS. Solution:- Configure
allowed_originsin Sockudo app configuration: - Use environment variable:
SOCKUDO_DEFAULT_APP_ALLOWED_ORIGINS=https://yourdomain.com,http://localhost:3000
Next Steps
- Migrate from Pusher - Complete migration guide
- Using with Nginx - Production deployment with reverse proxy
- Redis Setup - Configure Redis for horizontal scaling