mongod.exe

Synopsis

mongod.exe is the build of the MongoDB daemon(i.e. mongod) for the Windowsplatform. mongod.exe has all of the features ofmongod on Unix-like platforms and is completely compatiblewith the other builds of mongod. In addition,mongod.exe provides several options for interacting withthe Windows platform itself.

This document only references options that are unique tomongod.exe. mongod.exe supports allmongod options except those with documented Windowsincompatibility. See the mongod and theConfiguration File Options documents for more informationon mongod options not listed here.

To install and use mongod.exe, read theInstall MongoDB Community Edition on Windows document.

Options

  • mongod.exe
  • —install
  • Installs mongod.exe as a Windows Service and exits.

If needed, you can install services for multiple instances ofmongod.exe. Install each service with a unique —serviceNameand —serviceDisplayName. Use multiple instances only whensufficient system resources exist and your system design requires it.

  • —remove
  • Removes the mongod.exe Windows Service. If mongod.exe isrunning, this operation will stop and then remove the service.

—remove requires the —serviceName if youconfigured a non-default —serviceName during the—install operation.

  • —reinstall
  • Removes mongod.exe and reinstalls mongod.exeas a Windows Service.
  • —serviceName name
  • Default: MongoDB

Sets the service name of mongod.exe when running as aWindows Service. Use this name with the net start <name> andnet stop <name> operations.

You must use —serviceName in conjunction with eitherthe —install or —remove option.

  • —serviceDisplayName <name>
  • Default: MongoDB

Sets the name listed for MongoDB on the Services administrativeapplication.

  • —serviceDescription <description>
  • Default: MongoDB Server

Sets the mongod.exe service description.

You must use —serviceDescription in conjunction with the—install option.

For descriptions that contain spaces, you must enclose thedescription in quotes.

  • —serviceUser <user>
  • Runs the mongod.exe service in the context of a certain user. Thisuser must have “Log on as a service” privileges.

You must use —serviceUser in conjunction with the—install option.

  • —servicePassword <password>
  • Sets the password for <user> for mongod.exe when running withthe —serviceUser option.

You must use —servicePassword in conjunction with the—install option.