Soketi

Next-gen, Pusher-compatible, open-source WebSockets server

Deploy Soketi

Soketi

soketi/soketi:1.6.1-16-debian

Just deployed

Deploy and Host Soketi on Railway

Soketi is an open-source WebSockets server that implements the Pusher Protocol v7. It provides real-time communication capabilities for applications while maintaining compatibility with existing Pusher clients and libraries.

About Hosting Soketi

Hosting Soketi involves deploying a WebSocket server that handles real-time connections and message broadcasting. The server runs as a single process that can manage thousands of concurrent connections and supports both development and production deployments. Soketi requires configuration for app management, authentication keys, and optional database backends for storing connection metadata. The deployment supports scaling from single development instances to multiple production instances handling high traffic loads.

Soketi Logo

Common Use Cases

  • Real-time Chat Applications: Build chat systems, messaging platforms, and collaborative tools that require instant message delivery and presence indicators
  • Live Dashboards and Monitoring: Create real-time dashboards for business metrics, system monitoring, and live data visualization with instant updates
  • Collaborative Applications: Develop document editors, whiteboards, and team collaboration tools that need real-time synchronization between users
  • Gaming and Interactive Applications: Support multiplayer games, live polls, auctions, and other interactive experiences requiring low-latency communication

Dependencies for Soketi Hosting

  • Node.js Runtime: Modern Node.js environment for running the WebSocket server
  • Database Storage (Optional): DynamoDB or SQL database like PostgreSQL for storing app configurations and connection metadata
  • Application Keys: Pusher-compatible app credentials for client authentication and access control

Deployment Dependencies

Implementation Details

Key Features:

  • Pusher Protocol v7 Compatibility: Compatible with any Pusher-maintained or compatible client, providing plug-and-play experience for existing applications
  • High Performance: Built on uWebSockets.js, a C application ported to Node.js, demonstrating performance levels 8.5x that of Fastify and at least 10x that of Socket.IO
  • App-based Access: Manage API and WebSocket access through Pusher-like apps with keys and secrets for authentication and broadcasting
  • Production Ready: Designed for both local development and demanding production applications with resiliency and speed
  • Database Support: Built-in support for DynamoDB and SQL-based servers like PostgreSQL
  • HTTP Webhooks: Send notifications about channel events to your application endpoints

Basic Configuration:

# Environment variables for Soketi
DEFAULT_APP_ID=app-id
DEFAULT_APP_KEY=app-key
DEFAULT_APP_SECRET=app-secret
DEFAULT_APP_CLUSTER=mt1
DEFAULT_APP_WEBHOOKS=http://localhost:3000/webhooks

# Optional database configuration
DB_REDIS_HOST=localhost
DB_REDIS_PORT=6379
DB_REDIS_PASSWORD=password

Client Connection Example:

// JavaScript client using Pusher.js
const pusher = new Pusher('app-key', {
  wsHost: 'your-soketi-instance.com',
  wsPort: 443,
  wssPort: 443,
  forceTLS: true,
  enabledTransports: ['ws', 'wss'],
  cluster: 'mt1'
});

const channel = pusher.subscribe('my-channel');
channel.bind('my-event', function(data) {
  console.log('Received:', data);
});

Server-side Broadcasting:

// Node.js server broadcasting events
const PusherServer = require('pusher');

const pusher = new PusherServer({
  appId: 'app-id',
  key: 'app-key', 
  secret: 'app-secret',
  host: 'your-soketi-instance.com',
  port: 443,
  useTLS: true
});

// Broadcast to channel
pusher.trigger('my-channel', 'my-event', {
  message: 'Hello World!'
});

Deployment Options:

Soketi offers multiple installation and configuration methods:

  • Single instances for development environments
  • Multiple active instances for production scaling
  • Container-based deployments for cloud platforms
  • Support for hundreds or thousands of active concurrent users

Performance Characteristics:

  • Blazing Fast Speed: Built on uWebSockets.js for maximum performance
  • Scalability: Handle thousands of concurrent connections per instance
  • Low Latency: Optimized for real-time communication requirements
  • Memory Efficient: Designed for minimal resource usage

App Management:

  • Pusher-compatible app system with API keys and secrets
  • Built-in authentication and authorization
  • Channel and event management
  • Connection monitoring and statistics

Why Deploy Soketi on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Soketi on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
mellow-vue
A full-stack Vue app with The Boring JavaScript Stack.

View Template
Sveltekit NestJS
Full-stack with SvelteKit + NestJS + Prisma + Postgresql with utils

View Template
.NET8 Web API
A basic ASP.NET Core Web API template (.NET 8)