Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

PaulAdams's avatar

Reverb not working on local secure site.

I have a Laravel 11 project. Servers are managed locally with Herd. I have secured my site. Everything works beautifully except for Reverb.

pusher-js.js?v=6897221e:3268 WebSocket connection to 'wss://my-site.test/app/xjdam3dnj7kmzzviunel?protocol=7&client=js&version=8.4.0-rc2&flash=false' failed: 

Here is my .env

REVERB_APP_ID=
REVERB_APP_KEY=
REVERB_APP_SECRET=
REVERB_HOST="my-site.test"
REVERB_PORT=443
REVERB_SCHEME=https

I have looked at the nginx config, but with no luck - I am not experienced with servers.

Could any of you marvellous devs help?

1 like
3 replies
PaulAdams's avatar
PaulAdams
OP
Best Answer
Level 2

I spoke to the fabuous guys supporting Reverb. If you get this problem, first check you have the right config. Something like:

REVERB_APP_ID=<your id>
REVERB_APP_KEY=<your key>
REVERB_APP_SECRET=<your secret>
REVERB_HOST="your-site.test"
REVERB_PORT=8080 // not 443
REVERB_SCHEME=https

Then, here is the trick: Go to your browser and visit your site on port 8080. You must use https for this to work.

https://your-site.test:8080

You will get a 404. Now your browser will have cached the certificiate. Now visit your website again (without the port 8080)...

https://your-site.test

Et voila! It works.

3 likes
starter-dev's avatar

@PaulAdams

If it's alright, I would want to ask you a few questions:

  1. Can we see your nginx .conf file?
  2. Do you change any setting in config/broadcasting.php & config/reverb.php?
  3. Does your environmental variables for laravel-echo looks like this:
VITE_REVERB_APP_KEY="${REVERB_APP_KEY}"
VITE_REVERB_HOST="${REVERB_HOST}"
VITE_REVERB_PORT="${REVERB_PORT}"
VITE_REVERB_SCHEME="${REVERB_SCHEME}"

Thank you!

Please or to participate in this conversation.