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

UhOh's avatar
Level 7

Forge + Pusher?

Locally, Events & Pusher working as expected. However on Forge Pusher is not reaching the app and vise versa. Haven't found any guides, etc. Solution? Tnx.

Console error: WebSocket connection to 'wss://localhost/.../ failed.

TIP: for debugging the connection, Pusher has a Debug Console that shows connections and events. So at least you can see what's connecting or not.

0 likes
6 replies
LaryAI's avatar
Level 58

It sounds like you may need to configure your Forge server to allow for incoming connections from Pusher. You can do this by adding the following to your .env file:

PUSHER_ENDPOINT=tcp://127.0.0.1:6379

You may also need to configure your firewall to allow for incoming connections from Pusher. You can do this by running the following command:

sudo ufw allow 6379/tcp

Once you have done this, you should be able to connect to Pusher from your Forge server.

MohamedTammam's avatar

@UhOh Try clearing the cache especially the view cache. do you build on the server or in your local?

UhOh's avatar
Level 7

@mohamedtammam

The solution for the time being was to comment out the wss entry in bootstrap.js

wssPort: import.meta.env.VITE_PUSHER_PORT ?? 443, // comment out

I think a line of inquiry to solve this properly is to see how wssPort needs to be setup with Nginx. This issue probably has to do with the SSL/Nginx setup, so on.

Please or to participate in this conversation.