What IP needed acces to connect railway to database.
reioven
HOBBYOP
7 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.
3 Replies
Railway
BOT
7 months ago
Hey there! We've found the following might help you get unblocked faster:
- 🧵 Unable to connect to Atlas Cluster
- 🧵 Support dedicated outbound Static IPs for services
- 📚 Static Outbound IPs
If you find the answer from one of these, please let us know by solving the thread!
samimwebdev
HOBBY
7 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.
- Navigate to the Settings tab of your desired service (Usually on the backend Service you want to connect the Database)
- Toggle
Enable Static IPsin the Networking section of Settings - You will be presented with an IPv4 address which is tied to the region your service is deployed in
- 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
7 months ago
Have you tried it? is it solved?