I’m hosting my backend code on Railway, and using MongoDB Atlas to store my data.
For development I had my local IP address whitelisted. But now when my backend has been deployed and I went to make it public, it can’t connect to my Atlas cluster because it is making the request from a different IP address that isn’t whitelisted.
I can make my cluster be open to be accessed from any IP but I don’t want that.
When it comes to Railway, I can’t understand where do I find the IP address that I need to whitelist on Railway?
2
Answers
Is this for https://railway.app ? I am not too familiar with it but based off the help page / common questions https://railway.app/help , it states the following:
Have you tried contacting Railway support or similar to find out the information regarding the IP addresses? Maybe they’re on a particular range that you could add to your network access list in Atlas instead of allowing all IP addresses.
I have the same problem, I cannot found any specific docs, but if you add to your whilest the ip ‘0.0.0.0’ is works good.
I used some info to achieve that from:
https://docs.railway.app/deploy/exposing-your-app
https://www.mongodb.com/docs/atlas/security/ip-access-list/