# Soketi — Self-Hosted WebSocket Server Compatible with Pusher > A fast, open-source WebSocket server that implements the Pusher protocol, letting you drop in real-time functionality without a third-party service. ## Install Save as a script file and run: # Soketi — Self-Hosted WebSocket Server Compatible with Pusher ## Quick Use ```bash # Install and run via npm npm install -g @soketi/soketi soketi start # Or run with Docker docker run -p 6001:6001 quay.io/soketi/soketi ``` ## Introduction Soketi is a self-hosted, open-source WebSocket server that fully implements the Pusher Channels protocol. If you already use Pusher client libraries, Soketi works as a drop-in backend replacement, giving you real-time messaging under your own control. ## What Soketi Does - Implements the Pusher Channels protocol for WebSocket connections - Handles presence channels, private channels, and public channels - Supports horizontal scaling via Redis or NATS for multi-node deployments - Provides a REST API for triggering events from your backend - Works with existing Pusher client SDKs across all platforms ## Architecture Overview Soketi is built with Node.js and uses the uWebSockets.js library for high-performance WebSocket handling. It manages app credentials, channel subscriptions, and message routing in-process. For multi-server deployments, Redis or NATS acts as the message broker to synchronize channel state. The REST API accepts event payloads and broadcasts them to subscribed WebSocket clients. ## Self-Hosting & Configuration - Run with `soketi start` or via Docker for containerized deployments - Configure apps, rate limits, and adapter settings in a JSON config file - Set `SOKETI_DB_REDIS_HOST` to enable Redis-based horizontal scaling - Use environment variables for port, SSL certificates, and debug mode - Deploy on Kubernetes with the official Helm chart for production workloads ## Key Features - Full Pusher protocol compatibility with existing client SDKs - Built on uWebSockets.js for low-latency, high-throughput connections - Horizontal scaling via Redis or NATS adapters - Webhook support for channel occupation and member events - Rate limiting per app with configurable thresholds ## Comparison with Similar Tools - **Pusher** — managed SaaS; Soketi is self-hosted with no per-message billing - **Centrifugo** — custom protocol server; Soketi uses the Pusher protocol for broader SDK compatibility - **Socket.IO** — library-based; Soketi is a standalone server with a REST trigger API - **Mercure** — SSE-based; Soketi uses WebSockets for bidirectional communication ## FAQ **Q: Can I use existing Pusher client libraries?** A: Yes. Point your Pusher SDK's host setting to your Soketi server and it works without code changes. **Q: How many concurrent connections can Soketi handle?** A: Performance depends on hardware, but Soketi handles tens of thousands of connections per node thanks to uWebSockets.js. **Q: Does Soketi support SSL?** A: Yes. Configure SSL certificate paths in the config file or terminate TLS at your reverse proxy. **Q: Is Soketi suitable for production?** A: Yes. Use Redis or NATS for multi-node deployments and deploy behind a load balancer for high availability. ## Sources - https://github.com/soketi/soketi - https://docs.soketi.app/ --- Source: https://tokrepo.com/en/workflows/asset-d459fa43 Author: Script Depot