Make sure you have correct port setup. And config:clear.
Have you tried uncommenting the port.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi all
I've been struggling all day to get my Laravel application to connect to Pusher. The logs tell me the following:
[2021-03-13 23:29:35] .ERROR: Failed to connect to Pusher. {"exception":"[object] (Illuminate\Broadcasting\BroadcastException(code: 0): Failed to connect to Pusher.
I've searched and searched but I'm not getting a better understanding of what I should be doing to connect. Here is my current pusher setup in broadcasting.php
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'scheme' => 'https',
'encrypted' => true,
//'port' => 443,
'host' => 'myurl.app',
'cluster' => env('PUSHER_APP_CLUSTER'),
'useTLS' => true,
],
],
I host a web application on digital ocean and I'm using Nginx and Let's Encrypt for my certificates. Maybe that is affecting my pusher connection, as I don't know what else could be. I've also since this last worked changed my application to a multi-tenant application, so now I use subdomains to identify tenants (E.g. myclient.myurl.app), and I'm also not sure if that is having an impact.
I'm also really curious as to what to set host and port to in the pusher config, as I couldnt' find much information about this.
Further, my pusher account works, my credentials are correct in .env. It is currently connected to more than one app, but also unsure if that is an issue. Whevener I try to dispatch an event that broadcasts, it just said it couldn't connect with any further information.
Also, the frontend can connect to the pusher channel and receive information via the event generator, it's just the backend that won't
Could someone help me out as to where I need to start in fixing this?
Please or to participate in this conversation.