How to Install MongoDB (Website and Homebrew) and Understand mongod vs mongo
Learn how to install MongoDB from the official website and Homebrew, then understand the difference between mongod (server daemon) and mongo/mongosh (client shell).
May 28, 2026
How to Install MongoDB (Website and Homebrew) and Understand mongod vs mongo
MongoDB is easy to start with, but many beginners get confused about what gets installed and which command does what.
In this guide, we will cover:
Installing MongoDB from the official website
Installing MongoDB using Homebrew (macOS)
What mongod is (the database server/daemon)
What mongo is (the shell client)
Typical first-run workflow
1) Install MongoDB from the Official Website
Installing from the MongoDB website is useful when you want full control over version and setup.
mongod is the MongoDB server process (daemon).
It is the actual database engine that:
Listens for incoming connections
Reads/writes data files
Handles indexes, queries, and replication
Manages storage engine behavior (WiredTiger by default)
Think of mongod as: "the database itself running in the background."
Example (manual start):
mongod --dbpath /usr/local/var/mongodb
When started through Homebrew services, this process runs automatically in the background.
4) What is mongo?
mongo is the legacy command-line shell client used to connect to a running MongoDB server.
You can think of it as:
mongod = server
mongo = client shell that talks to server
In newer MongoDB releases, the modern shell is mongosh, which replaces mongo in many setups.
Example connection:
mongosh
or
mongosh "mongodb://localhost:27017"
5) How they work together
A simple mental model:
Start the server (mongod)
Connect with shell/client (mongo or mongosh)
Run database commands (create DB, collections, queries, inserts)
If mongod is not running, your client cannot connect.
6) Quick first-run checklist
Install MongoDB (website or Homebrew)
Confirm mongod --version
Start MongoDB server/service
Connect using mongosh
Run a test command:
show dbs
Final note
For modern development, prefer mongosh over the old mongo shell, but conceptually the server-client split is the same:
mongod runs the database, and the client tool connects to it.
How to Install MongoDB (Website and Homebrew) and Understand mongod vs mongo — Visakh Vijayan