2 years ago
I've tried this with both Soketi templates, and the result is the same. The browser client is able to connect just fine using my custom.domain and port 6001
But when the backend express server within railway tries to trigger an event, it is met with an ECONNREFUSED. So, the backend creates this:
export const pusherClient = new pusher({
host: process.env['SOKETI_INTERNAL_HOST'] || '127.0.0.1',
port: process.env['SOKETI_INTERNAL_PORT'] || '6001',
appId: process.env['SOKETI_DEFAULT_APP_ID'] || '',
key: process.env['SOKETI_DEFAULT_APP_KEY'] || '',
secret: process.env['SOKETI_DEFAULT_APP_SECRET'] || '',
useTLS: false,
});and uses the env vars (only sharing host and port):
SOKETI_INTERNAL_HOST=soketi.railway.internal
SOKETI_INTERNAL_PORT=6001I've tried with host set to 127.0.0.1 and 0.0.0.0 and useTLS true.
I also tried setting host to the public url, my custom one and the railway version, but in those two cases it times out, doesn't connect.
I would really appreciate some guidance here, I'm so close to having this websocket feature done!
4 Replies
2 years ago
Thanks for the swift response. I've read that about :: a few times. What does that mean, where do I adjust that? Because if it's in the Soketi side, I don't know that I have any control over that since it's from a docker image?
2 years ago
My bad, I deleted the reply because I'm unsure if it was indeed the correct solution for this specific situation
I've never used Socketi before
2 years ago
Ok, but I got it!!! (thanks to your pointer and asking Claude)
Adding SOKETI_HOST=:: to the env vars for the Soketi app solves it, this informs the docker image that it can/should accept ipv6 connections to. With that, the internal railway url works fine as host and the public stays as is.
Thanks for the pointer!
Status changed to Solved brody • over 1 year ago

