This guide provides a step-by-step manual for MongoDB installation and setup on Windows 10, Windows 11, and Mac. Whether you're a developer or a beginner, follow these instructions to get MongoDB running on your system in 2025.
.msi
file to launch the installer.PATH
:
Path
variable and add the MongoDB bin
directory (e.g., C:\Program Files\MongoDB\Server\6.0\bin
)mongod
mongo
Tip: For production, run MongoDB as a Windows service (select this option during installation).
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew tap mongodb/brew
brew install mongodb-community@6.0
brew services start mongodb-community@6.0
mongo
Tip: You can stop MongoDB with brew services stop mongodb-community@6.0
.
mongo --version
and mongod --version
C:\data\db
(Windows) or /data/db
(Mac). Create this directory if it doesn't exist.brew uninstall mongodb-community@6.0
.
C:\Program Files\MongoDB\Server\6.0\
/usr/local/Cellar/mongodb-community/
--dbpath
option when starting mongod
, e.g., mongod --dbpath C:\my\data\dir
MongoDB is easy to install and set up on both Windows and Mac. Follow the steps above to get started with your NoSQL database in 2025. For more advanced configuration, see the official MongoDB documentation.