Docs Home → MongoDB Atlas
Estimated completion time: 10 minutes
Atlas free clusters provide a small-scale development environment to host your data. Free clusters never expire, and provide access to a subset of Atlas features and functionality.
Paid clusters provide full access to Atlas features, configuration options, and operational capabilities. For more information on paid clusters, including deployment instructions, see Create a Cluster.
Note
You can deploy only one free cluster per Atlas project.
You can create free clusters through the Atlas CLI, Atlas User Interface, and Atlas Administration API. Select the appropriate tab based on how you would like to create the free clusters.
Now that your cluster is provisioned, proceed to Add Your Connection IP Address to Your IP Access List.
On this page
- Overview
- Considerations
- Install MongoDB Community Edition
- Run MongoDB Community Edition as a Windows Service
- Run MongoDB Community Edition from the Command Interpreter
- Additional Considerations
Note
MongoDB Atlas
MongoDB Atlas is a hosted MongoDB service option in the cloud which requires no installation overhead and offers a free tier to get started.
Use this tutorial to install MongoDB 6.0 Community Edition on Windows using the default installation wizard.
This tutorial installs MongoDB 6.0 Community Edition. To install a different version of MongoDB Community, use the version drop-down menu in the upper-left corner of this page to select the documentation for that version.
This tutorial installs MongoDB on Windows using the default MSI installation wizard. To install MongoDB using the msiexec.exe
command-line tool instead, see Install MongoDB using msiexec.exe. The msiexec.exe
tool
is useful for system administrators who wish to deploy MongoDB in an unattended fashion using automation.
The MongoDB Shell [mongosh] is not installed with MongoDB Server. You need to follow the mongosh installation instructions to download and install mongosh separately.
MongoDB 6.0 Community Edition supports the following 64-bit versions of Windows on x86_64 architecture:
Windows Server 2019
Windows 10 / Windows Server 2016
MongoDB only supports the 64-bit versions of these platforms.
See Platform Support for more information.
Note
MongoDB is not supported on Windows Subsystem for Linux [WSL]. To run MongoDB on Linux, use a supported Linux system.
Oracle offers experimental support for VirtualBox on Windows hosts where Hyper-V is running. However, Microsoft does not support VirtualBox on Hyper-V.
Disable Hyper-V if you want to install MongoDB on Windows using VirtualBox.
Before deploying MongoDB in a production environment, consider the Production Notes document which offers performance considerations and configuration recommendations for production MongoDB deployments.
Follow these steps to install MongoDB Community Edition using the MongoDB Installer wizard. The installation process installs both the MongoDB binaries as well as the default configuration file \bin\mongod.cfg
.
Download
the MongoDB Community ➤ MongoDB Download Center In the Version dropdown, select the version of MongoDB to download. In the Platform dropdown, select Windows. In the Package dropdown, select msi. Click Download. For example, from the Windows Explorer/File Explorer: Go to the directory where you downloaded the MongoDB installer [ Double-click the The wizard steps you through the installation of MongoDB and MongoDB Compass. Starting in MongoDB 4.0, you can set up MongoDB as a Windows service during the install or just
install the binaries. When ready, click Install..msi
installer from the following link:.msi
file]. By default, this is your Downloads
directory..msi
file.
The .msi
installer does not include
mongosh. Follow the mongosh installation instructions to download and install the shell separately.
The MongoDB service starts upon successful installation. Configure the MongoDB instance with the configuration file \bin\mongod.cfg
.
If you only installed the executables and did not install MongoDB as a Windows service, you must manually start the MongoDB instance.
See Run MongoDB Community Edition from the Command Interpreter for instructions to start a MongoDB instance.
Starting in version 4.0, you can install and configure
MongoDB as a Windows Service during installation. The MongoDB service starts upon successful installation. Configure the MongoDB instance with the configuration file \bin\mongod.cfg
.
If you have not already done so, follow the mongosh installation instructions to download and install the MongoDB Shell [mongosh].
Be sure to add the path to your mongosh.exe
binary to your PATH
environment variable during installation.
Open a new Command Interpreter and enter mongosh.exe
to connect to MongoDB.
For more information on connecting to a
mongod
using mongosh.exe, such as connecting to a MongoDB instance running on a different host and/or port, see Connect to a
Deployment.
For information on CRUD [Create, Read, Update, Delete] operations, see:
Insert Documents
Query Documents
Update Documents
Delete Documents
To start/restart the MongoDB service, use the Services console:
From the Services console, locate the MongoDB service.
Right-click on the MongoDB service and click Start.
To stop/pause the MongoDB service, use the Services console:
From the Services console, locate the MongoDB service.
Right-click on the MongoDB service and click Stop [or Pause].
To remove the MongoDB service, first use the Services console to stop the service. Then open a Windows command prompt/interpreter [cmd.exe
] as an Administrator, and
run the following command:
You can run MongoDB Community Edition from the Windows command prompt/interpreter [cmd.exe
] instead of as a service.
Open a Windows
command prompt/interpreter [cmd.exe
] as an Administrator.
Important
You must open the command interpreter as an Administrator.
Create the data directory where MongoDB stores data. MongoDB's default data directory path is the absolute path From the Command Interpreter, create the data directories: To start MongoDB, run \data\db
on the drive from which you
start MongoDB.exe
"C:\Program Files\MongoDB\Server\6.0\bin\mongod.exe" --dbpath="c:\data\db"
The --dbpath
option points to your database directory.
If the MongoDB database server is running correctly, the Command Interpreter displays:
[initandlisten] waiting for connections
Important
Depending on the Windows Defender Firewall settings on your Windows host, Windows may display a Security Alert dialog box about
blocking "some features" of C:\Program Files\MongoDB\Server\6.0\bin\mongod.exe
from communicating on networks. To remedy this issue:
Click Private Networks, such as my home or work network.
Click Allow access.
To learn more about security and MongoDB, see the Security Documentation.
By default, MongoDB launches with
bindIp
set to 127.0.0.1
, which binds to the localhost network interface. This means that the mongod.exe
can only accept connections from clients that are running on the same machine. Remote clients will not be able to connect to the mongod.exe
, and the mongod.exe
will not be able to initialize a
replica set unless this value is set to a valid network interface.
This value can be configured either:
in the MongoDB configuration file with
bindIp
, orvia the command-line argument
--bind_ip
Warning
For more information on configuring bindIp
, see IP Binding.
If you installed MongoDB with the Windows installer [.msi
], the .msi
automatically upgrades within its release series [e.g. 4.2.1 to 4.2.2].
Upgrading a full release series [e.g. 4.0 to 4.2] requires a new installation.
If you add C:\Program Files\MongoDB\Server\6.0\bin
to your System PATH
you can omit the full path to the MongoDB Server
binaries. You should also add the path to mongosh if you have not already done so.