Docker Mongodb and Robo3t

Posted October 29, 2020 1.7k views

Hello everybody,
I transfer my question here with the hope someone will be able to help me:

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


In order to be able to connect to the MongoDB container from the outside world, you would need to make sure that you’ve exposed the Mongo DB port:

docker run -d --name mongo-container -p 27888:27017 -e MONGO_INITDB_ROOT_USERNAME=mongoadmin -e MONGO_INITDB_ROOT_PASSWORD=secret mongo

Alternatively, DigitalOcean now offers Managed MonogDB database clusters:

This is a great option in case that you are looking for a hassle-free MongoDB solution.