Question

how can i access mongodb from remote system

Posted May 18, 2021 300 views
MongoDBDatabasesUbuntu 20.04

i have server and i installed mongodb on my server( server localhost mongodb)
and i want to access that local database on server from my windows machine how can i access

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi @vasurangpariya

To Access MongoDB from a remote system, In the /etc/mongod.conf configuration file you should be adding the IP address of the localhost server where you have installed MongoDB in bindIP.

# network interfaces
net:
  port: 27017
  bindIp: 127.0.0.1,mongodb_server_ip

Please check our article to Configure Remote Access for MongoDB which will provide you more understanding.

https://www.digitalocean.com/community/tutorials/how-to-configure-remote-access-for-mongodb-on-ubuntu-20-04

Regards,
Rajkishore

by Mark Drake
This tutorial walks you through configuring a MongoDB installation to securely allow access from a trusted remote computer. This will involve updating your firewall rules to provide the remote server access to MongoDB's default port and changing Mongo's configuration file to update its IP binding setting.