6amMart

View Categories

3rd Party Setup

Configure Laravel Reverb #

This guide explains how to configure and deploy the Laravel Reverb server, which replaces the legacy laravel-websockets package for real-time event broadcasting.

1. Environment Configuration (.env) #

To enable Reverb as your broadcasting driver, update your .env file with the following variables:

Required Reverb Variables:

BROADCAST_DRIVER = reverbEnables Reverb broadcasting.
REVERB_APP_ID = 6ammartYour Reverb Application ID.
REVERB_APP_KEY = 6ammartPublic App Key.
REVERB_APP_SECRET = 6ammartPrivate App Secret.
REVERB_HOST = host_nameHost/IP for Reverb.
REVERB_PORT = 6001Default WebSocket port.
REVERB_SCHEME = httpUse https behind SSL proxy.
Client-Side Pusher Compatibility:
PUSHER_APP_ID = 6ammart
PUSHER_APP_KEY = 6ammart
PUSHER_HOST = host_name
PUSHER_PORT = 6001
PUSHER_SCHEME = http
PUSHER_APP_CLUSTER = mt1

2. Starting the Reverb Server #

php artisan reverb:start

3. Deployment & Process Management #

Use Supervisor to keep Reverb and Queue Worker running.

Supervisor Installation:

sudo apt install supervisor
sudo yum install supervisor

Supervisor Configuration (reverb.conf):

[program:reverb]
command=/usr/bin/php /home/laravel-echo/laravel-websockets/artisan reverb:start
autostart=true
autorestart=true
[program:queue-worker]
command=/usr/bin/php /home/laravel-echo/laravel-websockets/artisan queue:work --tries=3 --daemon
autostart=true
autorestart=true

Activate:

sudo supervisorctl update
sudo supervisorctl start reverb
sudo supervisorctl start queue-worker
Increase File Descriptors:
minfds=10240

Configuration in Admin Panel #

After configuring all the settings above, turn on the Websocket and update the Websocket URL and Websocket Port.

6amMart Doc Admin 3rd-Party System Configuration SS