2 months ago
Hi Railway team,
I'm running a Discord bot on Railway that uses @discordjs/voice for voice channel transcription. The bot has been deployed on Railway since May 2025 and was working correctly through at least October 2025. Sometime after that, voice connections stopped working entirely with no code changes on my end.
What's happening:
The bot connects to Discord's main gateway fine (commands work, bot appears online). But when it tries to join a voice channel, the connection cycles through these states in under 200ms and never establishes:
signalling → connecting → connecting → signalling → (15s timeout) → destroyed
The error thrown is VOICE_CONNECTION_FAILED: The operation was aborted.
What I've ruled out:
- Confirmed it's not a code issue — zero code changes between the last working session (October 2025) and now
- Tested with both @discordjs/voice 0.18.0 and 0.19.0 — identical failure pattern
- Discord gateway connection works perfectly, so it's not a general networking issue
- The connecting → connecting double transition indicates Discord is sending two VOICE_SERVER_UPDATE events, but the connection to the voice server WebSocket/UDP is being immediately refused or dropped
Technical context:
Discord voice uses UDP (port 50000–65535 range) for audio data and WebSocket connections to *.discord.media for voice server signalling. These are on different infrastructure from the main gateway.discord.gg. The 200ms failure time is consistent with an
immediate network-level rejection rather than a timeout.
My question:
Does Railway restrict outbound UDP or outbound WebSocket connections to IP ranges outside of discord.gg? Specifically to Discord's voice server infrastructure (*.discord.media, Cloudflare IP ranges used for Discord voice)?
Has anything changed in Railway's network configuration since October 2025 that could affect this?
Thank you!
0 Replies
Status changed to Awaiting Railway Response Railway • 2 months ago