PUSHER_HOST must be the same as your soketi container name; change it to:
PUSHER_HOST=soketi
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello, I'm currently trying to setup Soketi to work via a fresh Laravel 9 install, following https://laravel.com/docs/9.x/broadcasting , and seem to be running into an issue when trying to get the backend to broadcast. I am attempting to do so on my localhost over port 6001 over just http, no SSL involved.
Everything seems to be functioning properly on the front-end. I am able to get Echo to connect to the server, subscribe to a channel, and send pings/receive pongs, but when I attempt to have the back-end trigger an event it seems to fail to be able to connect to the server at all?
This is the response:
Pusher error: cURL error 7: Failed to connect to localhost port 6001 after 0 ms: Connection refused (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for http://localhost:6001/apps/app-id/events?auth_key=app-key&auth_timestamp=1670821955&auth_version=1.0&body_md5=db1e1ee1e7151bb41beeb2c1e03bda0b&auth_signature=3daebed024d3f0b2a7333c61e313aaf44bba436ab18a374f5472bb3181afd100.
My broadcasting.php config:
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY', 'app-key'),
'secret' => env('PUSHER_APP_SECRET', 'app-secret'),
'app_id' => env('PUSHER_APP_ID', 'app-id'),
'options' => [
'host' => env('PUSHER_HOST', '127.0.0.1'),
'port' => env('PUSHER_PORT', 6001),
'scheme' => env('PUSHER_SCHEME', 'http'),
'encrypted' => false,
'useTLS' => env('PUSHER_SCHEME') === 'https',
],
],
and .env
PUSHER_APP_ID=app-id
PUSHER_APP_KEY=app-key
PUSHER_APP_SECRET=app-secret
PUSHER_HOST=localhost
PUSHER_PORT=6001
PUSHER_SCHEME=http
PUSHER_APP_CLUSTER=mt1
and docker-compose.yml additions:
soketi:
image: 'quay.io/soketi/soketi:latest-16-alpine'
environment:
SOKETI_DEBUG: '1'
SOKETI_METRICS_SERVER_PORT: '9601'
ports:
- '${SOKETI_PORT:-6001}:6001'
- '${SOKETI_METRICS_SERVER_PORT:-9601}:9601'
networks:
- sail
networks:
sail:
driver: bridge
I feel like I'm missing something simple, hoping someone can point me in a direction instead of burning another day. Thanks for your time.
PUSHER_HOST must be the same as your soketi container name; change it to:
PUSHER_HOST=soketi
Please or to participate in this conversation.