Docs/Migrate from Pusher
Docs/Getting Started

Migrate from Pusher

Move an existing Pusher Channels integration to Socketo.

Migrate from Pusher

Socketo implements the Pusher Protocol v7, so most Pusher Channels integrations can move without changing their client-side channel and event code. The migration is mainly a configuration change: use Socketo application credentials and endpoints, then verify the features your application uses.

What stays the same

You can usually keep:

  • pusher-js and your existing server-side integration
  • Public, private, and presence channel names
  • Event names, payloads, subscriptions, and bindings
  • Your existing channel authentication endpoint
  • Presence member data and connection lifecycle handling

Review the compatibility limits before switching. Watchlist events, encrypted channels, cache channels, and webhooks are not currently supported.

1. Create a Socketo application

For the managed service, sign in to the Socketo dashboard, create an application, and copy its app ID, key, and secret. Keep the secret on your server and store the credentials in your existing secret manager or environment configuration.

For a self-hosted deployment, follow the self-hosting documentation and use the credentials configured for your instance.

2. Update the client connection

Keep your current pusher-js code and replace the connection values with your Socketo application values:

js
import Pusher from 'pusher-js'

const pusher = new Pusher('SOCKETO_APP_KEY', {
  wsHost: 'wss.socketo.dev',
  wssPort: 443,
  forceTLS: true,
  cluster: 'socketo',
  authEndpoint: 'https://your-api.com/pusher/auth',
})

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

Keep authEndpoint pointed at your application server. It should continue to validate the signed-in user and return the Pusher-compatible auth response. See the connection documentation for each option.

3. Update server credentials and events

Replace the Pusher app ID, key, and secret used by your server with the Socketo application credentials. Never expose the app secret in browser code.

For server-triggered events, send requests to https://api.socketo.dev and use Socketo's HMAC-SHA256 signing format. Existing event payloads and channel names can remain the same:

js
const body = JSON.stringify({
  name: 'order-updated',
  channel: 'private-orders',
  data: JSON.stringify({ orderId: 'order-123' }),
})

// Sign the request with your Socketo app key and secret, then POST to:
// https://api.socketo.dev/apps/APP_ID/events

See Server Events for endpoint details and Auth & Signature for channel and REST API signing.

4. Verify the migration

Test the integration in a staging environment before changing production:

  1. Connect with the Socketo app key and confirm the connected event.
  2. Subscribe to a public channel and receive a server-triggered event.
  3. Test private and presence channel authentication if you use them.
  4. Confirm reconnect behavior and error handling.
  5. Check your event sizes, channel names, and client event rate against the limits.

Once staging is working, deploy the new credentials and connection settings. Your application code for subscribing, publishing, and handling events should not need to change.