What IP needed acces to connect railway to database.
reioven
HOBBYOP

2 months ago

Im using mongodb atlas, what is the IP i need to allow access to, so i could connect it to the database without putting 0.0.0.0 etc.

$5 Bounty

3 Replies

Railway
BOT

2 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


samimwebdev
HOBBY

2 months ago

Asy you are on the Hobby plan, you won't be able to get the outbound Ip to paste on MongoDB Atlas(It's only available on pro plan)
If you upgrade to pro plan, you can enable Static Outbound IPs for any service.

  1. Navigate to the Settings tab of your desired service (Usually on the backend Service you want to connect the Database)

  2. Toggle Enable Static IPs in the Networking section of Settings

  3. You will be presented with an IPv4 address which is tied to the region your service is deployed in

  4. You have to copy paste the outbound IP on your MongoDB Atlas Service

    Go to MongoDB Atlas → Network Access

    Click Add IP Address → Paste that IP → Save

    For Free option you can use
    Use Publicly Accessible IP 0.0.0.0/0 (Your Database can be accessed from any machine/server/service, less secure then the above option)


samimwebdev
HOBBY

2 months ago

Have you tried it? is it solved?


Loading...