Paramclasses Academy - Blog

Tutorials Details

←
Post 5 of 35
→

How to Install MongoDB Community Server on Windows: Step-by-Step Guide

How to Install MongoDB Community Server on Windows: Step-by-Step Guide

November 5, 2026

❖ Welcome to Param Classes!

MongoDB is a popular NoSQL database used in modern web applications, mobile applications and backend development. Before working with MongoDB commands, collections and documents, you need to install MongoDB on your computer.

If you are using Windows 10 or Windows 11, you can install MongoDB Community Server and start learning database development on your local computer.

In this practical tutorial, we will learn how to download MongoDB Community Server, install it on Windows, configure the MongoDB service, install MongoDB Shell (mongosh) and execute our first database commands.

✦ 1. What Is MongoDB Community Server?

MongoDB Community Server is the free, self-managed edition of MongoDB.

It allows developers and students to install MongoDB on their own computers and practice database operations without needing a cloud database.

With MongoDB Community Server, you can:

  • Create databases and collections.

  • Insert and retrieve documents.

  • Update and delete records.

  • Run MongoDB queries.

  • Practice aggregation operations.

  • Develop database-driven applications.

For beginners, MongoDB Community Server is a good way to understand how a NoSQL database works.

✦ 2. System Requirements Before Installation

Before installing MongoDB, check that your Windows computer meets the requirements of the MongoDB version you plan to install.

Keep these things ready:

  • Windows operating system supported by the selected MongoDB release.

  • Administrator permission for installation.

  • Sufficient free disk space.

  • Stable internet connection for downloading the installer.

  • A supported 64-bit Windows environment.

Important: Always check the current MongoDB documentation for supported Windows versions and hardware requirements before installation.

Official Download Page:

https://www.mongodb.com/try/download/community

✦ 3. Download MongoDB Community Server on Windows

Follow these steps to download the MongoDB installer.

❖ Step 1: Open the Official MongoDB Website

Open your web browser and visit:

https://www.mongodb.com/try/download/community

This is the official MongoDB Community Server download page.

❖ Step 2: Select the Download Options

On the download page, select:

  • Version: Choose the current stable release.

  • Platform: Windows.

  • Package: MSI.

The MSI package is a Windows installer that guides you through the installation process.

❖ Step 3: Download the Installer

Click the Download button.

After the download finishes, open your Downloads folder and locate the MongoDB MSI setup file.

✦ 4. Install MongoDB Community Server

Now let's install MongoDB on Windows.

❖ Step 1: Start the Setup

Double-click the downloaded MSI file.

If Windows asks for permission, allow the installer to make changes.

Click Next to continue.

❖ Step 2: Accept the License Agreement

Read the license agreement and select the option to accept the terms.

Click Next.

❖ Step 3: Select Setup Type

Choose Complete installation.

This installs the standard MongoDB Server components in the installer-selected location.

Click Next.

❖ Step 4: Configure MongoDB as a Windows Service

You may see an option to install MongoDB as a Windows service.

Keep the service installation option enabled.

A Windows service allows MongoDB Server to run in the background without manually starting the server every time.

The installer may offer options for the service account and data and log directories. For a beginner's local setup, you can generally use the installer defaults.

Click Next.

❖ Step 5: Install MongoDB Compass (Optional)

MongoDB Compass is a graphical user interface for viewing databases, collections and documents.

If the installer provides an option to install MongoDB Compass, you can select it.

Compass is useful for beginners because it allows you to explore MongoDB visually.

Click Next, then click Install.

❖ Step 6: Finish Installation

Wait until the installation process is completed.

Click Finish to close the setup wizard.

MongoDB Community Server is now installed on your Windows computer.

✦ 5. Check MongoDB Installation

After installation, verify that MongoDB Server is available.

❖ Step 1: Open Command Prompt

Press:

Windows + R

Type:

cmd

Press Enter.

❖ Step 2: Check MongoDB Version

Run:

mongod --version

If MongoDB Server is correctly installed and its executable is available through PATH, you should see version information.

The mongod command starts the MongoDB server process when used without the version option.

Note: If Windows displays an error saying that mongod is not recognized, MongoDB's bin directory may not be added to your PATH environment variable.

✦ 6. Add MongoDB to the Windows PATH Variable

If you cannot run mongod from Command Prompt, add the MongoDB bin directory to PATH.

❖ Step 1: Find the MongoDB Installation Folder

A typical installation path looks like this:

C:\Program Files\MongoDB\Server\<version>\bin

Replace <version> with the actual installed version folder on your computer.

❖ Step 2: Open Environment Variables

  1. Open the Windows Start menu.

  2. Search for Environment Variables.

  3. Select Edit the system environment variables.

  4. Click Environment Variables.

  5. Under System variables, select Path.

  6. Click Edit.

❖ Step 3: Add the MongoDB Path

Click New and paste the actual MongoDB bin folder path.

For example:

C:\Program Files\MongoDB\Server\<version>\bin

Click OK to save the changes in all open windows.

Close Command Prompt and open a new one.

Now try:

mongod --version

✦ 7. Install MongoDB Shell (mongosh)

MongoDB Shell, also known as mongosh, is a command-line interface used to connect to MongoDB and execute database commands.

It is distributed separately from MongoDB Community Server in current installation workflows, so check whether it is already installed on your computer.

❖ Step 1: Download MongoDB Shell

Visit the official download page:

https://www.mongodb.com/try/download/shell

Select Windows and download the appropriate installer.

❖ Step 2: Install MongoDB Shell

Open the downloaded installer and follow the installation instructions.

If required, add the MongoDB Shell installation directory to PATH.

❖ Step 3: Verify mongosh

Open a new Command Prompt and run:

mongosh --version

If the version information appears, MongoDB Shell is ready.

✦ 8. Start and Check MongoDB Windows Service

If you installed MongoDB as a Windows service, you can manage it using Windows Services.

❖ Step 1: Open Services

Press:

Windows + R

Type:

services.msc

Press Enter.

❖ Step 2: Find MongoDB Service

Search for a service named:

MongoDB

Check its status.

If the service is stopped, right-click it and select Start.

If it is already running, you do not need to start it again.

❖ Step 3: Connect Using MongoDB Shell

Open Command Prompt and execute:

mongosh

The shell normally connects to a local MongoDB server at the default local connection address if the server is running with its default configuration.

You should now be able to execute MongoDB commands.

✦ 9. Run Your First MongoDB Commands

Congratulations! Your MongoDB environment is ready.

Now execute these beginner-friendly commands.

❖ Check Current Database

db

This displays the current database name.

❖ Create or Switch to a Database

use college

This switches to a database named college. The database is created when data is first stored in it.

❖ Create a Collection

db.createCollection("students")

This creates a collection named students.

❖ Insert Your First Document

db.students.insertOne({
  name: "Rahul Kumar",
  course: "MongoDB",
  city: "Raipur"
})

This command inserts one student document into the collection.

❖ Display All Student Records

db.students.find()

You should see the student document you inserted.

❖ Display Available Collections

show collections

This displays the collections in the current database.

✦ 10. Common MongoDB Installation Errors and Solutions

Beginners may face a few common problems during installation.

❖ Error 1: 'mongod' Is Not Recognized

Reason: MongoDB Server's bin directory is not available through PATH.

Solution: Add the correct MongoDB bin folder to the Windows PATH variable and reopen Command Prompt.

❖ Error 2: 'mongosh' Is Not Recognized

Reason: MongoDB Shell may not be installed, or its installation directory is missing from PATH.

Solution: Install mongosh from the official download page and configure PATH if necessary.

❖ Error 3: MongoDB Service Is Not Running

Reason: The Windows service may be stopped or may have encountered a configuration problem.

Solution: Open services.msc, locate the MongoDB service and try starting it. If it fails, check the configured MongoDB log file for the actual error.

❖ Error 4: Port 27017 Is Already in Use

Reason: Another MongoDB process may already be using the default port.

Solution: Check whether another MongoDB service or process is running. Avoid starting a second server on the same port unless you intentionally configure a different port.

✦ 11. What Should You Learn After Installation?

Once MongoDB Community Server is installed, start practicing these topics:

  1. MongoDB Shell commands.

  2. Creating databases and collections.

  3. Insert and find operations.

  4. Update and delete operations.

  5. MongoDB query operators.

  6. MongoDB Compass.

  7. MongoDB Atlas cloud database.

At Param Classes, we encourage students to learn database concepts through practical commands and real-world projects instead of memorizing definitions.

❖ Conclusion

Installing MongoDB Community Server on Windows is the first practical step toward learning NoSQL database development.

In this tutorial, we covered downloading the MongoDB MSI installer, installing MongoDB Server, configuring the Windows service, setting up MongoDB Shell, checking the installation and executing our first database commands.

Now your local MongoDB environment is ready for practice. Continue learning by creating collections, inserting documents and performing database operations.

Learn Today, Grow Tomorrow!

←
Post 5 of 35
→