Skip to main content
This page focuses on setting up and operating the Reverb server itself. For creating broadcast events and configuring Laravel Echo, see Broadcasting.

What is Reverb?

Laravel Reverb is Laravel’s official self-hosted WebSocket server. It brings blazing-fast and scalable real-time WebSocket communication directly to your Laravel application — no third-party service account required. Reverb sits on top of Laravel’s broadcasting infrastructure, routing server-side events to connected browsers over persistent WebSocket connections.

Installation

The install:broadcasting Artisan command installs Reverb along with all required dependencies in one step:
Select Reverb when prompted, or pass --reverb to skip the prompt:
This command:
  • Installs the Composer package (laravel/reverb)
  • Installs NPM packages (laravel-echo, pusher-js)
  • Adds environment variables to .env
  • Publishes config/reverb.php
To install manually:

Configuration

Application credentials

Reverb uses a set of application credentials to authenticate connections between the client and server. Set these in your .env file:
These values are referenced in the apps section of config/reverb.php.

Allowed origins

Restrict which origins can connect to Reverb by setting allowed_origins in config/reverb.php:
Use * to allow all origins.

Additional applications

A single Reverb installation can serve multiple applications. Add additional entries to the apps array in config/reverb.php:

SSL

In most production setups, SSL termination is handled by a web server (e.g., Nginx) that proxies requests to Reverb. For local development with secure WebSockets, you can use a certificate from Laravel Herd or Valet:
To specify a certificate manually, configure tls options in config/reverb.php:

Running the server

Start the Reverb server with the reverb:start Artisan command:
By default, the server listens on 0.0.0.0:8080. Specify a custom host or port with the --host and --port options:
You can also set these via environment variables:
REVERB_SERVER_HOST / REVERB_SERVER_PORT define where the Reverb process listens. REVERB_HOST / REVERB_PORT tell Laravel where to send broadcast messages (the public-facing address). In production, these pairs are often different — for example, Reverb listens on port 8080 internally while the public hostname uses port 443.

Debugging

Reverb suppresses debug output by default for performance. To see the stream of data passing through the server, add --debug:

Restarting

Because Reverb is a long-running process, code changes won’t take effect until you restart it. The reverb:restart command gracefully terminates all active connections before stopping:
When running under a process manager like Supervisor, the manager will automatically restart Reverb after it stops.

Monitoring

Reverb integrates with Laravel Pulse to display connection and message metrics on your dashboard. Add Reverb’s recorders to config/pulse.php:
Add the cards to your Pulse dashboard template:
Run the pulse:check daemon on your Reverb server to keep metrics up to date. In a horizontally scaled setup, run this daemon on only one server.

Running Reverb in production

Open files

Each WebSocket connection consumes one file descriptor. Check the current limit with:
Raise the limit in /etc/security/limits.conf:

Event loop (ext-uv)

Reverb uses PHP’s stream_select by default, which caps out at roughly 1,024 open files. For more than 1,000 concurrent connections, install ext-uv via PECL:
Reverb automatically uses the ext-uv event loop when it’s available.

Nginx reverse proxy

In production, run Reverb behind a reverse proxy. Example Nginx configuration:
Reverb handles WebSocket connections at /app and API requests at /apps. Make sure your web server configuration allows both URIs through to Reverb.
To increase the number of allowed connections, update worker_rlimit_nofile and worker_connections in nginx.conf:

Process management (Supervisor)

Use Supervisor to keep Reverb running in production. Set minfds in supervisord.conf to ensure enough file descriptors are available:
Example program configuration:

Scaling

When a single server can’t handle the required connection count, scale Reverb horizontally using Redis pub/sub: Enable scaling in .env:
Reverb uses your application’s default Redis connection to relay messages between servers. Start reverb:start on each server and place them behind a load balancer that distributes incoming requests evenly.
Laravel Cloud provides fully managed WebSocket infrastructure powered by Reverb clusters, so you can deploy Reverb-enabled applications without managing servers yourself.

Events

Reverb dispatches the following events during the connection and message lifecycle. Listen for these events to hook into Reverb’s internals: All events live in the Laravel\Reverb\Events namespace.

Next steps

Broadcasting

Learn how to create broadcast events, authorize channels, and configure Laravel Echo

Events and listeners

Use Laravel’s event system to listen for the events Reverb dispatches during its lifecycle
Last modified on April 13, 2026