Search code examples
mongodbwindows-servicesnosql

How can I run MongoDB as a Windows service?


How can I set up MongoDB so it can run as a Windows service?


Solution

  • I think if you run it with the --install command line switch, it installs it as a Windows Service.

    mongod --install
    

    It might be worth reading this thread first though. There seems to be some problems with relative/absolute paths when the relevant registry key gets written.