skip to Main Content

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


  1. 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:

    Can I get my workload’s IP Address?

    We don’t provide static IPs at this time. This on our roadmap.

    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.

    Login or Signup to reply.
  2. 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/

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search