Sitecore and Mongo: How To Install Mongo DB in 5 Minutes

As of Sitecore 7.5, the 'Sitecore Experience Database' was introduced (xDB). The official xDB blurb is that 'xDB collects all your customer interactions from all channel sources in a real-time, big data repository.' In normal terms, it's real time analytics. In order for xDB to run quickly enough without adding an excessive amount of network traffic, Sitecore moved from the classic analytics SQL database and switched to a NoSQL approach, using Mongo. In today's guide, I'm going to quickly run through how to get Mongo up and running.

Get Mongo

The first thing you will need to do is get a copy of Mongo, get your copy here.

Install Mongo

sitecore_mongo_1 When you run the installer, you'll be greeted with the usual welcome screen, click 'Next' sitecore_mongo_2 Agree to the T&C's sitecore_mongo_3 Select 'Complete' installation and then click 'Install'. Mongo will then go off and install all the files you need.

Configuring Mongo

Running Mongo is really easy, all you need to do is run 'mongod.exe' found in the Mongo bin folder. In my example with default locations, this is:
C:\Program Files\MongoDB\Server\3.2\bin
If you try running Mongo directly you should see a 'Data Directoy Not Found error, like so: sitecore_mongo_4 To get around this, you either need to create the default Mongo database location'Data\DB', or, configure Mongo to use a location of your choice. When we work with Sitecore, it is very likely that you will probably be working on more than one site, so splitting your different websites' databases into different folders is highly recommended, so option 2 is recommended. If you go for route 2 then I would recommend creating a batch file to save you some time. The batch file would look something like this:
C:\Program Files\MongoDB\Server\3.2\bin\mongod.exe –dbpath [folder location]

Job Done

After you have created your batch file, get it up and running, load Sitecore and you are now running Sitecore with Mongo!



If you are new to Mongo, I would recommend you have a look at, RoboMongo. The community version is free. sitecore_mongo_5 RoboMongo allows you to view your Mongo indexes and help you test that your connection strings are all set correctly.

Mongo Versions

Depending on which version of Sitecore you use, you will need to be careful which version of Mongo to use. At the time of writing, Sitecore 8, Update 5, supports MongoDB 3.0. Older versions require you to update the Sitecore drivers, or, just use an older version of Mongo 2.6.x.


In today's guide, we've installed and got MongoDb up and running for our different Sitecore environments. Installing Mongo is very quick and easy and you should be up and running within minutes.

submit to reddit

Jon D Jones

Software Architect, Programmer and Technologist Jon Jones is founder and CEO of London-based tech firm Digital Prompt. He has been working in the field for nearly a decade, specializing in new technologies and technical solution research in the web business. A passionate blogger by heart , speaker & consultant from England.. always on the hunt for the next challenge

Back to top