banco-de-dados – Is it possible to create a remote server with MongoDB? in what way?


My question, to be clearer, is to create a server with mongodb in a cloud hosting (for example) and access it through another server.

Example: I have a mobile app. I hosted my mongoDB on cloud hosting (ubuntu). I want to connect my app to db on cloud server.

Is this possible? in what way?

I'm starting this apprenticeship and my question was precisely to create a server with MongoDB in a way that I could access it remotely. Outside of "localhost", you see? Unlike all the tutorials I've seen.


Disregarding firewall and security issues, the logic for remotely connecting a MongoDB to a MySQL, for example, is the same.

In your terminal, in turn, you will use the following fragment to make the connection:


If the IP or server address is available and within the compliant, the connection will be successful.

In other words, you will raise the database on your cloud that is running fancifully over the IP . So, to access this "driver", you only need to point the access to . For example:


Technically speaking, if you have an application, it will use this IP address to indicate where the bank is located.

Scroll to Top