Skip to content
mongodb://root:your-root-password@localhost:27017

MongoDB community Edition

mongo - Official Image | Docker Hub

  • https://hub.docker.com/_/mongo/

Environment Variables

MONGO_INITDB_ROOT_USERNAME, MONGO_INITDB_ROOT_PASSWORD

These variables, used in conjunction, create a new user and set that user's password. This user is created in the admin authentication database and given the role of root, which is a "superuser" role.