Do you want your ad here?

Contact us to get your ad seen by thousands of users every day!

[email protected]

Run an Atlas Cluster Locally in Minutes

  • August 05, 2025
  • 245 Unique Views
  • 3 min read

Run an Atlas cluster locally in minutes

You no longer need a cloud account to try MongoDB Atlas features. Spin up a fully compatible local cluster in seconds, with no login, no credit card, and no friction.

🕒 Reading time: 2-3 min

🍃 What is the MongoDB Atlas Platform?

MongoDB Atlas is a fully managed, multi-cloud data platform provided by MongoDB Inc. It allows you to deploy and run MongoDB clusters on Amazon Web Services (AWS), Google Cloud Platform (GCP), and Microsoft Azure, with full support for replica sets (for high availability), sharding (for horizontal scalability), and multi-cloud deployments. Atlas handles infrastructure, backups, security, scaling, and monitoring out of the box. It also extends the core MongoDB server capabilities with a set of integrated features.

  • Atlas Search ★: Use full-text indexing built on Apache Lucene.
  • Vector Search ★: Run semantic similarity queries for gen AI use cases.
  • Global clusters: Deploy data close to users across multiple regions or cloud providers.
  • SQL interface: Query data using SQL syntax and JDBC/ODBC-compatible tools.
  • Online archive: Tier cold data automatically from hot storage to lower-cost S3.
  • Atlas Stream Processing: Process real-time event streams directly in the platform.
  • Integrated security: Secure data with fine-grained access control, encryption, and auditing.

★ These features will also be available in upcoming releases of MongoDB Community Edition and MongoDB Enterprise Advanced.

With Atlas CLI, you can now replicate much of that experience locally and interact through mongosh - without needing a cloud account. It’s ideal for development, testing, and workshops running entirely on your machine.

🔧 What is Atlas CLI?
Atlas CLI is the official command-line tool for managing MongoDB Atlas clusters. While it’s commonly used to create and manage cloud MongoDB environments, it now also supports running fully local clusters that behave like real Atlas clusters. This makes it a perfect tool for local development, workshops, testing, or experimenting with new MongoDB 8.0 features offline.

💻 What is mongosh?
mongosh is the official MongoDB shell, used to interact with MongoDB deployments from the command line. It is built on Node.js and uses JavaScript as its execution language. As a modern replacement for the legacy mongo shell, it provides a richer developer experience with syntax highlighting, autocompletion, support for ECMAScript features, and asynchronous operations using promises or async/await.

You can use mongosh to run queries, inspect and modify data, run aggregation pipelines, manage indexes, and explore features such as full-text search and vector search, whether you're connected to a local or cloud deployment.

📦 Installing Atlas CLI and mongosh

On macOS, you can install Atlas CLI and mongosh using Homebrew:

brew tap mongodb/brew
brew install mongodb-atlas
brew install mongosh

On Linux, installation is just as simple:

curl -s https://mongodb.dev/cli | bash

🚀 Creating a Local Atlas Deployment
Atlas CLI uses Docker internally to create local MongoDB environments that replicate the Atlas runtime. Before running the Atlas deployments setup, ensure that Docker is installed and the Docker daemon is active. Without it, local deployments won’t work.

Once Docker is running, launch the interactive setup:

atlas deployments setup

Choose the local option, accept the defaults, and specify a port (e.g., 27017). The CLI will spin up a containerized MongoDB 8.0 replica set with Atlas-compatible features. Now you can list active deployments:

atlas deployments list
NAME       TYPE    MDB VER   STATE
local813   LOCAL   8.0.11    IDLE

🔗 Connecting to the Deployment

To connect to your local deployment, simply run:

atlas deployments connect

You’ll be prompted to choose how you want to connect. For example:

? How would you like to connect to local813?
> mongosh - MongoDB Shell
 compass - MongoDB Compass
 vscode - MongoDB for VSCode
 connectionString - Connection String

Selecting mongosh will launch an interactive session connected to your local MongoDB replica set. You can now run queries, create indexes, test aggregations, or explore features like MongoDB Atlas Search and Vector Search.

AtlasLocalDev local813 [direct: primary] test> show dbs
admin   256.00 KiB 
config  232.00 KiB 
local   588.00 KiB
AtlasLocalDev local813 [direct: primary] test> 

⚙️ Managing the Deployment

Pause the deployment:

atlas deployments pause

Start the deployment:

atlas deployments start

View logs:

atlas deployments logs

Delete the deployment:

atlas deployments delete

Each command will prompt you to select a deployment if none is specified.

📙 What’s Next?
Want to learn how MongoDB Atlas Search and Vector Search work in a local environment? That’s exactly what the next issue will cover.

📘 More Tips Like This
Want more hands-on examples, best practices, and deep dives into MongoDB 8.0 and the Atlas platform? Check out 👉 MongoDB in Action: Building on the Atlas Data Platform. Published by Manning Publications Co.

Do you want your ad here?

Contact us to get your ad seen by thousands of users every day!

[email protected]

Comments (0)

Highlight your code snippets using [code lang="language name"] shortcode. Just insert your code between opening and closing tag: [code lang="java"] code [/code]. Or specify another language.

No comments yet. Be the first.

Subscribe to foojay updates:

https://foojay.io/feed/
Copied to the clipboard