MongoDB is a cross-platform document-oriented database program, and it is classified as a NoSQL database program. It was initially released on 11 February 2009 by MongoDB Inc. Here we will discuss how to install and setup MongoDB on Windows 11. You can also check our guide on; what is the MERN Stack?
First of all, let us download MongoDB. To download it visit mongodb.com and click on “Products“. Now download the “MongoDB Community Server” edition. Or else, you can directly click this link to download MongoDB for Windows operating system.
How to Install MongoDB on Windows 11
Once the download is complete, follow the steps mentioned below; to install MongoDB on Windows 11. If you are using Windows 7 or Windows 8.1, then also the steps are the same.
Step 1: Open the MongoDB installer file and click “Next” to continue the installation process.

Step 2: After that, accept the end user license agreement. Then click on the “Next” button to continue.

Step 3: On the next window, choose the setup type as “Complete” and keep everything to default.

Step 4: Now confirm the service you want to install. Choose “Install MongoD as a Service” and “Run service as Network Service user” from the available choices. Then give your service a name. Its default name is MongoDB. To proceed, press the “Next” button.

Step 5: On the next window, check the box to install MongoDB Compass and click on “Next” to continue. Then click the “Install” button to install MongoDB on Windows 11.

Step 6: After the installation is complete, it will open the MongoDB compass program. Here click on the “Start” button. Now it will ask you to create a new connection. Before that, you need to set up the MongoDB environment variable. For that, follow the below steps.

How to Setup MongoDB on Windows 11
To use MongoDB, we have to set the environment path variable. For that, copy the path of the MongoDB bin folder. Usually, you will get it on your C Drive > Program Files and look for the MongoDB folder and you will get the bin folder inside the MongoDB folder. After that, follow the following steps:
Step 1: Open the MongoDB bin folder and copy the path.

Step 2: Open “Settings” and click on the “System” tab from the left panel. Then, look for an option called “About” and click on that option present to the right of your screen.

Step 3: Now, you will get all your device specifications. Click on the “Advanced system settings” option; to access the “System Properties.”

Step 4: It will open the system properties window. Here click on the “Advanced” tab and select “Environment Variables” to open the environment variables windows.

Step 5: Here you will get two variables option. One is for user variables and the other is for system variables. Here under the system variable section, select the “Path” variable and click on the “Edit” button.

Step 7: Now click on “New” and add the MongoDB installation location. After that, click on “OK” to save the changes.

Step 8: Now open the “MongoDB Compass” and click on the “New Connection” button. On the URL box enter “Mongodb://localhost:27017
” and then click on the “Connect” button.

Note:- Now, you are ready to use MongoDB. If you want, you can also use MongoDB shell or else you can use the GUI of MongoDB Compass to manage your database.
Conclusion
That’s it; this is how you can install and setup MongoDB on Windows 11. You can also check the list of the 10 most important SQL commands programmers should know.
I hope this article was helpful to you. If you liked the article, share it with your friends. If you have some suggestions or doubts, do not hesitate to leave them in the comments section. We are always there to assist you.