By Viet Tran
SSH tunneling is great way to connect to MongoDB running on Droplet from local machine and work on local machine but I don’t know how to connect to MongoDB Droplet from AWS or from anywhere app.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
Connecting over an SSH Tunnel is probably the most secure means of connecting, though you also have the option of opening remote connections to the MongoDB instance.
In /etc/mongod.conf there’s a directive named bind_ip which you can set to the IP of the Droplet (and then restart MongoDB). I would, however, recommend ensuring that you’ve setup a firewall and are only allowing access to a limited number of IP’s if you go that route.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.