2 months ago
Hi Railway Support Team,
I’m running a Python Telegram bot on Railway, and recently the application started failing with a network error when trying to call the Telegram API.
The error says that the connection to https://api.telegram.org cannot be established, ending with:
“Network is unreachable (Errno 101)”
It looks like the deployment cannot access the Telegram API over HTTPS. The same code works fine locally.
Could you please help me check whether:
outbound HTTPS traffic to api.telegram.org is being blocked or restricted, or
there are any networking / egress issues affecting my deployment?
If needed, I can share deployment logs or project details.
Thanks a lot for your help!
Best regards,
Bora
23 Replies
2 months ago
I am issuing same error
2 months ago
+
2 months ago
+
2 months ago
+
2 months ago
This may not be specifically a Railway issue. I'm having the same issue using Grammy for NodeJS.
DownDetector (https://downdetector.com/status/telegram/) is showing high error rates and I was unable to connect from my local machine earlier, but it's back now.
My instance in Railway is still unable to connect though.
2 months ago
Same issue here with n8n workflows running Telegram nodes on Railway.
I'm experiencing identical connectivity failures to api.telegram.org from Railway containers that started recently. Here's what I've investigated and attempted so far:
## Environment:
- Platform: Railway (n8n MAIN + WORKER services)
- Framework: n8n v2.1.4
- Database: PostgreSQL 16.10 on Railway
- Node type: Telegram Bot API nodes (Send Message, Trigger, etc.)
## Error Details:
Error code: ETIMEDOUT
Full message: connect ETIMEDOUT 149.154.167.220:443
Timeout: 300000ms (5 minutes)
## Troubleshooting Steps Attempted:
1. DNS Resolution Testing
- DNS successfully resolves api.telegram.org to valid Telegram IPs (149.154.167.220)
- Issue is NOT at DNS layer - it's at TCP connection establishment
2. Added NODE_OPTIONS for IPv4 Priority
- Set NODE_OPTIONS=--dns-result-order=ipv4first on both MAIN and WORKER services
- Redeployed both services
- No improvement - timeouts persist
3. Fixed PostgreSQL Collation Mismatch
- Resolved unrelated DB warnings (collation version 2.36 → 2.41)
- Ran REINDEX DATABASE and ALTER DATABASE REFRESH COLLATION VERSION
- Database now healthy, but Telegram connectivity unchanged
4. Tested Direct HTTP Request to Telegram API
- Created test workflow with HTTP Request node
- URL: https://api.telegram.org/bot<TOKEN>/getMe
- Result: ETIMEDOUT after 5 minutes
- Same code works perfectly on local machine
5. Express Trust Proxy Configuration
- Addressed X-Forwarded-For warnings (unrelated to Telegram issue)
## Key Observations:
-
DNS resolution works (149.154.167.220 is correct Telegram API IP)
-
Other HTTP/HTTPS requests from Railway work normally
-
Only connections to api.telegram.org:443 timeout
-
Timeout occurs at TCP connect phase, NOT TLS/HTTP layer
-
Issue affects ALL Telegram Bot API endpoints, not specific methods
## Conclusion:
This appears to be a Railway network/firewall issue preventing outbound HTTPS connections specifically to Telegram's IP ranges (149.154.167.0/24 and related blocks). The same n8n workflows and Telegram bots work flawlessly on local machines and other hosting providers, confirming this is environment-specific to Railway.
**Could the Railway team please investigate:**
1. Are there any egress firewall rules blocking Telegram API IP ranges?
2. Has anything changed in Railway's network configuration in the past 24-48 hours?
3. Is this affecting specific Railway regions/availability zones?
This is blocking critical production workflows for multiple users (as evidenced by this thread). Any urgent assistance would be greatly appreciated.
Thank you!
2 months ago
Having the same issue, my telegram bot is being blocked on Railway servers.
https://github.com/Diogomartf/fizzy-telegram-bot
https://x.com/diogomartf/status/2006068911310266806
2 months ago
was the same. right now telegram have just returned lots of messages and few errors about too many requests
2 months ago
Same here. Is this a new policy or just a mistake on the network config?
2 months ago
Also blocked.
2 months ago
Im getting time out errors as well with my telegram bot. It was working fine about 4 hrs ago and now there's no response. For a brief moment, bot communication worked but it was awfully slow and then after 10 seconds of life, the bot stopped communicating again and the timeout errors returned.
There's definitely network issue with telegrams API system. My other projects work just fine but they don't involve telegram API.
2 months ago
Well, it works for Node.js projects using Telegram API apparently. Just not Python. I fear that this won't be resolved before Jan 2 lol.
Seems to go through ~1/10 times
faisalz
Well, it works for Node.js projects using Telegram API apparently. Just not Python. I fear that this won't be resolved before Jan 2 lol. Seems to go through ~1/10 times
2 months ago
Sweet. Time to convert over everything to Node 
2 months ago
Have issues with my telegram deploys as well. Hope this can be fixed soon.
2 months ago
not only telegram and panels of my project to slow accept not all requests other requests reject or not connection whats issue???????????????????
2 months ago
same for me its working when i refresh railway it starts working but then again it goes off
2 months ago
Same here ! WTF ?? This affects our log services, pls fix support !
2 months ago
Same issue here.
2 months ago
Hello!
We're acknowledging your issue and attaching a ticket to this thread.
We don't have an ETA for it, but, our engineering team will take a look and you will be updated as we update the ticket.
Please reply to this thread if you have any questions!
2 months ago
Hi folks, to share an update - our IPs were blocked but youca use the workaround steps from alpacco (a fellow community member) here or one of our team members spent some time trying to get this experience as one click as possible.
We now have a one-click deploy that uses CF Workers to set up a proxy to allow you to proxy requests to get around the connection issue.
https://railway.com/deploy/tg-cloudflare-worker-proxy-workaround?referralCode=N8f7Nb&utm_medium=integration&utm_source=template&utm_campaign=generic
2 months ago
Hi - we never heard back from Telegram, but as far as we can see our addresses are no longer blocked. It is possible you could see infrequent occasional impacts due to rate limiting. Please let us know if you are still encountering the issue.

