Brigitte's avatar

Migrating from laravel-websocket to Laravel Reverb

I have an installation that works fine with laravel-websockets. It took a while to tweak and it's been in production for about 2 years now; deployed on EC2 with an ALB and the whole nine yards.

We are now migrating to Laravel 11 and the laravel-websockets package is not following. It's been abandoned savagely and we're left in the dust.

I am sure someone did that migration already... Please, if you are out there, would you please share your wisdom, as I am about to embark on this painful journey. TIA

1 like
1 reply
Braunson's avatar

I feel your pain, even though I haven't had to migrate from laravel-websockets to Reverb myself.

A few questions to tailor the migration strategy:

  1. Are you using private channels with authentication?
  2. Do you have custom event broadcasting beyond basic real-time updates?
  3. What's your current server setup - single instance or multiple behind the ALB?
  4. Are you using any laravel-websockets specific features like statistics/debugging dashboard?

High-level migration approach:

Phase 1: Parallel Setup

# Install Reverb alongside existing setup
composer require laravel/reverb
php artisan reverb:install

Phase 2: Configuration Migration

// config/broadcasting.php - add reverb connection
'reverb' => [
    'driver' => 'reverb',
    'key' => env('REVERB_APP_KEY'),
    'secret' => env('REVERB_APP_SECRET'),
    'app_id' => env('REVERB_APP_ID'),
    'options' => [
        'host' => env('REVERB_HOST'),
        'port' => env('REVERB_PORT', 443),
        'scheme' => env('REVERB_SCHEME', 'https'),
    ],
],

Phase 3: ALB/Infrastructure This is probably your biggest pain point - Reverb runs differently than laravel-websockets.

The tricky parts I'm expecting:

  • SSL termination changes
  • Port management with ALB
  • Process management (Reverb vs WebSocket server)

Have you looked at your current laravel-websockets configuration? What's your authentication setup like - that'll be where I'd suggest starting next aside from answering the initial questions

Please or to participate in this conversation.