.\" Man page generated from reStructuredText. . .TH "MONGOD" "1" "March 18, 2014" "2.6" "mongodb-manual" .SH NAME mongod \- MongoDB Server . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .SH SYNOPSIS .sp \fBmongod\fP is the primary daemon process for the MongoDB system. It handles data requests, manages data format, and performs background management operations. .sp This document provides a complete overview of all command line options for \fBmongod\fP\&. These options are primarily useful for testing purposes. In common operation, use the \fBconfiguration file options\fP to control the behavior of your database, which is fully capable of all operations described below. .SH OPTIONS .SS Core Options .INDENT 0.0 .TP .B mongod .UNINDENT .INDENT 0.0 .TP .B \-\-help, \-h Returns information on \fBmongod\fP options and usage. .UNINDENT .INDENT 0.0 .TP .B \-\-version Returns the \fBmongod\fP release number. .UNINDENT .INDENT 0.0 .TP .B \-\-config , \-f Specifies a configuration file for runtime configuration options. The configuration file is the preferred method for runtime configuration of \fBmongod\fP\&. The options are equivalent to the command\-line configuration options. See http://docs.mongodb.org/manual/reference/configuration\-options for more information. .sp Ensure the configuration file uses ASCII encoding. \fBmongod\fP does not support configuration files with non\-ASCII encoding, including UTF\-8. .UNINDENT .INDENT 0.0 .TP .B \-\-verbose, \-v Increases the amount of internal reporting returned on standard output or in log files. Increase the verbosity with the \fB\-v\fP form by including the option multiple times, (e.g. \fB\-vvvvv\fP\&.) .UNINDENT .INDENT 0.0 .TP .B \-\-quiet Runs \fBmongod\fP in a quiet mode that attempts to limit the amount of output. This option suppresses: .INDENT 7.0 .IP \(bu 2 output from \fIdatabase commands\fP .IP \(bu 2 replication activity .IP \(bu 2 connection accepted events .IP \(bu 2 connection closed events .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-\-port Specifies the port number when the MongoDB instance is not running on the standard port of \fB27017\fP\&. You may also specify the port number using the \fB\-\-host\fP option. .UNINDENT .INDENT 0.0 .TP .B \-\-bind_ip Specifies the IP address that the \fBmongod\fP process binds to and listens for connections on. By default \fBmongod\fP listens for connections for all interfaces. You may attach \fBmongod\fP to any interface. When attaching \fBmongod\fP to a publicly accessible interface, ensure that you have implemented proper authentication and firewall restrictions to protect the integrity of your database. .UNINDENT .INDENT 0.0 .TP .B \-\-maxConns Specifies the maximum number of simultaneous connections that \fBmongod\fP will accept. This setting has no effect if it is higher than your operating system\(aqs configured maximum connection tracking threshold. .sp Changed in version 2.6: MongoDB removed the upward limit on the \fBmaxConns\fP setting. .UNINDENT .INDENT 0.0 .TP .B \-\-syslog Sends all logging output to the host\(aqs \fIsyslog\fP system rather than to standard output or a log file as with \fI\-\-logpath\fP\&. .sp \fI\-\-syslog\fP is not supported on Windows. .UNINDENT .INDENT 0.0 .TP .B \-\-syslogFacility Specifies the facility level used when logging messages to syslog. The default is \fBuser\fP\&. The value you specify must be supported by your operating system\(aqs implementation of syslog. To use this option, you must enable the \fI\-\-syslog\fP option. .UNINDENT .INDENT 0.0 .TP .B \-\-logpath Specifies the path for the log file that holds all diagnostic logging information. .sp Unless specified, \fBmongod\fP will output all log information to the standard output. Additionally, unless you also specify \fI\-\-logappend\fP, the logfile will be overwritten when the process restarts. .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 The behavior of the logging system may change in the near future in response to the \fI\%SERVER\-4499\fP case. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-\-logappend Appends new entries to the end of the logfile when the \fBmongod\fP restarts instead of overwriting the content of the log. .UNINDENT .INDENT 0.0 .TP .B \-\-timeStampFormat Specifies the time format for timestamps in log messages. Specify one of the following values: .TS center; |l|l|. _ T{ Value T} T{ Description T} _ T{ \fBctime\fP T} T{ Displays timestamps as \fBWed Dec 31 18:17:54.811\fP\&. T} _ T{ \fBiso8601\-utc\fP T} T{ Displays timestamps in Coordinated Universal Time (UTC) in the ISO\-8601 format. For example, for New York at the start of the Epoch: \fB1970\-01\-01T00:00:00.000Z\fP T} _ T{ \fBiso8601\-local\fP T} T{ Default value. Displays timestamps in local time in the ISO\-8601 format. For example, for New York at the start of the Epoch: \fB1969\-12\-31T19:00:00.000+0500\fP T} _ .TE .UNINDENT .INDENT 0.0 .TP .B \-\-diaglog Deprecated since version 2.6. .sp \fI\%\-\-diaglog\fP is for internal use and not intended for most users. .sp Creates a very verbose, \fIdiagnostic log\fP for troubleshooting and recording various errors. MongoDB writes these log files in the \fBdbpath\fP directory in a series of files that begin with the string \fBdiaglog\fP and end with the initiation time of the logging as a hex string. .sp The specified value configures the level of verbosity. Possible values, and their impact are as follows. .TS center; |l|l|. _ T{ \fBValue\fP T} T{ \fBSetting\fP T} _ T{ 0 T} T{ off. No logging. T} _ T{ 1 T} T{ Log write operations. T} _ T{ 2 T} T{ Log read operations. T} _ T{ 3 T} T{ Log both read and write operations. T} _ T{ 7 T} T{ Log write and some read operations. T} _ .TE .sp You can use the \fBmongosniff\fP tool to replay this output for investigation. Given a typical diaglog file, located at \fB/data/db/diaglog.4f76a58c\fP, you might use a command in the following form to read these files: .INDENT 7.0 .INDENT 3.5 .sp .nf .ft C mongosniff \-\-source DIAGLOG /data/db/diaglog.4f76a58c .ft P .fi .UNINDENT .UNINDENT .sp \fBWARNING:\fP .INDENT 7.0 .INDENT 3.5 Setting the diagnostic level to \fB0\fP will cause \fBmongod\fP to stop writing data to the \fIdiagnostic log\fP file. However, the \fBmongod\fP instance will continue to keep the file open, even if it is no longer writing data to the file. If you want to rename, move, or delete the diagnostic log you must cleanly shut down the \fBmongod\fP instance before doing so. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-\-traceExceptions For internal diagnostic use only. .UNINDENT .INDENT 0.0 .TP .B \-\-pidfilepath Specifies a file location to hold the "\fIPID\fP" or process ID of the \fBmongod\fP process. Useful for tracking the \fBmongod\fP process in combination with the \fI\-\-fork\fP option. .sp Without a specified \fI\-\-pidfilepath\fP option, \fBmongod\fP creates no PID file. .UNINDENT .INDENT 0.0 .TP .B \-\-keyFile Specifies the path to a key file to store authentication information. This option is used for interprocess authentication among the \fBmongos\fP and \fBmongod\fP instances of a \fIsharded cluster\fP or \fIreplica set\fP\&. .UNINDENT .INDENT 0.0 .TP .B \-\-setParameter New in version 2.4. .sp Specifies an option to configure on startup. Specify multiple options with multiple \fI\-\-setParameter\fP options. See http://docs.mongodb.org/manual/reference/parameters for full documentation of these parameters. The \fBsetParameter\fP database command provides access to many of these parameters. \fI\-\-setParameter\fP supports the following options: .INDENT 7.0 .IP \(bu 2 \fBenableLocalhostAuthBypass\fP .IP \(bu 2 \fBenableTestCommands\fP .IP \(bu 2 \fBjournalCommitInterval\fP .IP \(bu 2 \fBlogLevel\fP .IP \(bu 2 \fBlogUserIds\fP .IP \(bu 2 \fBnotablescan\fP .IP \(bu 2 \fBquiet\fP .IP \(bu 2 \fBreplApplyBatchSize\fP .IP \(bu 2 \fBreplIndexPrefetch\fP .IP \(bu 2 \fBsupportCompatibilityFormPrivilegeDocuments\fP .IP \(bu 2 \fBsyncdelay\fP .IP \(bu 2 \fBtextSearchEnabled\fP .IP \(bu 2 \fBtraceExceptions\fP .IP \(bu 2 \fBsaslauthdPath\fP .IP \(bu 2 \fBauthenticationMechanisms\fP .IP \(bu 2 \fBsslMode\fP .IP \(bu 2 \fBclusterAuthMode\fP .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-\-httpinterface New in version 2.6. .sp Enables the HTTP interface. Enabling the interface can increase network exposure. .sp Leave the HTTP interface \fIdisabled\fP for production deployments. If you \fIdo\fP enable this interface, you should only allow trusted clients to access this port. See \fIsecurity\-firewalls\fP\&. .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 In MongoDB Enterprise, the HTTP Console does not support Kerberos Authentication. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-\-nohttpinterface Deprecated since version 2.6: MongoDB disables the HTTP interface by default. .sp Disables the HTTP interface. .sp Do not use in conjunction with \fI\%\-\-rest\fP or \fI\-\-jsonp\fP\&. .sp \fBNOTE:\fP .INDENT 7.0 .INDENT 3.5 In MongoDB Enterprise, the HTTP Console does not support Kerberos Authentication. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-\-clusterAuthMode