# Unable to connect MongoDB ("Could not connect to any servers in your MongoDB Atlas cluster")

**URL:** <https://community.fly.io/t/unable-to-connect-mongodb-could-not-connect-to-any-servers-in-your-mongodb-atlas-cluster/26420>\
**Category:** General\
**Tags:** databases, login-only\
**Created:** [November 9, 2025, 5:37pm UTC](https://community.fly.io/t/unable-to-connect-mongodb-could-not-connect-to-any-servers-in-your-mongodb-atlas-cluster/26420 "2025-11-09T17:37:40Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mayailurus](https://sea1.discourse-cdn.com/fly1/user_avatar/community.fly.io/mayailurus/32/17593_2.png) [@mayailurus](https://community.fly.io/u/mayailurus)\
**Post date:** [November 9, 2025, 6:14pm UTC](https://community.fly.io/t/unable-to-connect-mongodb-could-not-connect-to-any-servers-in-your-mongodb-atlas-cluster/26420/2 "2025-11-09T18:14:47Z")

</div>

> [@jitendra](#):
>
> One common reason is that you’re trying to access the database from an IP that isn’t whitelisted.

Hi… Generally, you would need a [static egress IP](https://community.fly.io/t/static-egress-ips-for-machines/22004) for such external services. Try checking `fly machine egress-ip list` for each of your Machines and verify that those addresses are in fact all on the whitelist.

* * *

Aside: You can use the `</>` button in the forum editor’s toolbar to get an area suitable for pasting code, logs, etc.

---

_[View the full topic](https://community.fly.io/t/unable-to-connect-mongodb-could-not-connect-to-any-servers-in-your-mongodb-atlas-cluster/26420)._
