Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I installed MongoDB to run as a Windows Service on Win 7 and everything runs well. However, when I attempt to use the command --directoryperdb, it does not recognize this command.

Does anyone know how to resolve this issue?

share|improve this question

migrated from Apr 27 '10 at 1:44

This question came from our site for professional and enthusiast programmers.

Is this still a problem? I've been using mongo on Windows with or without this switch, and its not been a problem. Also, as of 1.6.0, logging works when mongo is run as a windows service. Therefore, you will have an error message to work with. – Justin Dearing Sep 1 '10 at 18:01

A couple of issues which come to mind that may or may not help you:

  • Are you using 1.3.2 or later?

    Specify use of an alternative directory structure, in which files for each database are kept in a unique directory. (since 1.3.2)


  • Does it work without this argument as a service, and/or with the argument whilst not running as a service? Have you checked permissions for the user the service is running under?

  • Are you/have you tried running the same thing but by specifying the arguments using a config file instead?
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.