How to access MongoDB running in a container on Raspberry Pi from my PC?

Viewed 202

On a Raspberry Pi I am running Docker with the help of Portainer. In a Docker container I am running MongoDB. I can't figure out which credentials I have to use when I want to access MongoDB from MongoDB Compass on my pc. Can you help me configuring the url to access MongoDB?

Within Portainer I can see that MongoDB is connecting to: mongodb://127.0.0.1:27017/ Portainer I can access via my PC with url: http://raspberrypi.local:9000/

Thank you in advance!

1 Answers

The most popular MongoDB GUI interface is MongoExpress which is also on the Docker Hub. It's one of the most popular downloads. Do the same that you did with MongoDB and install a container for MongoExpress. MongoExpress gives you a web interface to be able to access MongoDB.

Just FYI. If you're a developer and utilize VSCode; VSCode has an awesome GUI extension for MongoDB as well.

Related