Skip to main content

Check Laravel Pusher broadcasts locally, before Pusher

Set PUSHER_HOST=127.0.0.1, PUSHER_PORT=8000 and PUSHER_SCHEME=http in .env. Laravel then sends every Pusher broadcast to Buggregator first. You see each event's channel, name and data on your machine. Set BROADCAST_UPSTREAM and Buggregator passes each event on to Pusher or soketi, so the browser keeps getting live updates.

Steps

1. Start Buggregator

Broadcast events need Buggregator 2.13.0 or newer. They arrive on the HTTP port 8000.

bash
docker run --pull always \
  -p 127.0.0.1:8000:8000 \
  ghcr.io/buggregator/server:latest

2. Point Laravel's Pusher connection at Buggregator

Keep your app id, key and secret. Change only where the server sends broadcasts.

dotenv
# .env
BROADCAST_CONNECTION=pusher
PUSHER_HOST=127.0.0.1
PUSHER_PORT=8000
PUSHER_SCHEME=http

Older Laravel apps use BROADCAST_DRIVER instead of BROADCAST_CONNECTION. When Laravel runs in Docker Compose next to Buggregator, use the service name, for example buggregator, as the host.

3. Keep the browser on the real server

php artisan install:broadcasting --pusher writes VITE_PUSHER_HOST="${PUSHER_HOST}" and VITE_PUSHER_PORT="${PUSHER_PORT}". Once PUSHER_HOST points at Buggregator, Echo in the browser would connect there too. Buggregator does not accept Echo's Pusher WebSocket connections. Set the VITE_PUSHER_* values to your real server, as they were before.

4. Pass the events on, if you want them live

Without an upstream, Buggregator stores each event and answers your app with {}, as Pusher does, and browsers get nothing. To keep live updates, give it your real server. For Pusher it is the api-<cluster>.pusher.com host Laravel would use; for a local soketi, its own address.

bash
docker run --pull always \
  -p 127.0.0.1:8000:8000 \
  -e BROADCAST_UPSTREAM=https://api-mt1.pusher.com \
  ghcr.io/buggregator/server:latest

Buggregator sends the same path, query and body, so the signature stays valid. It waits up to 5 seconds. If the real server cannot be reached, your app gets 502 and the event is still stored.

5. Broadcast and look

Fire an event in your app, then open Broadcast in the menu at http://127.0.0.1:8000. On the left are the channels that got events, with their kind: public, private, presence or encrypted. On the right are their events. Open one to see its payload, what changed since the previous event of the same name, and Copy as cURL. The event name is the full class name, for example App\Events\OrderShipped.

Why it works

Laravel's Pusher driver sends each broadcast as a signed POST /apps/<app-id>/events request. Buggregator answers that API on port 8000 and stores one event per broadcast. Only the server side changes: the browser still talks to the real Pusher or soketi.

Checked on with Buggregator v2.13.0

Setup in 60 seconds

No registration. No account. Start it and point your app at it.

1

Start Buggregator

One file, installed with one command. The web UI opens on port 8000. Prefer containers? Use the Docker tab.

$ curl -fsSL https://raw.githubusercontent.com/buggregator/server/master/scripts/install.sh | sh
$ HTTP_ADDR=127.0.0.1:8000 \
  SMTP_ADDR=127.0.0.1:1025 \
  VAR_DUMPER_ADDR=127.0.0.1:9912 \
  MONOLOG_ADDR=127.0.0.1:9913 \
  PROXY_ADDR=127.0.0.1:8080 \
  ~/.local/bin/buggregator

The script picks the file for your CPU: Intel/AMD or ARM.

One file for Linux, macOS and Windows, about 40 MB. Nothing else to install.

This run line keeps it on this computer. Without the *_ADDR settings it listens on all network interfaces

Rather not run a script? Download the file yourself

Runs on Windows, macOS and Linux, on Intel/AMD and ARM.

Prefer not to do it yourself? Your AI agent can set Buggregator up for you