Laravel Reverb in production: Nginx, Supervisor, open files and scaling
Deploy Laravel Reverb step by step: the proxy, Supervisor’s minfds, the ext-uv event loop past 1,024 connections, Redis scaling, restarts and monitoring, with the settings from Reverb’s docs.
php artisan reverb:start works on the first try in development. In production the same command needs a process manager, a proxy, higher open-file limits, an event loop that is not capped at 1,024 connections, and Redis once one server is not enough. This is the checklist, in the order you will meet each step, with the settings from the Reverb documentation.
The production checklist
| Step | Setting | Why |
|---|---|---|
| Bind the server | REVERB_SERVER_HOST=0.0.0.0, REVERB_SERVER_PORT=8080 | Reverb listens on an internal port; the public side is your proxy on 443 |
| Proxy with TLS | Nginx proxy_pass with Upgrade and Connection headers | Browsers on HTTPS pages need wss://; Reverb serves both /app and /apps |
| Keep it running | Supervisor with minfds=10000 | Reverb is a long-running process; Supervisor must be allowed enough open files |
| Raise open files | nofile in /etc/security/limits.conf, Nginx worker_rlimit_nofile | Every connection holds a file descriptor |
| Event loop | pecl install uv | The default stream_select loop is limited to 1,024 open files |
| Scale out | REVERB_SCALING_ENABLED=true and a central Redis | Servers share messages over Redis pub/sub behind a load balancer |
| Deploy | php artisan reverb:restart | Long-running code does not pick up changes until it restarts |
| Monitor | Reverb's Laravel Pulse recorders and pulse:check | Connection and message counts on your Pulse dashboard |
Proxy and process manager
Reverb listens on 0.0.0.0:8080; Nginx takes wss:// on 443 and forwards it with the upgrade headers:
location / {
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://0.0.0.0:8080;
}REVERB_HOST and REVERB_PORT (where Laravel sends broadcasts and where Echo connects) are your public hostname and 443. REVERB_SERVER_HOST and REVERB_SERVER_PORT are where the process itself listens. Mixing the two pairs up is the most common reason the handshake fails.
Supervisor keeps the process alive. Raise minfds in the [supervisord] section, or Supervisor itself stops Reverb from opening more connections:
[supervisord]
minfds=10000
[program:reverb]
command=php /var/www/app/artisan reverb:start
autostart=true
autorestart=trueLimits you hit before you expect them
1,024 connections. Without the uv extension, Reverb's event loop stops at about a thousand connections, whatever the server's size. Install it with PECL; Reverb switches to it automatically.
Open files. Check ulimit -n for the user Reverb runs as, then raise nofile in limits.conf, Supervisor's minfds and Nginx's worker_rlimit_nofile and worker_connections together. Raising only one of them changes nothing.
Local ports. The Reverb docs point out that a server's default port range allows about 28,000 connections; past that, add servers rather than tuning the kernel.
Scaling past one server
Set REVERB_SCALING_ENABLED=true, point every Reverb server at the same Redis with your app's default Redis connection, and put a load balancer in front. A message received by one server is published to the others over Redis. Run pulse:check on one server only.
You now operate Redis, a load balancer, several Reverb servers and their deploys. That is the point where many teams compare the work with managed Reverb or a hosted service.
The same app without running Reverb
Reverb speaks the Pusher protocol, so a hosted Pusher-compatible service needs no change to your events, routes/channels.php or Echo code, only the connection:
BROADCAST_CONNECTION=pusher
PUSHER_HOST=ws.hibira.io
PUSHER_PORT=443
PUSHER_SCHEME=httpsThe full steps are in Laravel Echo without running Reverb. The Reverb settings on this page were checked against its documentation on 2026-11-18.
Questions
How many connections can Laravel Reverb handle?
On one server, the limits are the event loop (about 1,000 without ext-uv), the open-file settings and memory. Past one server, Reverb scales horizontally with Redis. Measure with your own events before you size servers.
Why does Echo fail to connect to Reverb in production?
Usually one of three things: REVERB_HOST/REVERB_PORT point at the internal port instead of the public hostname and 443, the proxy does not pass the Upgrade and Connection headers, or REVERB_SCHEME is http on an HTTPS page.
Does Reverb need a queue worker?
Reverb does not, but ShouldBroadcast events are queued, so a queue:work process must run for them to be sent. Use ShouldBroadcastNow to send during the request.
Do I have to restart Reverb on every deploy?
Yes. Run php artisan reverb:restart after deploying; it closes connections gracefully and Supervisor starts the process again. Clients reconnect on their own.
Product names are trademarks of their owners.