How to start MongoDb server as Windows services

Hi All,

I have downloaded MongoDB and Installed it on my Windows 7 operating system,  I surprise to see that MongoDB  does have option to start as windows services. Is there work around to start the MondoDB as Windows services.

Posted by Andy on 2015-03-28 07:11:14.0


Hi Andy,

Although MongoDB does not give option to start as Windows services. Still, you can start it. There is a sc.exe command available on command prompt. With the help of sc.exe command you can start any executable program from Windows Services. Following is the steps to start the MongoDB server as Windows services.

Solution : How to start MongoDb server as Windows services

c:/>sc.exe create MongoDB binPath="\"D:\mongodb\bin\mongod.exe\" --service --config=\"D:\mongodb\mongod.cfg\"" DisplayName= "MongoDB" start= "auto"


Good Luck !!

Posted by Navdeep on 2015-05-08 18:27:39.0