Create, manage, and automate MongoDB Atlas Local resources from docker
5M+
Create, manage, and automate MongoDB Atlas Local resources with Docker
This is the Docker image for the MongoDB Atlas Local experience. MongoDB Atlas Local provides a full deployment of both MongoDB (mongod) and MongoDB Search (mongot) as a single node replica set, so you can build applications with MongoDB, and make use of features like Atlas Search and Atlas Vector Search straight away, and throughout the entire software development lifecycle.
docker pull mongodb/mongodb-atlas-local
docker run -p 27017:27017 --name atlas-local mongodb/mongodb-atlas-local
mongosh "mongodb://localhost/?directConnection=true"
The Atlas CLI provides a guided setup that can also be used in programmatic workflows. Follow these instructions to Create a Local Atlas deployment using the Atlas CLI.
The MongoDB MCP Server provides Model Context Protocol tools that let you interact with Atlas Local deployments from MCP-enabled clients such as VS Code, Cursor, and Claude Desktop. Follow this guide to Get Started with the MongoDB MCP Server.
Docker Compose offers a repeatable way for other contributors to set up full MongoDB environments in a reliable way (including healthchecks and initializing with data). Follow the Complete Guide to Deploying MongoDB Atlas Local with Docker Compose available from the official MongoDB documentation.
There are four fundamental supported tags:
latest tracks the latest stable release of MongoDBpreview tracks the latest stable release of MongoDB, but with new experimental features8.0 tracks the latest 8.0 version of MongoDB7.0 tracks the latest 7.0 version of MongoDBTo pin a specific version of MongoDB, we provide tags for every build, with tags formatted as <major>.<minor>.<patch>-<timestamp>, for example: 8.0.17-20260218T161908Z. You can view all available tags here.
The preview tag makes new experimental features available in Atlas Local.
Note: The
previewtag only supports the latest version of MongoDB.
VOYAGE_API_KEY.The following should be considered when using this image:
ai.mongodb.com.
To set up authentication for your local deployment, specify the following environment variables:
MONGODB_INITDB_ROOT_USERNAME: The username for the root user.MONGODB_INITDB_ROOT_PASSWORD: The password for the root user.You may also set it via filename mappings for an extra layer of security. Specify the following environment variables:
MONGODB_INITDB_ROOT_USERNAME_FILE: The path to the file containing the username for the root user.MONGODB_INITDB_ROOT_PASSWORD_FILE: The path to the file containing the password for the root user.Map a volume to /docker-entrypoint-initdb.d containing .sh or .js files, they will be executed in alphabetical order.
The default db connected will be test unless the environment variable MONGODB_INITDB_DATABASE is set.
You can use $CONNECTION_STRING as the URI for connecting to databases in your init scripts, as it holds the default connection string for the database.
To automatically load the MongoDB sample dataset during initialization, set the MONGODB_LOAD_SAMPLE_DATA environment variable to true.
By default we only redirect mongod logs to stdout and stderr. You can set the extra environment variables to enable more logging:
MONGOT_LOG_FILE: The path to the file where you want to store the logs of Atlas Search (mongot).RUNNER_LOG_FILE: The path to the file where you want to store the logs of runner.Note: both of these variables can be set to /dev/stdout or /dev/stderr for convenience.
The image automatically runs a healthcheck every 30s to verify that mongod and mongot are healthy and that seeding scripts have successfully completed.
To programmatically wait for a healthy status of the container:
while [ "`docker inspect -f {{.State.Health.Status}} atlas-local`" != "healthy" ]; do sleep 2; done
depends_on:
atlas-local
condition: service_healthy
This image collects anonymous telemetry data to help us improve the product and to provide you with a better user experience. The data collected includes:
All telemetry is associated with an anonymous deployment UUID. No customer data, database names, or personally identifiable information is collected.
You can opt out of telemetry by setting the DO_NOT_TRACK environment variable to 1. For example:
docker run -e DO_NOT_TRACK=1 -p 27017:27017 --name atlas-local mongodb/mongodb-atlas-local
The specific licenses depend on which Atlas Local image is used. To check the license of a currently running Atlas Local instance, run the following commands:
docker exec atlas-local ls -Rp /usr/share/licenses/mongodb/docker exec atlas-local cat /usr/share/licenses/mongodb/LICENSE.txtdocker exec atlas-local cat /usr/share/licenses/mongodb/mongot/LICENSE.txtdocker exec atlas-local cat /usr/share/licenses/mongodb/server/LICENSE-Community.txtdocker exec atlas-local cat /usr/share/licenses/mongodb/runner/LICENSE.txtFor more information, see Create a Local Atlas Deployment with Docker.
Content type
Image
Digest
sha256:f087be4a1…
Size
652.8 MB
Last updated
3 days ago
docker pull mongodb/mongodb-atlas-local:8.2.5-20260428T143736ZPulls:
263,973
Last week