4 / 4
Mar 31

I’ve set up an Atlas deployment on a remote server using this tutorial: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-deploy-docker/

Now I would like to connect to it using Compass on my local machine, however get a connection refused error. I’ve read that this might be due to my local IP address is not whitelisted in the Atlas deployment, however could not find any information on how to whitelist an IP address in dockerized atlas deployment.

Would really appreciate any help with that. Thanks

Hi Evgenii, welcome to the community forums!

Assuming you followed the docs precisely, your mongodb instance will accessible from your machine using this connection string: mongodb://localhost:27017/?directConnection=true

Check the Compass Documentation for specific step by step instructions.

Let us know how you make out.

Regards,
Mike

Alright, so I figured it out. Had to connect to mongosh on a remote server via atlas cli and execute db.getMongo() and then change the localhost to server ip

I can access atlas on my local machine with no problems. However when I deploy it on a remote server and try to connect to it from a local Compass using a connect string like mongodb://my-remote-server-domain.com:27017/?directConnection=true I run into a connection refused error.