mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 09:32:32 +01:00
4388 lines
125 KiB
Groff
4388 lines
125 KiB
Groff
.\" Man page generated from reStructuredText.
|
|
.
|
|
.TH "MONGOD" "1" "Jun 23, 2020" "4.4" "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
|
|
..
|
|
.SS On this page
|
|
.INDENT 0.0
|
|
.IP \(bu 2
|
|
\fI\%Synopsis\fP
|
|
.IP \(bu 2
|
|
\fI\%Options\fP
|
|
.INDENT 2.0
|
|
.IP \(bu 2
|
|
\fI\%Core Options\fP
|
|
.IP \(bu 2
|
|
\fI\%Free Monitoring\fP
|
|
.IP \(bu 2
|
|
\fI\%LDAP Authentication or Authorization Options\fP
|
|
.IP \(bu 2
|
|
\fI\%Storage Options\fP
|
|
.IP \(bu 2
|
|
\fI\%WiredTiger Options\fP
|
|
.IP \(bu 2
|
|
\fI\%Replication Options\fP
|
|
.IP \(bu 2
|
|
\fI\%Sharded Cluster Options\fP
|
|
.IP \(bu 2
|
|
\fI\%TLS Options\fP
|
|
.IP \(bu 2
|
|
\fI\%SSL Options (Deprecated)\fP
|
|
.IP \(bu 2
|
|
\fI\%Profiler Options\fP
|
|
.IP \(bu 2
|
|
\fI\%Audit Options\fP
|
|
.IP \(bu 2
|
|
\fI\%SNMP Options\fP
|
|
.IP \(bu 2
|
|
\fI\%inMemory Options\fP
|
|
.IP \(bu 2
|
|
\fI\%Encryption Key Management Options\fP
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SH SYNOPSIS
|
|
.sp
|
|
\fI\%mongod\fP is the primary daemon process for the MongoDB
|
|
system. It handles data requests, manages data access, and performs
|
|
background management operations.
|
|
.sp
|
|
This document provides a complete overview of all command line options
|
|
for \fI\%mongod\fP\&. These command line options are primarily useful
|
|
for testing: In common operation, use the configuration file
|
|
options to control the behavior of
|
|
your database.
|
|
.sp
|
|
\fBSEE ALSO:\fP
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
conf\-file\-command\-line\-mapping
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
Starting in version 4.0, MongoDB disables support for TLS 1.0
|
|
encryption on systems where TLS 1.1+ is available. For
|
|
more details, see 4.0\-disable\-tls\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SH OPTIONS
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
.IP "Starting in version 4.2"
|
|
.INDENT 0.0
|
|
.IP \(bu 2
|
|
MongoDB deprecates the SSL options and insteads adds new
|
|
corresponding TLS options.
|
|
.IP \(bu 2
|
|
MongoDB adds
|
|
\fI\%\-\-tlsClusterCAFile\fP/\fBnet.tls.clusterCAFile\fP\&. (Also availalbe
|
|
in 3.4.18+, 3.6.9+, 4.0.3+)
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
.IP "Starting in version 4.4"
|
|
.INDENT 0.0
|
|
.IP \(bu 2
|
|
MongoDB removes the \fB\-\-noIndexBuildRetry\fP command\-line option
|
|
and the corresponding \fBstorage.indexBuildRetry\fP option.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SS Core Options
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-help, \-h
|
|
Returns information on the options and use of \fBmongod\fP\&.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-version
|
|
Returns the \fBmongod\fP release number.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-config <filename>, \-f <filename>
|
|
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 /reference/configuration\-options for
|
|
more information.
|
|
.sp
|
|
Ensure the configuration file uses ASCII encoding. The \fBmongod\fP
|
|
instance does not support configuration files with non\-ASCII encoding,
|
|
including UTF\-8.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-configExpand <none|rest|exec>
|
|
\fIDefault\fP: none
|
|
.sp
|
|
New in version 4.2.
|
|
|
|
.sp
|
|
Enables using Expansion Directives
|
|
in configuration files. Expansion directives allow you to set
|
|
externally sourced values for configuration file options.
|
|
.sp
|
|
\fI\%\-\-configExpand\fP supports the following expansion directives:
|
|
.TS
|
|
center;
|
|
|l|l|.
|
|
_
|
|
T{
|
|
Value
|
|
T} T{
|
|
Description
|
|
T}
|
|
_
|
|
T{
|
|
\fBnone\fP
|
|
T} T{
|
|
Default. \fBmongod\fP does not expand expansion directives.
|
|
\fBmongod\fP fails to start if any configuration file settings
|
|
use expansion directives.
|
|
T}
|
|
_
|
|
T{
|
|
\fBrest\fP
|
|
T} T{
|
|
\fBmongod\fP expands \fB__rest\fP expansion directives when
|
|
parsing the configuration file.
|
|
T}
|
|
_
|
|
T{
|
|
\fBexec\fP
|
|
T} T{
|
|
\fBmongod\fP expands \fB__exec\fP expansion directives when
|
|
parsing the configuration file.
|
|
T}
|
|
_
|
|
.TE
|
|
.sp
|
|
You can specify multiple expansion directives as a comma\-separated
|
|
list, e.g. \fBrest, exec\fP\&. If the configuration file contains
|
|
expansion directives not specified to \fI\%\-\-configExpand\fP, the \fBmongod\fP
|
|
returns an error and terminates.
|
|
.sp
|
|
See externally\-sourced\-values for configuration files
|
|
for more information on expansion directives.
|
|
.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\&.)
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Starting in version 4.2, MongoDB includes the Debug verbosity level
|
|
(1\-5) in the log messages\&. For example,
|
|
if the verbosity level is 2, MongoDB logs \fBD2\fP\&. In previous
|
|
versions, MongoDB log messages only specified \fBD\fP for Debug level.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-quiet
|
|
Runs \fBmongod\fP in a quiet mode that attempts to limit the amount
|
|
of output.
|
|
.sp
|
|
This option suppresses:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
output from database commands
|
|
.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 <port>
|
|
\fIDefault\fP:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
27017 if \fI\%mongod\fP is not a shard member or a config server member
|
|
.IP \(bu 2
|
|
27018 if \fI\%mongod\fP is a \fI\%shard member\fP
|
|
.IP \(bu 2
|
|
27019 if \fI\%mongod\fP is a \fI\%config server member\fP
|
|
.UNINDENT
|
|
.sp
|
|
The TCP port on which the MongoDB instance listens for
|
|
client connections.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-bind_ip <hostnames|ipaddresses|Unix domain socket paths>
|
|
\fIDefault\fP: localhost
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Starting in MongoDB 3.6, \fBmongod\fP bind to localhost
|
|
by default. See 3.6\-bind\-to\-localhost\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
The hostnames and/or IP addresses and/or full Unix domain socket
|
|
paths on which \fBmongod\fP should listen for client connections. You
|
|
may attach \fBmongod\fP to any interface. To bind to multiple
|
|
addresses, enter a list of comma\-separated values.
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.SS Example
|
|
.sp
|
|
\fBlocalhost,/tmp/mongod.sock\fP
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
You can specify both IPv4 and IPv6 addresses, or hostnames that
|
|
resolve to an IPv4 or IPv6 address.
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.SS Example
|
|
.sp
|
|
\fBlocalhost, 2001:0DB8:e132:ba26:0d5c:2774:e7f9:d513\fP
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
If specifying an IPv6 address \fIor\fP a hostname that resolves to an
|
|
IPv6 address to \fI\%\-\-bind_ip\fP, you must start \fBmongod\fP with
|
|
\fI\%\-\-ipv6\fP to enable IPv6 support. Specifying an IPv6 address
|
|
to \fI\%\-\-bind_ip\fP does not enable IPv6 support.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
If specifying a
|
|
\fI\%link\-local IPv6 address\fP
|
|
(\fBfe80::/10\fP), you must append the
|
|
\fI\%zone index\fP
|
|
to that address (i.e. \fBfe80::<address>%<adapter\-name>\fP).
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.SS Example
|
|
.sp
|
|
\fBlocalhost,fe80::a00:27ff:fee0:1fcf%enp0s3\fP
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.SS Tip
|
|
.sp
|
|
When possible, use a logical DNS hostname instead of an ip address,
|
|
particularly when configuring replica set members or sharded cluster
|
|
members. The use of logical DNS hostnames avoids configuration
|
|
changes due to ip address changes.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
\fBWARNING:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Before binding to a non\-localhost (e.g. publicly accessible)
|
|
IP address, ensure you have secured your cluster from unauthorized
|
|
access. For a complete list of security recommendations, see
|
|
/administration/security\-checklist\&. At minimum, consider
|
|
enabling authentication and
|
|
hardening network infrastructure\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
For more information about IP Binding, refer to the
|
|
/core/security\-mongodb\-configuration documentation.
|
|
.sp
|
|
To bind to all IPv4 addresses, enter \fB0.0.0.0\fP\&.
|
|
.sp
|
|
To bind to all IPv4 and IPv6 addresses, enter \fB::,0.0.0.0\fP or
|
|
starting in MongoDB 4.2, an asterisk \fB"*"\fP (enclose the asterisk in
|
|
quotes to avoid filename pattern expansion). Alternatively, use the
|
|
\fBnet.bindIpAll\fP setting.
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.INDENT 0.0
|
|
.IP \(bu 2
|
|
\fB\-\-bind_ip\fP and \fB\-\-bind_ip_all\fP are mutually exclusive.
|
|
Specifying both options causes \fBmongod\fP to throw an error and
|
|
terminate.
|
|
.IP \(bu 2
|
|
The command\-line option \fB\-\-bind\fP overrides the configuration
|
|
file setting \fBnet.bindIp\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-bind_ip_all
|
|
New in version 3.6.
|
|
|
|
.sp
|
|
If specified, the \fBmongod\fP instance binds to all IPv4
|
|
addresses (i.e. \fB0.0.0.0\fP). If \fBmongod\fP starts with
|
|
\fI\%\-\-ipv6\fP, \fI\%\-\-bind_ip_all\fP also binds to all IPv6 addresses
|
|
(i.e. \fB::\fP).
|
|
.sp
|
|
\fBmongod\fP only supports IPv6 if started with \fI\%\-\-ipv6\fP\&. Specifying
|
|
\fI\%\-\-bind_ip_all\fP alone does not enable IPv6 support.
|
|
.sp
|
|
\fBWARNING:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Before binding to a non\-localhost (e.g. publicly accessible)
|
|
IP address, ensure you have secured your cluster from unauthorized
|
|
access. For a complete list of security recommendations, see
|
|
/administration/security\-checklist\&. At minimum, consider
|
|
enabling authentication and
|
|
hardening network infrastructure\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
For more information about IP Binding, refer to the
|
|
/core/security\-mongodb\-configuration documentation.
|
|
.sp
|
|
Alternatively, you can set the \fB\-\-bind_ip\fP option to \fB::,0.0.0.0\fP
|
|
or, starting in MongoDB 4.2, to an asterisk \fB"*"\fP (enclose the
|
|
asterisk in quotes to avoid filename pattern expansion).
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
\fB\-\-bind_ip\fP and \fB\-\-bind_ip_all\fP are mutually exclusive. That
|
|
is, you can specify one or the other, but not both.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-clusterIpSourceAllowlist <string>
|
|
New in version 3.6.
|
|
|
|
.sp
|
|
A list of IP addresses/CIDR (\fI\%Classless Inter\-Domain Routing\fP) ranges against which the
|
|
\fI\%mongod\fP validates authentication requests from other members of
|
|
the replica set and, if part of a sharded cluster, the \fBmongos\fP
|
|
instances. The \fI\%mongod\fP verifies that the originating IP is
|
|
either explicitly in the list or belongs to a CIDR range in the list. If the
|
|
IP address is not present, the server does not authenticate the
|
|
\fI\%mongod\fP or \fBmongos\fP\&.
|
|
.sp
|
|
\fI\%\-\-clusterIpSourceAllowlist\fP has no effect on a \fI\%mongod\fP started without
|
|
authentication\&.
|
|
.sp
|
|
\fI\%\-\-clusterIpSourceAllowlist\fP accepts multiple comma\-separated IPv4/6 addresses or Classless
|
|
Inter\-Domain Routing (\fI\%CIDR\fP) ranges:
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.sp
|
|
.nf
|
|
.ft C
|
|
mongod \-\-clusterIpSourceAllowlist 192.0.2.0/24,127.0.0.1,::1
|
|
.ft P
|
|
.fi
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
\fBIMPORTANT:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Ensure \fI\%\-\-clusterIpSourceAllowlist\fP includes the IP address \fIor\fP CIDR ranges that include the
|
|
IP address of each replica set member or \fBmongos\fP in the
|
|
deployment to ensure healthy communication between cluster components.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-ipv6
|
|
Enables IPv6 support. \fBmongod\fP disables IPv6 support by default.
|
|
.sp
|
|
Setting \fI\%\-\-ipv6\fP does \fInot\fP direct the \fBmongod\fP to listen on any
|
|
local IPv6 addresses or interfaces. To configure the \fBmongod\fP to
|
|
listen on an IPv6 interface, you must either:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
Configure \fI\%\-\-bind_ip\fP with one or more IPv6 addresses or
|
|
hostnames that resolve to IPv6 addresses, \fBor\fP
|
|
.IP \(bu 2
|
|
Set \fI\%\-\-bind_ip_all\fP to \fBtrue\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-listenBacklog <number>
|
|
\fIDefault\fP: Target system \fBSOMAXCONN\fP constant
|
|
.sp
|
|
New in version 3.6.
|
|
|
|
.sp
|
|
The maximum number of connections that can exist in the listen
|
|
queue.
|
|
.sp
|
|
\fBWARNING:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Consult your local system\(aqs documentation to understand the
|
|
limitations and configuration requirements before using this
|
|
parameter.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
\fBIMPORTANT:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
To prevent undefined behavior, specify a value for this
|
|
parameter between \fB1\fP and the local system \fBSOMAXCONN\fP
|
|
constant.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
The default value for the \fBlistenBacklog\fP parameter is set at
|
|
compile time to the target system \fBSOMAXCONN\fP constant.
|
|
\fBSOMAXCONN\fP is the maximum valid value that is documented for
|
|
the \fIbacklog\fP parameter to the \fIlisten\fP system call.
|
|
.sp
|
|
Some systems may interpret \fBSOMAXCONN\fP symbolically, and others
|
|
numerically. The actual \fIlisten backlog\fP applied in practice may
|
|
differ from any numeric interpretation of the \fBSOMAXCONN\fP constant
|
|
or argument to \fB\-\-listenBacklog\fP, and may also be constrained by
|
|
system settings like \fBnet.core.somaxconn\fP on Linux.
|
|
.sp
|
|
Passing a value for the \fBlistenBacklog\fP parameter that exceeds the
|
|
\fBSOMAXCONN\fP constant for the local system is, by the letter of the
|
|
standards, undefined behavior. Higher values may be silently integer
|
|
truncated, may be ignored, may cause unexpected resource
|
|
consumption, or have other adverse consequences.
|
|
.sp
|
|
On systems with workloads that exhibit connection spikes, for which
|
|
it is empirically known that the local system can honor higher
|
|
values for the \fIbacklog\fP parameter than the \fBSOMAXCONN\fP constant,
|
|
setting the \fBlistenBacklog\fP parameter to a higher value may reduce
|
|
operation latency as observed by the client by reducing the number
|
|
of connections which are forced into a backoff state.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-maxConns <number>
|
|
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
|
|
Do not assign too low of a value to this option, or you will
|
|
encounter errors during normal application operation.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-logpath <path>
|
|
Sends all diagnostic logging information to a log file instead of to
|
|
standard output or to the host\(aqs syslog system. MongoDB creates
|
|
the log file at the path you specify.
|
|
.sp
|
|
By default, MongoDB will move any existing log file rather than overwrite
|
|
it. To instead append to the log file, set the \fI\%\-\-logappend\fP option.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-syslog
|
|
Sends all logging output to the host\(aqs syslog system rather
|
|
than to standard output or to a log file (\fI\%\-\-logpath\fP).
|
|
.sp
|
|
The \fI\%\-\-syslog\fP option is not supported on Windows.
|
|
.sp
|
|
\fBWARNING:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
The \fBsyslog\fP daemon generates timestamps when it logs a message, not
|
|
when MongoDB issues the message. This can lead to misleading timestamps
|
|
for log entries, especially when the system is under heavy load. We
|
|
recommend using the \fI\%\-\-logpath\fP option for production systems to
|
|
ensure accurate timestamps.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
Starting in version 4.2, MongoDB includes the component in its log messages to \fBsyslog\fP\&.
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.sp
|
|
.nf
|
|
.ft C
|
|
\&... ACCESS [repl writer worker 5] Unsupported modification to roles collection ...
|
|
.ft P
|
|
.fi
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-syslogFacility <string>
|
|
\fIDefault\fP: user
|
|
.sp
|
|
Specifies the facility level used when logging messages to syslog.
|
|
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 \-\-logappend
|
|
Appends new entries to the end of the existing log file when the \fBmongod\fP
|
|
instance restarts. Without this option, \fI\%mongod\fP will back up the
|
|
existing log and create a new file.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-logRotate <string>
|
|
\fIDefault\fP: rename
|
|
.sp
|
|
Determines the behavior for the \fBlogRotate\fP command.
|
|
Specify either \fBrename\fP or \fBreopen\fP:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
\fBrename\fP renames the log file.
|
|
.IP \(bu 2
|
|
\fBreopen\fP closes and reopens the log file following the typical
|
|
Linux/Unix log rotate behavior. Use \fBreopen\fP when using the
|
|
Linux/Unix logrotate utility to avoid log loss.
|
|
.sp
|
|
If you specify \fBreopen\fP, you must also use \fI\%\-\-logappend\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-timeStampFormat <string>
|
|
\fIDefault\fP: iso8601\-local
|
|
.sp
|
|
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{
|
|
\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{
|
|
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\-05:00\fP
|
|
T}
|
|
_
|
|
.TE
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Starting in MongoDB 4.4, \fI\%\-\-timeStampFormat\fP no longer supports \fBctime\fP\&.
|
|
An example of \fBctime\fP formatted date is: \fBWed Dec 31
|
|
18:17:54.811\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-traceExceptions
|
|
For internal diagnostic use only.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-pidfilepath <path>
|
|
Specifies a file location to store the process ID (PID) of the \fBmongod\fP
|
|
process. The user running the \fBmongod\fP or \fBmongos\fP
|
|
process must be able to write to this path. If the \fI\%\-\-pidfilepath\fP option is not
|
|
specified, the process does not create a PID file. This option is generally
|
|
only useful in combination with the \fI\%\-\-fork\fP option.
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.IP "Linux"
|
|
.sp
|
|
On Linux, PID file management is generally the responsibility of
|
|
your distro\(aqs init system: usually a service file in the \fB/etc/init.d\fP
|
|
directory, or a systemd unit file registered with \fBsystemctl\fP\&. Only
|
|
use the \fI\%\-\-pidfilepath\fP option if you are not using one of these init
|
|
systems. For more information, please see the respective
|
|
Installation Guide for your operating system.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.IP "macOS"
|
|
.sp
|
|
On macOS, PID file management is generally handled by \fBbrew\fP\&. Only use
|
|
the \fI\%\-\-pidfilepath\fP option if you are not using \fBbrew\fP on your macOS system.
|
|
For more information, please see the respective
|
|
Installation Guide for your operating system.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-keyFile <file>
|
|
Specifies the path to a key file that stores the shared secret
|
|
that MongoDB instances use to authenticate to each other in a
|
|
sharded cluster or replica set\&. \fI\%\-\-keyFile\fP implies
|
|
\fI\%\-\-auth\fP\&. See inter\-process\-auth for more
|
|
information.
|
|
.sp
|
|
Starting in MongoDB 4.2, keyfiles for internal membership
|
|
authentication use YAML format to allow for
|
|
multiple keys in a keyfile. The YAML format accepts content of:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
a single key string (same as in earlier versions),
|
|
.IP \(bu 2
|
|
multiple key strings (each string must be enclosed in quotes), or
|
|
.IP \(bu 2
|
|
sequence of key strings.
|
|
.UNINDENT
|
|
.sp
|
|
The YAML format is compatible with the existing single\-key
|
|
keyfiles that use the text file format.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-setParameter <options>
|
|
Specifies one of the MongoDB parameters described in
|
|
/reference/parameters\&. You can specify multiple \fBsetParameter\fP
|
|
fields.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-nounixsocket
|
|
Disables listening on the UNIX domain socket. \fI\%\-\-nounixsocket\fP applies only
|
|
to Unix\-based systems.
|
|
.sp
|
|
The \fBmongod\fP process
|
|
always listens on the UNIX socket unless one of the following is true:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
\fI\%\-\-nounixsocket\fP is set
|
|
.IP \(bu 2
|
|
\fBnet.bindIp\fP is not set
|
|
.IP \(bu 2
|
|
\fBnet.bindIp\fP does not specify \fBlocalhost\fP or its associated IP address
|
|
.UNINDENT
|
|
.sp
|
|
\fBmongod\fP installed from official \&.deb and \&.rpm packages
|
|
have the \fBbind_ip\fP configuration set to \fB127.0.0.1\fP by
|
|
default.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-unixSocketPrefix <path>
|
|
\fIDefault\fP: /tmp
|
|
.sp
|
|
The path for the UNIX socket. \fI\%\-\-unixSocketPrefix\fP applies only
|
|
to Unix\-based systems.
|
|
.sp
|
|
If this option has no value, the
|
|
\fBmongod\fP process creates a socket with \fB/tmp\fP as a prefix. MongoDB
|
|
creates and listens on a UNIX socket unless one of the following is true:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
\fBnet.unixDomainSocket.enabled\fP is \fBfalse\fP
|
|
.IP \(bu 2
|
|
\fI\%\-\-nounixsocket\fP is set
|
|
.IP \(bu 2
|
|
\fBnet.bindIp\fP is not set
|
|
.IP \(bu 2
|
|
\fBnet.bindIp\fP does not specify \fBlocalhost\fP or its associated IP address
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-filePermissions <path>
|
|
\fIDefault\fP: \fB0700\fP
|
|
.sp
|
|
Sets the permission for the UNIX domain socket file.
|
|
.sp
|
|
\fI\%\-\-filePermissions\fP applies only to Unix\-based systems.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-fork
|
|
Enables a daemon mode that runs the \fBmongod\fP process in the
|
|
background. By default \fBmongod\fP does not run as a daemon:
|
|
typically you will run \fBmongod\fP as a daemon, either by using
|
|
\fI\%\-\-fork\fP or by using a controlling process that handles the
|
|
daemonization process (e.g. as with \fBupstart\fP and \fBsystemd\fP).
|
|
.sp
|
|
The \fI\%\-\-fork\fP option is not supported on Windows.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-auth
|
|
Enables authorization to control user\(aqs access to database resources
|
|
and operations. When authorization is enabled, MongoDB requires all
|
|
clients to authenticate themselves first in order to determine the
|
|
access for the client.
|
|
.sp
|
|
Configure users via the mongo shell\&. If no users exist, the localhost interface
|
|
will continue to have access to the database until you create
|
|
the first user.
|
|
.sp
|
|
See Security
|
|
for more information.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-noauth
|
|
Disables authentication. Currently the default. Exists for future
|
|
compatibility and clarity.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-transitionToAuth
|
|
New in version 3.4: Allows the \fBmongod\fP to accept and create authenticated and
|
|
non\-authenticated connections to and from other \fI\%mongod\fP
|
|
and \fBmongos\fP instances in the deployment. Used for
|
|
performing rolling transition of replica sets or sharded clusters
|
|
from a no\-auth configuration to internal authentication\&. Requires specifying a internal
|
|
authentication mechanism such as
|
|
\fI\%\-\-keyFile\fP\&.
|
|
|
|
.sp
|
|
For example, if using keyfiles for
|
|
internal authentication, the \fBmongod\fP creates
|
|
an authenticated connection with any \fI\%mongod\fP or \fBmongos\fP
|
|
in the deployment using a matching keyfile. If the security mechanisms do
|
|
not match, the \fBmongod\fP utilizes a non\-authenticated connection instead.
|
|
.sp
|
|
A \fBmongod\fP running with \fI\%\-\-transitionToAuth\fP does not enforce user access
|
|
controls\&. Users may connect to your deployment without any
|
|
access control checks and perform read, write, and administrative operations.
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
A \fBmongod\fP running with internal authentication and \fIwithout\fP \fI\%\-\-transitionToAuth\fP requires clients to connect
|
|
using user access controls\&. Update clients to
|
|
connect to the \fBmongod\fP using the appropriate user
|
|
prior to restarting \fBmongod\fP without \fI\%\-\-transitionToAuth\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-cpu
|
|
Forces the \fBmongod\fP process to report the percentage of CPU time in
|
|
write lock, every four seconds.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-sysinfo
|
|
Returns diagnostic system information and then exits. The
|
|
information provides the page size, the number of physical pages,
|
|
and the number of available physical pages.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-noscripting
|
|
Disables the scripting engine.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-notablescan
|
|
Forbids operations that require a collection scan. See \fBnotablescan\fP for additional information.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-shutdown
|
|
The \fI\%\-\-shutdown\fP option cleanly and safely terminates the \fBmongod\fP
|
|
process. When invoking \fBmongod\fP with this option you must set the
|
|
\fI\%\-\-dbpath\fP option either directly or by way of the
|
|
configuration file and the
|
|
\fI\%\-\-config\fP option.
|
|
.sp
|
|
The \fI\%\-\-shutdown\fP option is available only on Linux systems.
|
|
.sp
|
|
For additional ways to shut down, see also terminate\-mongod\-processes\&.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-redactClientLogData
|
|
New in version 3.4: Available in MongoDB Enterprise only.
|
|
|
|
.sp
|
|
A \fBmongod\fP running with \fI\%\-\-redactClientLogData\fP redacts any message accompanying a given
|
|
log event before logging. This prevents the \fBmongod\fP from writing
|
|
potentially sensitive data stored on the database to the diagnostic log.
|
|
Metadata such as error or operation codes, line numbers, and source file
|
|
names are still visible in the logs.
|
|
.sp
|
|
Use \fI\%\-\-redactClientLogData\fP in conjunction with
|
|
/core/security\-encryption\-at\-rest and
|
|
/core/security\-transport\-encryption to assist compliance with
|
|
regulatory requirements.
|
|
.sp
|
|
For example, a MongoDB deployment might store Personally Identifiable
|
|
Information (PII) in one or more collections. The \fBmongod\fP logs events
|
|
such as those related to CRUD operations, sharding metadata, etc. It is
|
|
possible that the \fBmongod\fP may expose PII as a part of these logging
|
|
operations. A \fBmongod\fP running with \fI\%\-\-redactClientLogData\fP removes any message
|
|
accompanying these events before being output to the log, effectively
|
|
removing the PII.
|
|
.sp
|
|
Diagnostics on a \fBmongod\fP running with \fI\%\-\-redactClientLogData\fP may be more difficult
|
|
due to the lack of data related to a log event. See the
|
|
process logging manual page for an
|
|
example of the effect of \fI\%\-\-redactClientLogData\fP on log output.
|
|
.sp
|
|
On a running \fBmongod\fP, use \fBsetParameter\fP with the
|
|
\fBredactClientLogData\fP parameter to configure this setting.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-networkMessageCompressors <string>
|
|
\fIDefault\fP: snappy,zstd,zlib
|
|
.sp
|
|
New in version 3.4.
|
|
|
|
.sp
|
|
Specifies the default compressor(s) to use for
|
|
communication between this \fBmongod\fP instance and:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
other members of the deployment if the instance is part of a replica set or a sharded cluster
|
|
.IP \(bu 2
|
|
a \fBmongo\fP shell
|
|
.IP \(bu 2
|
|
drivers that support the \fBOP_COMPRESSED\fP message format.
|
|
.UNINDENT
|
|
.sp
|
|
MongoDB supports the following compressors:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
snappy
|
|
.IP \(bu 2
|
|
zlib (Available starting in MongoDB 3.6)
|
|
.IP \(bu 2
|
|
zstd (Available starting in MongoDB 4.2)
|
|
.UNINDENT
|
|
.sp
|
|
\fBIn versions 3.6 and 4.0\fP, \fI\%mongod\fP and
|
|
\fBmongos\fP enable network compression by default with
|
|
\fBsnappy\fP as the compressor.
|
|
.sp
|
|
\fBStarting in version 4.2\fP, \fI\%mongod\fP and
|
|
\fBmongos\fP instances default to both \fBsnappy,zstd,zlib\fP
|
|
compressors, in that order.
|
|
.sp
|
|
To disable network compression, set the value to \fBdisabled\fP\&.
|
|
.sp
|
|
\fBIMPORTANT:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Messages are compressed when both parties enable network
|
|
compression. Otherwise, messages between the parties are
|
|
uncompressed.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
If you specify multiple compressors, then the order in which you list
|
|
the compressors matter as well as the communication initiator. For
|
|
example, if a \fBmongo\fP shell specifies the following network
|
|
compressors \fBzlib,snappy\fP and the \fI\%mongod\fP specifies
|
|
\fBsnappy,zlib\fP, messages between \fBmongo\fP shell and
|
|
\fI\%mongod\fP uses \fBzlib\fP\&.
|
|
.sp
|
|
If the parties do not share at least one common compressor, messages
|
|
between the parties are uncompressed. For example, if a
|
|
\fBmongo\fP shell specifies the network compressor
|
|
\fBzlib\fP and \fI\%mongod\fP specifies \fBsnappy\fP, messages
|
|
between \fBmongo\fP shell and \fI\%mongod\fP are not compressed.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-timeZoneInfo <path>
|
|
The full path from which to load the time zone database. If this option
|
|
is not provided, then MongoDB will use its built\-in time zone database.
|
|
.sp
|
|
The configuration file included with Linux and macOS packages sets the time
|
|
zone database path to \fB/usr/share/zoneinfo\fP by default.
|
|
.sp
|
|
The built\-in time zone database is a copy of the \fI\%Olson/IANA time zone
|
|
database\fP\&. It is updated along with MongoDB
|
|
releases, but the release cycle of the time zone database differs from the
|
|
release cycle of MongoDB. A copy of the most recent release of the time zone
|
|
database can be downloaded from
|
|
\fI\%https://downloads.mongodb.org/olson_tz_db/timezonedb\-latest.zip\fP\&.
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.sp
|
|
.nf
|
|
.ft C
|
|
wget https://downloads.mongodb.org/olson_tz_db/timezonedb\-latest.zip
|
|
unzip timezonedb\-latest.zip
|
|
mongod \-\-timeZoneInfo timezonedb\-2017b/
|
|
.ft P
|
|
.fi
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
\fBSEE ALSO:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
\fBprocessManagement.timeZoneInfo\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-serviceExecutor <string>
|
|
\fIDefault\fP: synchronous
|
|
.sp
|
|
New in version 3.6.
|
|
|
|
.sp
|
|
Determines the threading and execution model \fBmongod\fP uses to
|
|
execute client requests. The \fB\-\-serviceExecutor\fP option accepts one
|
|
of the following values:
|
|
.TS
|
|
center;
|
|
|l|l|.
|
|
_
|
|
T{
|
|
Value
|
|
T} T{
|
|
Description
|
|
T}
|
|
_
|
|
T{
|
|
\fBsynchronous\fP
|
|
T} T{
|
|
The \fBmongod\fP uses synchronous networking and manages its
|
|
networking thread pool on a per connection basis. Previous
|
|
versions of MongoDB managed threads in this way.
|
|
T}
|
|
_
|
|
T{
|
|
\fBadaptive\fP
|
|
T} T{
|
|
The \fBmongod\fP uses the new experimental asynchronous
|
|
networking mode with an adaptive thread pool which manages
|
|
threads on a per request basis. This mode should have more
|
|
consistent performance and use less resources when there are
|
|
more inactive connections than database requests.
|
|
T}
|
|
_
|
|
.TE
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-outputConfig
|
|
New in version 4.2.
|
|
|
|
.sp
|
|
Outputs the \fBmongod\fP instance\(aqs configuration options, formatted
|
|
in YAML, to \fBstdout\fP and exits the \fBmongod\fP instance. For
|
|
configuration options that uses externally\-sourced\-values,
|
|
\fI\%\-\-outputConfig\fP returns the resolved value for those options.
|
|
.sp
|
|
\fBWARNING:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
This may include any configured passwords or secrets previously
|
|
obfuscated through the external source.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
For usage examples, see:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
expansion\-directive\-output
|
|
.IP \(bu 2
|
|
/tutorial/convert\-command\-line\-options\-to\-yaml
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SS Free Monitoring
|
|
.sp
|
|
New in version 4.0.
|
|
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-enableFreeMonitoring <runtime|on|off>
|
|
New in version 4.0: Available for MongoDB Community Edition.
|
|
|
|
.sp
|
|
Enables or disables free MongoDB Cloud monitoring\&. \fI\%\-\-enableFreeMonitoring\fP accepts the following
|
|
values:
|
|
.TS
|
|
center;
|
|
|l|l|.
|
|
_
|
|
T{
|
|
\fBruntime\fP
|
|
T} T{
|
|
Default. You can enable or disable free monitoring during
|
|
runtime.
|
|
.sp
|
|
To enable or disable free monitoring during runtime, see
|
|
\fBdb.enableFreeMonitoring()\fP and
|
|
\fBdb.disableFreeMonitoring()\fP\&.
|
|
.sp
|
|
To enable or disable free monitoring during runtime when
|
|
running with access control, users must have required
|
|
privileges. See \fBdb.enableFreeMonitoring()\fP and
|
|
\fBdb.disableFreeMonitoring()\fP for details.
|
|
T}
|
|
_
|
|
T{
|
|
\fBon\fP
|
|
T} T{
|
|
Enables free monitoring at startup; i.e. registers for free
|
|
monitoring. When enabled at startup, you cannot disable free
|
|
monitoring during runtime.
|
|
T}
|
|
_
|
|
T{
|
|
\fBoff\fP
|
|
T} T{
|
|
Disables free monitoring at startup, regardless of whether
|
|
you have previously registered for free monitoring. When disabled at startup,
|
|
you cannot enable free monitoring during runtime.
|
|
T}
|
|
_
|
|
.TE
|
|
.sp
|
|
Once enabled, the free monitoring state remains enabled until
|
|
explicitly disabled. That is, you do not need to re\-enable each time
|
|
you start the server.
|
|
.sp
|
|
For the corresponding configuration file setting, see
|
|
\fBcloud.monitoring.free.state\fP\&.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-freeMonitoringTag <string>
|
|
New in version 4.0: Available for MongoDB Community Edition.
|
|
|
|
.sp
|
|
Optional tag to describe environment context. The tag can be sent as
|
|
part of the free MongoDB Cloud monitoring registration at start up.
|
|
.sp
|
|
For the corresponding configuration file setting, see
|
|
\fBcloud.monitoring.free.tags\fP\&.
|
|
.UNINDENT
|
|
.SS LDAP Authentication or Authorization Options
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-ldapServers <host1>:<port>,<host2>:<port>,...,<hostN>:<port>
|
|
New in version 3.4: Available in MongoDB Enterprise only.
|
|
|
|
.sp
|
|
The LDAP server against which the \fBmongod\fP authenticates users or
|
|
determines what actions a user is authorized to perform on a given
|
|
database. If the LDAP server specified has any replicated instances,
|
|
you may specify the host and port of each replicated server in a
|
|
comma\-delimited list.
|
|
.sp
|
|
If your LDAP infrastructure partitions the LDAP directory over multiple LDAP
|
|
servers, specify \fIone\fP LDAP server or any of its replicated instances to
|
|
\fI\%\-\-ldapServers\fP\&. MongoDB supports following LDAP referrals as defined in \fI\%RFC 4511
|
|
4.1.10\fP\&. Do not use \fI\%\-\-ldapServers\fP
|
|
for listing every LDAP server in your infrastructure.
|
|
.sp
|
|
This setting can be configured on a running \fBmongod\fP using
|
|
\fBsetParameter\fP\&.
|
|
.sp
|
|
If unset, \fBmongod\fP cannot use LDAP authentication or authorization\&.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-ldapValidateLDAPServerConfig <boolean>
|
|
\fIAvailable in MongoDB Enterprise\fP
|
|
.sp
|
|
A flag that determines if the \fI\%mongod\fP instance checks
|
|
the availability of the \fI\%LDAP server(s)\fP as part of its startup:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
If \fBtrue\fP, the \fI\%mongod\fP instance performs the
|
|
availability check and only continues to start up if the LDAP
|
|
server is available.
|
|
.IP \(bu 2
|
|
If \fBfalse\fP, the \fI\%mongod\fP instance skips the
|
|
availability check; i.e. the instance starts up even if the LDAP
|
|
server is unavailable.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-ldapQueryUser <string>
|
|
New in version 3.4: Available in MongoDB Enterprise only.
|
|
|
|
.sp
|
|
The identity with which \fBmongod\fP binds as, when connecting to or
|
|
performing queries on an LDAP server.
|
|
.sp
|
|
Only required if any of the following are true:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
Using LDAP authorization\&.
|
|
.IP \(bu 2
|
|
Using an LDAP query for \fI\%username transformation\fP\&.
|
|
.IP \(bu 2
|
|
The LDAP server disallows anonymous binds
|
|
.UNINDENT
|
|
.sp
|
|
You must use \fI\%\-\-ldapQueryUser\fP with \fI\%\-\-ldapQueryPassword\fP\&.
|
|
.sp
|
|
If unset, \fBmongod\fP will not attempt to bind to the LDAP server.
|
|
.sp
|
|
This setting can be configured on a running \fBmongod\fP using
|
|
\fBsetParameter\fP\&.
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Windows MongoDB deployments can use \fI\%\-\-ldapBindWithOSDefaults\fP
|
|
instead of \fI\%\-\-ldapQueryUser\fP and \fI\%\-\-ldapQueryPassword\fP\&. You cannot specify
|
|
both \fI\%\-\-ldapQueryUser\fP and \fI\%\-\-ldapBindWithOSDefaults\fP at the same time.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-ldapQueryPassword <string>
|
|
New in version 3.4: Available in MongoDB Enterprise only.
|
|
.sp
|
|
The password used to bind to an LDAP server when using
|
|
\fI\%\-\-ldapQueryUser\fP\&. You must use \fI\%\-\-ldapQueryPassword\fP with
|
|
\fI\%\-\-ldapQueryUser\fP\&.
|
|
|
|
.sp
|
|
If unset, \fBmongod\fP will not attempt to bind to the LDAP server.
|
|
.sp
|
|
This setting can be configured on a running \fBmongod\fP using
|
|
\fBsetParameter\fP\&.
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Windows MongoDB deployments can use \fI\%\-\-ldapBindWithOSDefaults\fP
|
|
instead of \fI\%\-\-ldapQueryPassword\fP and \fI\%\-\-ldapQueryPassword\fP\&. You cannot specify
|
|
both \fI\%\-\-ldapQueryPassword\fP and \fI\%\-\-ldapBindWithOSDefaults\fP at the same time.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-ldapBindWithOSDefaults <bool>
|
|
\fIDefault\fP: false
|
|
.sp
|
|
New in version 3.4: Available in MongoDB Enterprise for the Windows platform only.
|
|
|
|
.sp
|
|
Allows \fBmongod\fP to authenticate, or bind, using your Windows login
|
|
credentials when connecting to the LDAP server.
|
|
.sp
|
|
Only required if:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
Using LDAP authorization\&.
|
|
.IP \(bu 2
|
|
Using an LDAP query for \fI\%username transformation\fP\&.
|
|
.IP \(bu 2
|
|
The LDAP server disallows anonymous binds
|
|
.UNINDENT
|
|
.sp
|
|
Use \fI\%\-\-ldapBindWithOSDefaults\fP to replace \fI\%\-\-ldapQueryUser\fP and
|
|
\fI\%\-\-ldapQueryPassword\fP\&.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-ldapBindMethod <string>
|
|
\fIDefault\fP: simple
|
|
.sp
|
|
New in version 3.4: Available in MongoDB Enterprise only.
|
|
|
|
.sp
|
|
The method \fBmongod\fP uses to authenticate to an LDAP server.
|
|
Use with \fI\%\-\-ldapQueryUser\fP and \fI\%\-\-ldapQueryPassword\fP to
|
|
connect to the LDAP server.
|
|
.sp
|
|
\fI\%\-\-ldapBindMethod\fP supports the following values:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
\fBsimple\fP \- \fBmongod\fP uses simple authentication.
|
|
.IP \(bu 2
|
|
\fBsasl\fP \- \fBmongod\fP uses SASL protocol for authentication
|
|
.UNINDENT
|
|
.sp
|
|
If you specify \fBsasl\fP, you can configure the available SASL mechanisms
|
|
using \fI\%\-\-ldapBindSaslMechanisms\fP\&. \fBmongod\fP defaults to
|
|
using \fBDIGEST\-MD5\fP mechanism.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-ldapBindSaslMechanisms <string>
|
|
\fIDefault\fP: DIGEST\-MD5
|
|
.sp
|
|
New in version 3.4: Available in MongoDB Enterprise only.
|
|
|
|
.sp
|
|
A comma\-separated list of SASL mechanisms \fBmongod\fP can
|
|
use when authenticating to the LDAP server. The \fBmongod\fP and the
|
|
LDAP server must agree on at least one mechanism. The \fBmongod\fP
|
|
dynamically loads any SASL mechanism libraries installed on the host
|
|
machine at runtime.
|
|
.sp
|
|
Install and configure the appropriate libraries for the selected
|
|
SASL mechanism(s) on both the \fBmongod\fP host and the remote
|
|
LDAP server host. Your operating system may include certain SASL
|
|
libraries by default. Defer to the documentation associated with each
|
|
SASL mechanism for guidance on installation and configuration.
|
|
.sp
|
|
If using the \fBGSSAPI\fP SASL mechanism for use with
|
|
security\-kerberos, verify the following for the
|
|
\fBmongod\fP host machine:
|
|
.INDENT 7.0
|
|
.TP
|
|
.B \fBLinux\fP
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
The \fBKRB5_CLIENT_KTNAME\fP environment
|
|
variable resolves to the name of the client keytab\-files
|
|
for the host machine. For more on Kerberos environment
|
|
variables, please defer to the
|
|
\fI\%Kerberos documentation\fP\&.
|
|
.IP \(bu 2
|
|
The client keytab includes a
|
|
kerberos\-user\-principal for the \fBmongod\fP to use when
|
|
connecting to the LDAP server and execute LDAP queries.
|
|
.UNINDENT
|
|
.TP
|
|
.B \fBWindows\fP
|
|
If connecting to an Active Directory server, the Windows
|
|
Kerberos configuration automatically generates a
|
|
\fI\%Ticket\-Granting\-Ticket\fP
|
|
when the user logs onto the system. Set \fI\%\-\-ldapBindWithOSDefaults\fP to
|
|
\fBtrue\fP to allow \fBmongod\fP to use the generated credentials when
|
|
connecting to the Active Directory server and execute queries.
|
|
.UNINDENT
|
|
.sp
|
|
Set \fI\%\-\-ldapBindMethod\fP to \fBsasl\fP to use this option.
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
For a complete list of SASL mechanisms see the
|
|
\fI\%IANA listing\fP\&.
|
|
Defer to the documentation for your LDAP or Active Directory
|
|
service for identifying the SASL mechanisms compatible with the
|
|
service.
|
|
.sp
|
|
MongoDB is not a source of SASL mechanism libraries, nor
|
|
is the MongoDB documentation a definitive source for
|
|
installing or configuring any given SASL mechanism. For
|
|
documentation and support, defer to the SASL mechanism
|
|
library vendor or owner.
|
|
.sp
|
|
For more information on SASL, defer to the following resources:
|
|
.INDENT 0.0
|
|
.IP \(bu 2
|
|
For Linux, please see the \fI\%Cyrus SASL documentation\fP\&.
|
|
.IP \(bu 2
|
|
For Windows, please see the \fI\%Windows SASL documentation\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-ldapTransportSecurity <string>
|
|
\fIDefault\fP: tls
|
|
.sp
|
|
New in version 3.4: Available in MongoDB Enterprise only.
|
|
|
|
.sp
|
|
By default, \fBmongod\fP creates a TLS/SSL secured connection to the LDAP
|
|
server.
|
|
.sp
|
|
For Linux deployments, you must configure the appropriate TLS Options in
|
|
\fB/etc/openldap/ldap.conf\fP file. Your operating system\(aqs package manager
|
|
creates this file as part of the MongoDB Enterprise installation, via the
|
|
\fBlibldap\fP dependency. See the documentation for \fBTLS Options\fP in the
|
|
\fI\%ldap.conf OpenLDAP documentation\fP
|
|
for more complete instructions.
|
|
.sp
|
|
For Windows deployment, you must add the LDAP server CA certificates to the
|
|
Windows certificate management tool. The exact name and functionality of the
|
|
tool may vary depending on operating system version. Please see the
|
|
documentation for your version of Windows for more information on
|
|
certificate management.
|
|
.sp
|
|
Set \fI\%\-\-ldapTransportSecurity\fP to \fBnone\fP to disable TLS/SSL between \fBmongod\fP and the LDAP
|
|
server.
|
|
.sp
|
|
\fBWARNING:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Setting \fI\%\-\-ldapTransportSecurity\fP to \fBnone\fP transmits plaintext information and possibly
|
|
credentials between \fBmongod\fP and the LDAP server.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-ldapTimeoutMS <long>
|
|
\fIDefault\fP: 10000
|
|
.sp
|
|
New in version 3.4: Available in MongoDB Enterprise only.
|
|
|
|
.sp
|
|
The amount of time in milliseconds \fBmongod\fP should wait for an LDAP server
|
|
to respond to a request.
|
|
.sp
|
|
Increasing the value of \fI\%\-\-ldapTimeoutMS\fP may prevent connection failure between the
|
|
MongoDB server and the LDAP server, if the source of the failure is a
|
|
connection timeout. Decreasing the value of \fI\%\-\-ldapTimeoutMS\fP reduces the time
|
|
MongoDB waits for a response from the LDAP server.
|
|
.sp
|
|
This setting can be configured on a running \fBmongod\fP using
|
|
\fBsetParameter\fP\&.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-ldapUserToDNMapping <string>
|
|
New in version 3.4: Available in MongoDB Enterprise only.
|
|
|
|
.sp
|
|
Maps the username provided to \fBmongod\fP for authentication to a LDAP
|
|
Distinguished Name (DN). You may need to use \fI\%\-\-ldapUserToDNMapping\fP to transform a
|
|
username into an LDAP DN in the following scenarios:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
Performing LDAP authentication with simple LDAP binding, where users
|
|
authenticate to MongoDB with usernames that are not full LDAP DNs.
|
|
.IP \(bu 2
|
|
Using an \fI\%LDAP authorization query template\fP that requires a DN.
|
|
.IP \(bu 2
|
|
Transforming the usernames of clients authenticating to Mongo DB using
|
|
different authentication mechanisms (e.g. x.509, kerberos) to a full LDAP
|
|
DN for authorization.
|
|
.UNINDENT
|
|
.sp
|
|
\fI\%\-\-ldapUserToDNMapping\fP expects a quote\-enclosed JSON\-string representing an ordered array
|
|
of documents. Each document contains a regular expression \fBmatch\fP and
|
|
either a \fBsubstitution\fP or \fBldapQuery\fP template used for transforming the
|
|
incoming username.
|
|
.sp
|
|
Each document in the array has the following form:
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.sp
|
|
.nf
|
|
.ft C
|
|
{
|
|
match: "<regex>"
|
|
substitution: "<LDAP DN>" | ldapQuery: "<LDAP Query>"
|
|
}
|
|
.ft P
|
|
.fi
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.TS
|
|
center;
|
|
|l|l|l|.
|
|
_
|
|
T{
|
|
Field
|
|
T} T{
|
|
Description
|
|
T} T{
|
|
Example
|
|
T}
|
|
_
|
|
T{
|
|
\fBmatch\fP
|
|
T} T{
|
|
An ECMAScript\-formatted regular expression (regex) to match against a
|
|
provided username. Each parenthesis\-enclosed section represents a
|
|
regex capture group used by \fBsubstitution\fP or \fBldapQuery\fP\&.
|
|
T} T{
|
|
\fB"(.+)ENGINEERING"\fP
|
|
\fB"(.+)DBA"\fP
|
|
T}
|
|
_
|
|
T{
|
|
\fBsubstitution\fP
|
|
T} T{
|
|
An LDAP distinguished name (DN) formatting template that converts the
|
|
authentication name matched by the \fBmatch\fP regex into a LDAP DN.
|
|
Each curly bracket\-enclosed numeric value is replaced by the
|
|
corresponding \fI\%regex capture group\fP extracted
|
|
from the authentication username via the \fBmatch\fP regex.
|
|
.sp
|
|
The result of the substitution must be an \fI\%RFC4514\fP escaped string.
|
|
T} T{
|
|
\fB"cn={0},ou=engineering,
|
|
dc=example,dc=com"\fP
|
|
T}
|
|
_
|
|
T{
|
|
\fBldapQuery\fP
|
|
T} T{
|
|
A LDAP query formatting template that inserts the authentication
|
|
name matched by the \fBmatch\fP regex into an LDAP query URI encoded
|
|
respecting RFC4515 and RFC4516. Each curly bracket\-enclosed numeric
|
|
value is replaced by the corresponding \fI\%regex capture group\fP extracted
|
|
from the authentication username via the \fBmatch\fP expression.
|
|
\fBmongod\fP executes the query against the LDAP server to retrieve
|
|
the LDAP DN for the authenticated user. \fBmongod\fP requires
|
|
exactly one returned result for the transformation to be
|
|
successful, or \fBmongod\fP skips this transformation.
|
|
T} T{
|
|
\fB"ou=engineering,dc=example,
|
|
dc=com??one?(user={0})"\fP
|
|
T}
|
|
_
|
|
.TE
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
An explanation of \fI\%RFC4514\fP,
|
|
\fI\%RFC4515\fP,
|
|
\fI\%RFC4516\fP, or LDAP queries is out
|
|
of scope for the MongoDB Documentation. Please review the RFC directly or
|
|
use your preferred LDAP resource.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
For each document in the array, you must use either \fBsubstitution\fP or
|
|
\fBldapQuery\fP\&. You \fIcannot\fP specify both in the same document.
|
|
.sp
|
|
When performing authentication or authorization, \fBmongod\fP steps through
|
|
each document in the array in the given order, checking the authentication
|
|
username against the \fBmatch\fP filter. If a match is found,
|
|
\fBmongod\fP applies the transformation and uses the output for
|
|
authenticating the user. \fBmongod\fP does not check the remaining documents
|
|
in the array.
|
|
.sp
|
|
If the given document does not match the provided authentication
|
|
name, \fI\%mongod\fP continues through the list of documents
|
|
to find additional matches. If no matches are found in any document,
|
|
or the transformation the document describes fails,
|
|
\fI\%mongod\fP returns an error.
|
|
.sp
|
|
Starting in MongoDB 4.4, \fI\%mongod\fP also returns an error
|
|
if one of the transformations cannot be evaluated due to networking
|
|
or authentication failures to the LDAP server. \fI\%mongod\fP
|
|
rejects the connection request and does not check the remaining
|
|
documents in the array.
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.SS Example
|
|
.sp
|
|
The following shows two transformation documents. The first
|
|
document matches against any string ending in \fB@ENGINEERING\fP, placing
|
|
anything preceeding the suffix into a regex capture group. The
|
|
second document matches against any string ending in \fB@DBA\fP, placing
|
|
anything preceeding the suffix into a regex capture group.
|
|
.sp
|
|
\fBIMPORTANT:\fP
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
You must pass the array to \fI\%\-\-ldapUserToDNMapping\fP as a string.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
.sp
|
|
.nf
|
|
.ft C
|
|
"[
|
|
{
|
|
match: "(.+)@ENGINEERING.EXAMPLE.COM",
|
|
substitution: "cn={0},ou=engineering,dc=example,dc=com"
|
|
},
|
|
{
|
|
match: "(.+)@DBA.EXAMPLE.COM",
|
|
ldapQuery: "ou=dba,dc=example,dc=com??one?(user={0})"
|
|
|
|
}
|
|
|
|
]"
|
|
.ft P
|
|
.fi
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
A user with username \fBalice@ENGINEERING.EXAMPLE.COM\fP matches the first
|
|
document. The regex capture group \fB{0}\fP corresponds to the string
|
|
\fBalice\fP\&. The resulting output is the DN
|
|
\fB"cn=alice,ou=engineering,dc=example,dc=com"\fP\&.
|
|
.sp
|
|
A user with username \fBbob@DBA.EXAMPLE.COM\fP matches the second document.
|
|
The regex capture group \fB{0}\fP corresponds to the string \fBbob\fP\&. The
|
|
resulting output is the LDAP query
|
|
\fB"ou=dba,dc=example,dc=com??one?(user=bob)"\fP\&. \fBmongod\fP executes this
|
|
query against the LDAP server, returning the result
|
|
\fB"cn=bob,ou=dba,dc=example,dc=com"\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
If \fI\%\-\-ldapUserToDNMapping\fP is unset, \fBmongod\fP applies no transformations to the username
|
|
when attempting to authenticate or authorize a user against the LDAP server.
|
|
.sp
|
|
This setting can be configured on a running \fBmongod\fP using the
|
|
\fBsetParameter\fP database command.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-ldapAuthzQueryTemplate <string>
|
|
New in version 3.4: Available in MongoDB Enterprise only.
|
|
|
|
.sp
|
|
A relative LDAP query URL formatted conforming to \fI\%RFC4515\fP and \fI\%RFC4516\fP that \fBmongod\fP executes to obtain
|
|
the LDAP groups to which the authenticated user belongs to. The query is
|
|
relative to the host or hosts specified in \fI\%\-\-ldapServers\fP\&.
|
|
.sp
|
|
In the URL, you can use the following substituion tokens:
|
|
.TS
|
|
center;
|
|
|l|l|.
|
|
_
|
|
T{
|
|
Substitution Token
|
|
T} T{
|
|
Description
|
|
T}
|
|
_
|
|
T{
|
|
\fB{USER}\fP
|
|
T} T{
|
|
Substitutes the authenticated username, or the
|
|
\fBtransformed\fP
|
|
username if a \fI\%username mapping\fP is specified.
|
|
T}
|
|
_
|
|
T{
|
|
\fB{PROVIDED_USER}\fP
|
|
T} T{
|
|
Substitutes the supplied username, i.e. before either
|
|
authentication or \fBLDAP transformation\fP\&.
|
|
.sp
|
|
New in version 4.2.
|
|
T}
|
|
_
|
|
.TE
|
|
.sp
|
|
When constructing the query URL, ensure that the order of LDAP parameters
|
|
respects RFC4516:
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.sp
|
|
.nf
|
|
.ft C
|
|
[ dn [ ? [attributes] [ ? [scope] [ ? [filter] [ ? [Extensions] ] ] ] ] ]
|
|
.ft P
|
|
.fi
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
If your query includes an attribute, \fBmongod\fP assumes that the query
|
|
retrieves a the DNs which this entity is member of.
|
|
.sp
|
|
If your query does not include an attribute, \fBmongod\fP assumes
|
|
the query retrieves all entities which the user is member of.
|
|
.sp
|
|
For each LDAP DN returned by the query, \fBmongod\fP assigns the authorized
|
|
user a corresponding role on the \fBadmin\fP database. If a role on the on the
|
|
\fBadmin\fP database exactly matches the DN, \fBmongod\fP grants the user the
|
|
roles and privileges assigned to that role. See the
|
|
\fBdb.createRole()\fP method for more information on creating roles.
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.SS Example
|
|
.sp
|
|
This LDAP query returns any groups listed in the LDAP user object\(aqs
|
|
\fBmemberOf\fP attribute.
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
.sp
|
|
.nf
|
|
.ft C
|
|
"{USER}?memberOf?base"
|
|
.ft P
|
|
.fi
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
Your LDAP configuration may not include the \fBmemberOf\fP attribute as part
|
|
of the user schema, may possess a different attribute for reporting group
|
|
membership, or may not track group membership through attributes.
|
|
Configure your query with respect to your own unique LDAP configuration.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
If unset, \fBmongod\fP cannot authorize users using LDAP.
|
|
.sp
|
|
This setting can be configured on a running \fBmongod\fP using the
|
|
\fBsetParameter\fP database command.
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
An explanation of \fI\%RFC4515\fP,
|
|
\fI\%RFC4516\fP or LDAP queries is out
|
|
of scope for the MongoDB Documentation. Please review the RFC directly or
|
|
use your preferred LDAP resource.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SS Storage Options
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-storageEngine string
|
|
\fIDefault\fP: \fBwiredTiger\fP
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Starting in version 4.2, MongoDB removes the deprecated MMAPv1 storage
|
|
engine.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
Specifies the storage engine for the \fBmongod\fP database. Available
|
|
values include:
|
|
.TS
|
|
center;
|
|
|l|l|.
|
|
_
|
|
T{
|
|
Value
|
|
T} T{
|
|
Description
|
|
T}
|
|
_
|
|
T{
|
|
\fBwiredTiger\fP
|
|
T} T{
|
|
To specify the /core/wiredtiger\&.
|
|
T}
|
|
_
|
|
T{
|
|
\fBinMemory\fP
|
|
T} T{
|
|
To specify the /core/inmemory\&.
|
|
.sp
|
|
New in version 3.2: Available in MongoDB Enterprise only.
|
|
T}
|
|
_
|
|
.TE
|
|
.sp
|
|
If you attempt to start a \fBmongod\fP with a
|
|
\fI\%\-\-dbpath\fP that contains data files produced by a
|
|
storage engine other than the one specified by \fI\%\-\-storageEngine\fP, \fBmongod\fP
|
|
will refuse to start.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-dbpath <path>
|
|
\fIDefault\fP: \fB/data/db\fP on Linux and macOS, \fB\edata\edb\fP on Windows
|
|
.sp
|
|
The directory where the \fBmongod\fP instance stores its data.
|
|
.sp
|
|
If using the default
|
|
configuration file
|
|
included with a package manager installation of MongoDB, the
|
|
corresponding \fBstorage.dbPath\fP setting uses a different
|
|
default.
|
|
.sp
|
|
The files in \fI\%\-\-dbpath\fP must correspond to the storage engine
|
|
specified in \fI\%\-\-storageEngine\fP\&. If the data files do not
|
|
correspond to \fI\%\-\-storageEngine\fP, \fBmongod\fP will refuse to
|
|
start.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-directoryperdb
|
|
Uses a separate directory to store data for each database. The
|
|
directories are under the \fI\%\-\-dbpath\fP directory, and each subdirectory
|
|
name corresponds to the database name.
|
|
.sp
|
|
Not available for \fI\%mongod\fP instances that use the
|
|
in\-memory storage engine\&.
|
|
.sp
|
|
To change the \fI\%\-\-directoryperdb\fP option for existing
|
|
deployments:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
For standalone instances:
|
|
.INDENT 2.0
|
|
.IP 1. 3
|
|
Use \fI\%mongodump\fP on the existing
|
|
\fI\%mongod\fP instance to generate a backup.
|
|
.IP 2. 3
|
|
Stop the \fI\%mongod\fP instance.
|
|
.IP 3. 3
|
|
Add the \fI\%\-\-directoryperdb\fP value \fBand\fP
|
|
configure a new data directory
|
|
.IP 4. 3
|
|
Restart the \fI\%mongod\fP instance.
|
|
.IP 5. 3
|
|
Use \fI\%mongorestore\fP to populate the new data
|
|
directory.
|
|
.UNINDENT
|
|
.IP \(bu 2
|
|
For replica sets:
|
|
.INDENT 2.0
|
|
.IP 1. 3
|
|
Stop a secondary member.
|
|
.IP 2. 3
|
|
Add the \fI\%\-\-directoryperdb\fP value \fBand\fP
|
|
configure a new data directory to that secondary member.
|
|
.IP 3. 3
|
|
Restart that secondary.
|
|
.IP 4. 3
|
|
Use initial sync to populate
|
|
the new data directory.
|
|
.IP 5. 3
|
|
Update remaining secondaries in the same fashion.
|
|
.IP 6. 3
|
|
Step down the primary, and update the stepped\-down member in the
|
|
same fashion.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-syncdelay <value>
|
|
\fIDefault\fP: 60
|
|
.sp
|
|
Controls how much time can pass before MongoDB flushes data to the data
|
|
files via an fsync operation.
|
|
.sp
|
|
\fBDo not set this value on
|
|
production systems.\fP In almost every situation, you should use the
|
|
default setting.
|
|
.sp
|
|
\fBWARNING:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
If you set \fI\%\-\-syncdelay\fP to \fB0\fP, MongoDB will not sync the
|
|
memory mapped files to disk.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
The \fBmongod\fP process writes data very quickly to the journal and
|
|
lazily to the data files. \fI\%\-\-syncdelay\fP has no effect on the
|
|
\fBjournal\fP files or journaling,
|
|
but if \fI\%\-\-syncdelay\fP is set to \fB0\fP the journal will eventually consume
|
|
all available disk space. If you set \fI\%\-\-syncdelay\fP to \fB0\fP for testing
|
|
purposes, you should also set \fI\%\-\-nojournal\fP
|
|
to \fBtrue\fP\&.
|
|
.sp
|
|
The \fBserverStatus\fP command reports the background flush
|
|
thread\(aqs status via the \fBbackgroundFlushing\fP field.
|
|
.sp
|
|
Not available for \fI\%mongod\fP instances that use the
|
|
in\-memory storage engine\&.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-upgrade
|
|
Upgrades the on\-disk data format of the files specified by the
|
|
\fI\%\-\-dbpath\fP to the latest version, if needed.
|
|
.sp
|
|
This option only affects the operation of the \fBmongod\fP if the data
|
|
files are in an old format.
|
|
.sp
|
|
In most cases you should not set this value, so you can exercise the
|
|
most control over your upgrade process. See the MongoDB release notes
|
|
for more information about the upgrade process.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-repair
|
|
Changed in version 4.0.3.
|
|
|
|
.sp
|
|
Runs a repair routine on all databases for a \fI\%mongod\fP
|
|
instance. The operation attempts to salvage corrupt data as well as
|
|
rebuilds all the indexes. The operation discards any corrupt data
|
|
that cannot be salvaged.
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.SS Tip
|
|
.sp
|
|
If you are running with journaling enabled, there is
|
|
almost never any need to run repair since the server can use the
|
|
journal files to restore the data files to a clean state automatically.
|
|
However, you may need to run repair in cases where you need to recover
|
|
from a disk\-level data corruption.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
\fBWARNING:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.INDENT 0.0
|
|
.IP \(bu 2
|
|
Only use \fI\%mongod \-\-repair\fP if you have no other options.
|
|
The operation removes and does not save any corrupt data during
|
|
the repair process.
|
|
.IP \(bu 2
|
|
Avoid running \fI\%\-\-repair\fP against
|
|
a replica set member:
|
|
.INDENT 2.0
|
|
.IP \(bu 2
|
|
To repair a replica set member, if you have an intact
|
|
copy of your data available (e.g. a recent backup or an intact
|
|
member of the replica set), restore from that intact
|
|
copy instead(see /tutorial/resync\-replica\-set\-member).
|
|
.IP \(bu 2
|
|
If you do choose to run \fI\%mongod \-\-repair\fP against a
|
|
replica set member and the operation modifies the data or the
|
|
metadata, you must still perform a full resync in order for the
|
|
member to rejoin the replica set.
|
|
.UNINDENT
|
|
.IP \(bu 2
|
|
Before using \fI\%\-\-repair\fP, make a backup
|
|
copy of the \fI\%dbpath\fP directory.
|
|
.IP \(bu 2
|
|
If repair fails to complete for any reason, you must restart the
|
|
instance using the \fI\%\-\-repair\fP option.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-journal
|
|
Enables the durability journal to ensure data files remain valid
|
|
and recoverable. This option applies only when you specify the
|
|
\fI\%\-\-dbpath\fP option. \fBmongod\fP enables journaling by default.
|
|
.sp
|
|
Not available for \fI\%mongod\fP instances that use the
|
|
in\-memory storage engine\&.
|
|
.sp
|
|
If any voting member of a replica set uses the in\-memory
|
|
storage engine, you must set
|
|
\fBwriteConcernMajorityJournalDefault\fP to \fBfalse\fP\&.
|
|
.sp
|
|
Starting in version 4.2 (and 4.0.13 and 3.6.14 ), if a replica set
|
|
member uses the in\-memory storage engine
|
|
(voting or non\-voting) but the replica set has
|
|
\fBwriteConcernMajorityJournalDefault\fP set to true, the
|
|
replica set member logs a startup warning.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-nojournal
|
|
Disables journaling\&. \fBmongod\fP
|
|
enables journaling by default.
|
|
.sp
|
|
Not available for \fI\%mongod\fP instances that use the
|
|
in\-memory storage engine\&.
|
|
.sp
|
|
Starting in MongoDB 4.0, you cannot specify \fI\%\-\-nojournal\fP option or \fBstorage.journal.enabled:
|
|
false\fP for replica set members that use the
|
|
WiredTiger storage engine.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-journalCommitInterval <value>
|
|
\fIDefault\fP: 100
|
|
.sp
|
|
The maximum amount of time in milliseconds that
|
|
the \fBmongod\fP process allows between
|
|
journal operations. Values can range from 1 to 500 milliseconds. Lower
|
|
values increase the durability of the journal, at the expense of disk
|
|
performance.
|
|
.sp
|
|
On WiredTiger, the default journal commit interval is 100
|
|
milliseconds. Additionally, a write that includes or implies
|
|
\fBj:true\fP will cause an immediate sync of the journal. For details
|
|
or additional conditions that affect the frequency of the sync, see
|
|
journal\-process\&.
|
|
.sp
|
|
Not available for \fI\%mongod\fP instances that use the
|
|
in\-memory storage engine\&.
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Known Issue in 4.2.0: The \fI\%\-\-journalCommitInterval\fP is missing in 4.2.0.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SS WiredTiger Options
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-wiredTigerCacheSizeGB <float>
|
|
Defines the maximum size of the internal cache that WiredTiger will
|
|
use for all data. The memory consumed by an index build (see
|
|
\fBmaxIndexBuildMemoryUsageMegabytes\fP) is separate from the
|
|
WiredTiger cache memory.
|
|
.sp
|
|
Values can range from \fB0.25\fP GB to \fB10000\fP GB.
|
|
.sp
|
|
Starting in MongoDB 3.4, the default WiredTiger internal cache size is
|
|
the larger of either:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
50% of (RAM \- 1 GB), or
|
|
.IP \(bu 2
|
|
256 MB.
|
|
.UNINDENT
|
|
.sp
|
|
For example, on a system with a total of 4GB of RAM the WiredTiger
|
|
cache will use 1.5GB of RAM (\fB0.5 * (4 GB \- 1 GB) = 1.5 GB\fP).
|
|
Conversely, a system with a total of 1.25 GB of RAM will allocate 256
|
|
MB to the WiredTiger cache because that is more than half of the
|
|
total RAM minus one gigabyte (\fB0.5 * (1.25 GB \- 1 GB) = 128 MB < 256 MB\fP).
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
In some instances, such as when running in a container, the database
|
|
can have memory constraints that are lower than the total system
|
|
memory. In such instances, this memory limit, rather than the total
|
|
system memory, is used as the maximum RAM available.
|
|
.sp
|
|
To see the memory limit, see \fBhostInfo.system.memLimitMB\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
Avoid increasing the WiredTiger internal cache size above its
|
|
default value.
|
|
.sp
|
|
With WiredTiger, MongoDB utilizes both the WiredTiger internal cache
|
|
and the filesystem cache.
|
|
.sp
|
|
Via the filesystem cache, MongoDB automatically uses all free memory
|
|
that is not used by the WiredTiger cache or by other processes.
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
The \fI\%\-\-wiredTigerCacheSizeGB\fP limits the size of the WiredTiger internal
|
|
cache. The operating system will use the available free memory
|
|
for filesystem cache, which allows the compressed MongoDB data
|
|
files to stay in memory. In addition, the operating system will
|
|
use any free RAM to buffer file system blocks and file system
|
|
cache.
|
|
.sp
|
|
To accommodate the additional consumers of RAM, you may have to
|
|
decrease WiredTiger internal cache size.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
The default WiredTiger internal cache size value assumes that there is a
|
|
single \fI\%mongod\fP instance per machine. If a single machine
|
|
contains multiple MongoDB instances, then you should decrease the setting to
|
|
accommodate the other \fI\%mongod\fP
|
|
instances.
|
|
.sp
|
|
If you run \fI\%mongod\fP in a container (e.g. \fBlxc\fP,
|
|
\fBcgroups\fP, Docker, etc.) that does \fInot\fP have access to all of the
|
|
RAM available in a system, you must set \fI\%\-\-wiredTigerCacheSizeGB\fP to a value
|
|
less than the amount of RAM available in the container. The exact
|
|
amount depends on the other processes running in the container. See
|
|
\fBmemLimitMB\fP\&.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-wiredTigerMaxCacheOverflowFileSizeGB <float>
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.IP "Deprecated in MongoDB 4.4"
|
|
.sp
|
|
MongoDB deprecates the \fB\-\-wiredTigerMaxCacheOverflowFileSizeGB\fP
|
|
option. The option has no effect starting in MongoDB 4.4.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
Specifies the maximum size (in GB) for the "lookaside (or cache
|
|
overflow) table" file \fBWiredTigerLAS.wt\fP for MongoDB
|
|
4.2.1\-4.2.x and 4.0.12\-4.0.x. The file no longer exists starting in
|
|
version 4.4.
|
|
.sp
|
|
The setting can accept the following values:
|
|
.TS
|
|
center;
|
|
|l|l|.
|
|
_
|
|
T{
|
|
Value
|
|
T} T{
|
|
Description
|
|
T}
|
|
_
|
|
T{
|
|
\fB0\fP
|
|
T} T{
|
|
The default value. If set to \fB0\fP, the file size is
|
|
unbounded.
|
|
T}
|
|
_
|
|
T{
|
|
number >= 0.1
|
|
T} T{
|
|
The maximum size (in GB). If the \fBWiredTigerLAS.wt\fP
|
|
file exceeds this size, \fI\%mongod\fP exits with a
|
|
fatal assertion. You can clear the \fBWiredTigerLAS.wt\fP
|
|
file and restart \fI\%mongod\fP\&.
|
|
T}
|
|
_
|
|
.TE
|
|
.sp
|
|
To change the maximum size during runtime, use the
|
|
\fBwiredTigerMaxCacheOverflowSizeGB\fP parameter.
|
|
.sp
|
|
\fIAvailable starting in MongoDB 4.2.1 (and 4.0.12)\fP
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-wiredTigerJournalCompressor <compressor>
|
|
\fIDefault\fP: snappy
|
|
.sp
|
|
Specifies the type of compression to use to compress WiredTiger
|
|
journal data.
|
|
.sp
|
|
Available compressors are:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
\fBnone\fP
|
|
.IP \(bu 2
|
|
snappy
|
|
.IP \(bu 2
|
|
zlib
|
|
.IP \(bu 2
|
|
zstd (Available starting in MongoDB 4.2)
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-wiredTigerDirectoryForIndexes
|
|
When you start \fBmongod\fP with \fI\%\-\-wiredTigerDirectoryForIndexes\fP, \fBmongod\fP stores indexes and collections in separate
|
|
subdirectories under the data (i.e. \fI\%\-\-dbpath\fP) directory.
|
|
Specifically, \fBmongod\fP stores the indexes in a subdirectory named
|
|
\fBindex\fP and the collection data in a subdirectory named
|
|
\fBcollection\fP\&.
|
|
.sp
|
|
By using a symbolic link, you can specify a different location for
|
|
the indexes. Specifically, when \fI\%mongod\fP instance is \fBnot\fP
|
|
running, move the \fBindex\fP subdirectory to the destination and
|
|
create a symbolic link named \fBindex\fP under the data directory to
|
|
the new destination.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-wiredTigerCollectionBlockCompressor <compressor>
|
|
\fIDefault\fP: snappy
|
|
.sp
|
|
Specifies the default compression for collection data. You can
|
|
override this on a per\-collection basis when creating collections.
|
|
.sp
|
|
Available compressors are:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
\fBnone\fP
|
|
.IP \(bu 2
|
|
snappy
|
|
.IP \(bu 2
|
|
zlib
|
|
.IP \(bu 2
|
|
zstd (Available starting MongoDB 4.2)
|
|
.UNINDENT
|
|
.sp
|
|
\fI\%\-\-wiredTigerCollectionBlockCompressor\fP affects all collections created. If you change
|
|
the value of \fI\%\-\-wiredTigerCollectionBlockCompressor\fP on an existing MongoDB deployment, all new
|
|
collections will use the specified compressor. Existing collections
|
|
will continue to use the compressor specified when they were
|
|
created, or the default compressor at that time.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-wiredTigerIndexPrefixCompression <boolean>
|
|
\fIDefault\fP: true
|
|
.sp
|
|
Enables or disables prefix compression for index data.
|
|
.sp
|
|
Specify \fBtrue\fP for \fI\%\-\-wiredTigerIndexPrefixCompression\fP to enable prefix compression for
|
|
index data, or \fBfalse\fP to disable prefix compression for index data.
|
|
.sp
|
|
The \fI\%\-\-wiredTigerIndexPrefixCompression\fP setting affects all indexes created. If you change
|
|
the value of \fI\%\-\-wiredTigerIndexPrefixCompression\fP on an existing MongoDB deployment, all new
|
|
indexes will use prefix compression. Existing indexes
|
|
are not affected.
|
|
.UNINDENT
|
|
.SS Replication Options
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-replSet <setname>
|
|
Configures replication. Specify a replica set name as an argument to
|
|
this set. All hosts in the replica set must have the same set name.
|
|
.sp
|
|
Starting in MongoDB 4.0,
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
For the WiredTiger storage engine, \fI\%\-\-replSet\fP cannot be used in
|
|
conjunction with \fI\%\-\-nojournal\fP\&.
|
|
.UNINDENT
|
|
.sp
|
|
If your application connects to more than one replica set, each set
|
|
should have a distinct name. Some drivers group replica set
|
|
connections by replica set name.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-oplogSize <value>
|
|
Specifies a maximum size in megabytes for the replication operation log
|
|
(i.e., the oplog).
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Starting in MongoDB 4.0, the oplog can grow past its configured size
|
|
limit to avoid deleting the \fBmajority commit point\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
By default, the \fBmongod\fP process creates an oplog based on
|
|
the maximum amount of space available. For 64\-bit systems, the oplog
|
|
is typically 5% of available disk space.
|
|
.sp
|
|
Once the \fBmongod\fP has created the oplog for the first time,
|
|
changing the \fI\%\-\-oplogSize\fP option will not affect the size of
|
|
the oplog. To change the minimum oplog retention period after
|
|
starting the \fI\%mongod\fP, use
|
|
\fBreplSetResizeOplog\fP\&. \fBreplSetResizeOplog\fP
|
|
enables you to resize the oplog dynamically without restarting the
|
|
\fI\%mongod\fP process. To persist the changes made using
|
|
\fBreplSetResizeOplog\fP through a restart, update the value
|
|
of \fI\%\-\-oplogSize\fP\&.
|
|
.sp
|
|
See replica\-set\-oplog\-sizing for more information.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-oplogMinRetentionHours <value>
|
|
New in version 4.4: Specifies the minimum number of hours to preserve an oplog entry,
|
|
where the decimal values represent the fractions of an hour. For
|
|
example, a value of \fB1.5\fP represents one hour and thirty
|
|
minutes.
|
|
.sp
|
|
The value must be greater than or equal to \fB0\fP\&. A value of \fB0\fP
|
|
indicates that the \fI\%mongod\fP should truncate the oplog
|
|
starting with the oldest entries to maintain the configured
|
|
maximum oplog size.
|
|
|
|
.sp
|
|
Defaults to \fB0\fP\&.
|
|
.sp
|
|
A \fI\%mongod\fP started with \fB\-\-oplogMinRetentionHours\fP
|
|
only removes an oplog entry \fIif\fP:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
The oplog has reached the maximum configured oplog size \fIand\fP
|
|
.IP \(bu 2
|
|
The oplog entry is older than the configured number of hours based
|
|
on the host system clock.
|
|
.UNINDENT
|
|
.sp
|
|
The \fI\%mongod\fP has the following behavior when configured
|
|
with a minimum oplog retention period:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
The oplog can grow without constraint so as to retain oplog entries
|
|
for the configured number of hours. This may result in reduction or
|
|
exhaustion of system disk space due to a combination of high write
|
|
volume and large retention period.
|
|
.IP \(bu 2
|
|
If the oplog grows beyond its maximum size, the
|
|
\fI\%mongod\fP may continue to hold that disk space even if
|
|
the oplog returns to its maximum size \fIor\fP is configured for a
|
|
smaller maximum size. See replSetResizeOplog\-cmd\-compact\&.
|
|
.IP \(bu 2
|
|
The \fI\%mongod\fP compares the system wall clock to an
|
|
oplog entries creation wall clock time when enforcing oplog entry
|
|
retention. Clock drift between cluster components may result in
|
|
unexpected oplog retention behavior. See
|
|
production\-notes\-clock\-synchronization for more information on
|
|
clock synchronization across cluster members.
|
|
.UNINDENT
|
|
.sp
|
|
To change the minimum oplog retention period after starting the
|
|
\fI\%mongod\fP, use \fBreplSetResizeOplog\fP\&.
|
|
\fBreplSetResizeOplog\fP enables you to resize the oplog
|
|
dynamically without restarting the \fI\%mongod\fP process. To
|
|
persist the changes made using \fBreplSetResizeOplog\fP
|
|
through a restart, update the value of
|
|
\fI\%\-\-oplogMinRetentionHours\fP\&.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-enableMajorityReadConcern
|
|
\fIDefault\fP: true
|
|
.sp
|
|
Starting in MongoDB 3.6, MongoDB enables support for
|
|
\fB"majority"\fP read concern by default.
|
|
.sp
|
|
You can disable read concern \fB"majority"\fP to prevent
|
|
the storage cache pressure from immobilizing a deployment with a
|
|
three\-member primary\-secondary\-arbiter (PSA) architecture. For more
|
|
information about disabling read concern \fB"majority"\fP,
|
|
see disable\-read\-concern\-majority\&.
|
|
.sp
|
|
To disable, set \fI\%\-\-enableMajorityReadConcern\fP to false. \fI\%\-\-enableMajorityReadConcern\fP has no effect for
|
|
MongoDB versions: 4.0.0, 4.0.1, 4.0.2, 3.6.0.
|
|
.sp
|
|
\fBIMPORTANT:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
In general, avoid disabling \fB"majority"\fP read concern
|
|
unless necessary. However, if you have a three\-member replica set
|
|
with a primary\-secondary\-arbiter (PSA) architecture or a sharded
|
|
cluster with a three\-member PSA shards, disable to prevent the
|
|
storage cache pressure from immobilizing the deployment.
|
|
.sp
|
|
Disabling \fB"majority"\fP read concern affects support for
|
|
transactions on sharded clusters. Specifically:
|
|
.INDENT 0.0
|
|
.IP \(bu 2
|
|
A transaction cannot use read concern \fB"snapshot"\fP if
|
|
the transaction involves a shard that has disabled read
|
|
concern "majority"\&.
|
|
.IP \(bu 2
|
|
A transaction that writes to multiple shards errors if any of the
|
|
transaction\(aqs read or write operations involves a shard that has
|
|
disabled read concern \fB"majority"\fP\&.
|
|
.UNINDENT
|
|
.sp
|
|
However, it does not affect transactions
|
|
on replica sets. For transactions on replica sets, you can specify
|
|
read concern \fB"majority"\fP (or \fB"snapshot"\fP
|
|
or \fB"local"\fP ) for multi\-document transactions even if
|
|
read concern \fB"majority"\fP is disabled.
|
|
.sp
|
|
Disabling \fB"majority"\fP read concern disables support
|
|
for /changeStreams for MongoDB 4.0 and earlier. For MongoDB
|
|
4.2+, disabling read concern \fB"majority"\fP has no effect on change
|
|
streams availability.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SS Sharded Cluster Options
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-configsvr
|
|
\fIRequired if starting a config server.\fP
|
|
.sp
|
|
Declares that this \fBmongod\fP instance serves as the config
|
|
server of a sharded cluster. When
|
|
running with this option, clients (i.e. other cluster components)
|
|
cannot write data to any database other than \fBconfig\fP
|
|
and \fBadmin\fP\&. The default port for a \fBmongod\fP with this option is
|
|
\fB27019\fP and the default \fI\%\-\-dbpath\fP directory is
|
|
\fB/data/configdb\fP, unless specified.
|
|
.sp
|
|
\fBIMPORTANT:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Starting in 3.4, you must deploy config servers as a replica set.
|
|
The use of the deprecated mirrored \fI\%mongod\fP instances as
|
|
config servers (SCCC) is no longer supported.
|
|
.sp
|
|
The replica set config servers (CSRS) must run the
|
|
WiredTiger storage engine\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
The \fI\%\-\-configsvr\fP option creates a local oplog\&.
|
|
.sp
|
|
Do not use the \fI\%\-\-configsvr\fP option with \fI\%\-\-shardsvr\fP\&. Config
|
|
servers cannot be a shard server.
|
|
.sp
|
|
Do not use the \fI\%\-\-configsvr\fP with the
|
|
\fBskipShardingConfigurationChecks\fP parameter. That is, if
|
|
you are temporarily starting the \fI\%mongod\fP as a
|
|
standalone for maintenance operations, include the parameter
|
|
\fBskipShardingConfigurationChecks\fP and exclude \fI\%\-\-configsvr\fP\&.
|
|
Once maintenance has completed, remove the
|
|
\fBskipShardingConfigurationChecks\fP parameter and restart
|
|
with \fI\%\-\-configsvr\fP\&.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-configsvrMode <string>
|
|
\fBAvailable in MongoDB 3.2 version only\fP
|
|
.sp
|
|
If set to \fBsccc\fP, indicates that the config servers are deployed
|
|
as three mirrored \fI\%mongod\fP instances, even if one or more
|
|
config servers is also a member of a replica set. \fBconfigsvrMode\fP
|
|
only accepts the value \fBsccc\fP\&.
|
|
.sp
|
|
If unset, config servers running as replica sets expect to use the
|
|
"config server replica set" protocol for writing to config servers,
|
|
rather than the "mirrored mongod" write protocol.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-shardsvr
|
|
\fIRequired if starting a shard server.\fP
|
|
.sp
|
|
Configures this \fBmongod\fP instance as a shard in a
|
|
sharded cluster. The default port for these instances is
|
|
\fB27018\fP\&.
|
|
.sp
|
|
\fBIMPORTANT:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Starting in MongoDB 3.6, you must deploy shards as replica sets. See the \fI\%\-\-replSet\fP
|
|
option to deploy \fBmongod\fP as part of a replica set.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
Do not use the \fI\%\-\-shardsvr\fP with the
|
|
\fBskipShardingConfigurationChecks\fP parameter. That is, if
|
|
you are temporarily starting the \fI\%mongod\fP as a
|
|
standalone for maintenance operations, include the parameter
|
|
\fBskipShardingConfigurationChecks\fP and exclude \fI\%\-\-shardsvr\fP\&.
|
|
Once maintenance has completed, remove the
|
|
\fBskipShardingConfigurationChecks\fP parameter and restart
|
|
with \fI\%\-\-shardsvr\fP\&.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-moveParanoia
|
|
If specified, during chunk migration, a shard saves,
|
|
to the \fBmoveChunk\fP directory of the \fB\-\-dbpath\fP, all documents
|
|
migrated from that shard.
|
|
.sp
|
|
MongoDB does not automatically delete the data saved in the
|
|
\fBmoveChunk\fP directory.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-noMoveParanoia
|
|
Changed in version 3.2: Starting in 3.2, MongoDB uses \fB\-\-noMoveParanoia\fP as the default.
|
|
|
|
.sp
|
|
During chunk migration, a shard does not save documents migrated from
|
|
the shard.
|
|
.UNINDENT
|
|
.SS TLS Options
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
.SS See
|
|
.sp
|
|
/tutorial/configure\-ssl for full
|
|
documentation of MongoDB\(aqs support.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-tlsMode <mode>
|
|
New in version 4.2.
|
|
|
|
.sp
|
|
Enables TLS used for all network connections. The
|
|
argument to the \fI\%\-\-tlsMode\fP option can be one of the following:
|
|
.TS
|
|
center;
|
|
|l|l|.
|
|
_
|
|
T{
|
|
Value
|
|
T} T{
|
|
Description
|
|
T}
|
|
_
|
|
T{
|
|
\fBdisabled\fP
|
|
T} T{
|
|
The server does not use TLS.
|
|
T}
|
|
_
|
|
T{
|
|
\fBallowTLS\fP
|
|
T} T{
|
|
Connections between servers do not use TLS. For incoming
|
|
connections, the server accepts both TLS and non\-TLS.
|
|
T}
|
|
_
|
|
T{
|
|
\fBpreferTLS\fP
|
|
T} T{
|
|
Connections between servers use TLS. For incoming
|
|
connections, the server accepts both TLS and non\-TLS.
|
|
T}
|
|
_
|
|
T{
|
|
\fBrequireTLS\fP
|
|
T} T{
|
|
The server uses and accepts only TLS encrypted connections.
|
|
T}
|
|
_
|
|
.TE
|
|
.sp
|
|
If \fB\-\-tlsCAFile\fP or \fBtls.CAFile\fP is not
|
|
specified and you are not using x.509 authentication, the
|
|
system\-wide CA certificate store will be used when connecting to an
|
|
TLS\-enabled server.
|
|
.sp
|
|
If using x.509 authentication, \fB\-\-tlsCAFile\fP or \fBtls.CAFile\fP
|
|
must be specified unless using \fI\%\-\-tlsCertificateSelector\fP\&.
|
|
.sp
|
|
For more information about TLS and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-tlsCertificateKeyFile <filename>
|
|
New in version 4.2: Specifies the \fB\&.pem\fP file that contains both the TLS
|
|
certificate and key.
|
|
|
|
.sp
|
|
Starting with MongoDB 4.0 on macOS or Windows, you can use the
|
|
\fI\%\-\-tlsCertificateSelector\fP option to specify a
|
|
certificate from the operating system\(aqs secure certificate store
|
|
instead of a PEM key file. \fI\%\-\-tlsCertificateKeyFile\fP and
|
|
\fI\%\-\-tlsCertificateSelector\fP options are mutually exclusive.
|
|
You can only specify one.
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
On Linux/BSD, you must specify \fI\%\-\-tlsCertificateKeyFile\fP
|
|
when TLS/SSL is enabled.
|
|
.IP \(bu 2
|
|
On Windows or macOS, you must specify either
|
|
\fI\%\-\-tlsCertificateKeyFile\fP or
|
|
\fI\%\-\-tlsCertificateSelector\fP when TLS/SSL is enabled.
|
|
.sp
|
|
\fBIMPORTANT:\fP
|
|
.INDENT 2.0
|
|
.INDENT 3.5
|
|
For Windows \fBonly\fP, MongoDB 4.0 and later do not support
|
|
encrypted PEM files. The \fI\%mongod\fP fails to start if
|
|
it encounters an encrypted PEM file. To securely store and
|
|
access a certificate for use with TLS on Windows,
|
|
use \fI\%\-\-tlsCertificateSelector\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
For more information about TLS and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-tlsCertificateKeyFilePassword <value>
|
|
New in version 4.2.
|
|
|
|
.sp
|
|
Specifies the password to de\-crypt the certificate\-key file (i.e.
|
|
\fI\%\-\-tlsCertificateKeyFile\fP). Use the
|
|
\fI\%\-\-tlsCertificateKeyFilePassword\fP option only if the
|
|
certificate\-key file is encrypted. In all cases, the
|
|
\fBmongod\fP will redact the password from all logging and
|
|
reporting output.
|
|
.sp
|
|
Starting in MongoDB 4.0:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
On Linux/BSD, if the private key in the PEM file is encrypted and
|
|
you do not specify the \fI\%\-\-tlsCertificateKeyFilePassword\fP option, MongoDB will prompt for a
|
|
passphrase. See ssl\-certificate\-password\&.
|
|
.IP \(bu 2
|
|
On macOS, if the private key in the PEM file is
|
|
encrypted, you must explicitly specify the
|
|
\fI\%\-\-tlsCertificateKeyFilePassword\fP option. Alternatively,
|
|
you can use a certificate from the secure system store (see
|
|
\fI\%\-\-tlsCertificateSelector\fP) instead of a PEM file or use an
|
|
unencrypted PEM file.
|
|
.IP \(bu 2
|
|
On Windows, MongoDB does not support encrypted certificates.
|
|
The \fI\%mongod\fP fails if it encounters an encrypted
|
|
PEM file. Use \fI\%\-\-tlsCertificateSelector\fP instead.
|
|
.UNINDENT
|
|
.sp
|
|
For more information about TLS and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-clusterAuthMode <option>
|
|
\fIDefault\fP: keyFile
|
|
.sp
|
|
The authentication mode used for cluster authentication. If you use
|
|
internal x.509 authentication,
|
|
specify so here. This option can have one of the following values:
|
|
.TS
|
|
center;
|
|
|l|l|.
|
|
_
|
|
T{
|
|
Value
|
|
T} T{
|
|
Description
|
|
T}
|
|
_
|
|
T{
|
|
\fBkeyFile\fP
|
|
T} T{
|
|
Use a keyfile for authentication.
|
|
Accept only keyfiles.
|
|
T}
|
|
_
|
|
T{
|
|
\fBsendKeyFile\fP
|
|
T} T{
|
|
For rolling upgrade purposes. Send a keyfile for
|
|
authentication but can accept both keyfiles and x.509
|
|
certificates.
|
|
T}
|
|
_
|
|
T{
|
|
\fBsendX509\fP
|
|
T} T{
|
|
For rolling upgrade purposes. Send the x.509 certificate for
|
|
authentication but can accept both keyfiles and x.509
|
|
certificates.
|
|
T}
|
|
_
|
|
T{
|
|
\fBx509\fP
|
|
T} T{
|
|
Recommended. Send the x.509 certificate for authentication and
|
|
accept only x.509 certificates.
|
|
T}
|
|
_
|
|
.TE
|
|
.sp
|
|
If \fB\-\-tlsCAFile\fP or \fBtls.CAFile\fP is not
|
|
specified and you are not using x.509 authentication, the
|
|
system\-wide CA certificate store will be used when connecting to an
|
|
TLS\-enabled server.
|
|
.sp
|
|
If using x.509 authentication, \fB\-\-tlsCAFile\fP or \fBtls.CAFile\fP
|
|
must be specified unless using \fI\%\-\-tlsCertificateSelector\fP\&.
|
|
.sp
|
|
For more information about TLS and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-tlsClusterFile <filename>
|
|
New in version 4.2: Specifies the \fB\&.pem\fP file that contains the x.509
|
|
certificate\-key file for membership authentication for the cluster or replica set.
|
|
|
|
.sp
|
|
Starting with MongoDB 4.0 on macOS or Windows, you can use the
|
|
\fI\%\-\-tlsClusterCertificateSelector\fP option to specify a
|
|
certificate from the operating system\(aqs secure certificate store
|
|
instead of a PEM key file. \fI\%\-\-tlsClusterFile\fP and
|
|
\fI\%\-\-tlsClusterCertificateSelector\fP options are mutually
|
|
exclusive. You can only specify one.
|
|
.sp
|
|
If \fI\%\-\-tlsClusterFile\fP does not specify the \fB\&.pem\fP file for
|
|
internal cluster authentication or the alternative
|
|
\fI\%\-\-tlsClusterCertificateSelector\fP, the cluster uses the
|
|
\fB\&.pem\fP file specified in the \fI\%\-\-tlsCertificateKeyFile\fP
|
|
option or the certificate returned by the
|
|
\fI\%\-\-tlsCertificateSelector\fP\&.
|
|
.sp
|
|
If using x.509 authentication, \fB\-\-tlsCAFile\fP or \fBtls.CAFile\fP
|
|
must be specified unless using \fI\%\-\-tlsCertificateSelector\fP\&.
|
|
.sp
|
|
Changed in version 4.4: \fI\%mongod\fP / \fBmongos\fP logs a warning on
|
|
connection if the presented x.509 certificate expires within \fB30\fP
|
|
days of the \fBmongod/mongos\fP host system time. See
|
|
4.4\-rel\-notes\-certificate\-expiration\-warning for more
|
|
information.
|
|
|
|
.sp
|
|
For more information about TLS and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.sp
|
|
\fBIMPORTANT:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
For Windows \fBonly\fP, MongoDB 4.0 and later do not support
|
|
encrypted PEM files. The \fI\%mongod\fP fails to start if
|
|
it encounters an encrypted PEM file. To securely store and
|
|
access a certificate for use with membership authentication on
|
|
Windows, use \fI\%\-\-tlsClusterCertificateSelector\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-tlsCertificateSelector <parameter>=<value>
|
|
New in version 4.2: Available on Windows and macOS as an alternative to
|
|
\fI\%\-\-tlsCertificateKeyFile\fP\&. In version 4.0, see
|
|
\fI\%\-\-sslCertificateSelector\fP\&.
|
|
|
|
.sp
|
|
Specifies a certificate property in order to select a matching
|
|
certificate from the operating system\(aqs certificate store to use for
|
|
TLS.
|
|
.sp
|
|
The \fI\%\-\-tlsCertificateKeyFile\fP and
|
|
\fI\%\-\-tlsCertificateSelector\fP options are mutually exclusive.
|
|
You can only specify one.
|
|
.sp
|
|
\fI\%\-\-tlsCertificateSelector\fP accepts an argument of the format
|
|
\fB<property>=<value>\fP where the property can be one of the
|
|
following:
|
|
.TS
|
|
center;
|
|
|l|l|l|.
|
|
_
|
|
T{
|
|
Property
|
|
T} T{
|
|
Value type
|
|
T} T{
|
|
Description
|
|
T}
|
|
_
|
|
T{
|
|
\fBsubject\fP
|
|
T} T{
|
|
ASCII string
|
|
T} T{
|
|
Subject name or common name on certificate
|
|
T}
|
|
_
|
|
T{
|
|
\fBthumbprint\fP
|
|
T} T{
|
|
hex string
|
|
T} T{
|
|
A sequence of bytes, expressed as hexadecimal, used to
|
|
identify a public key by its SHA\-1 digest.
|
|
.sp
|
|
The \fBthumbprint\fP is sometimes referred to as a
|
|
\fBfingerprint\fP\&.
|
|
T}
|
|
_
|
|
.TE
|
|
.sp
|
|
When using the system SSL certificate store, OCSP (Online
|
|
Certificate Status Protocol) is used to validate the revocation
|
|
status of certificates.
|
|
.sp
|
|
The \fI\%mongod\fP searches the operating system\(aqs secure
|
|
certificate store for the CA certificates required to validate the
|
|
full certificate chain of the specified TLS certificate.
|
|
Specifically, the secure certificate store must contain the root CA
|
|
and any intermediate CA certificates required to build the full
|
|
certificate chain to the TLS certificate. Do \fBnot\fP use
|
|
\fI\%\-\-tlsCAFile\fP or \fI\%\-\-tlsClusterCAFile\fP to specify the
|
|
root and intermediate CA certificate
|
|
.sp
|
|
For example, if the TLS/SSL certificate was signed with a single root
|
|
CA certificate, the secure certificate store must contain that root
|
|
CA certificate. If the TLS/SSL certificate was signed with an
|
|
intermediate CA certificate, the secure certificate store must
|
|
contain the intermedia CA certificate \fIand\fP the root CA certificate.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-tlsClusterCertificateSelector <parameter>=<value>
|
|
New in version 4.2: Available on Windows and macOS as an alternative to
|
|
\fI\%\-\-tlsClusterFile\fP\&.
|
|
.sp
|
|
Specifies a certificate property in order to select a matching
|
|
certificate from the operating system\(aqs certificate store to use
|
|
for internal x.509 membership authentication\&.
|
|
.sp
|
|
\fI\%\-\-tlsClusterFile\fP and
|
|
\fI\%\-\-tlsClusterCertificateSelector\fP options are mutually
|
|
exclusive. You can only specify one.
|
|
|
|
.sp
|
|
\fI\%\-\-tlsClusterCertificateSelector\fP accepts an argument of the
|
|
format \fB<property>=<value>\fP where the property can be one of the
|
|
following:
|
|
.TS
|
|
center;
|
|
|l|l|l|.
|
|
_
|
|
T{
|
|
Property
|
|
T} T{
|
|
Value type
|
|
T} T{
|
|
Description
|
|
T}
|
|
_
|
|
T{
|
|
\fBsubject\fP
|
|
T} T{
|
|
ASCII string
|
|
T} T{
|
|
Subject name or common name on certificate
|
|
T}
|
|
_
|
|
T{
|
|
\fBthumbprint\fP
|
|
T} T{
|
|
hex string
|
|
T} T{
|
|
A sequence of bytes, expressed as hexadecimal, used to
|
|
identify a public key by its SHA\-1 digest.
|
|
.sp
|
|
The \fBthumbprint\fP is sometimes referred to as a
|
|
\fBfingerprint\fP\&.
|
|
T}
|
|
_
|
|
.TE
|
|
.sp
|
|
The \fI\%mongod\fP searches the operating system\(aqs secure
|
|
certificate store for the CA certificates required to validate the
|
|
full certificate chain of the specified cluster certificate.
|
|
Specifically, the secure certificate store must contain the root CA
|
|
and any intermediate CA certificates required to build the full
|
|
certificate chain to the cluster certificate. Do \fBnot\fP use
|
|
\fI\%\-\-tlsCAFile\fP or \fI\%\-\-tlsClusterCAFile\fP to specify the
|
|
root and intermediate CA certificate.
|
|
.sp
|
|
For example, if the cluster certificate was signed with a single root
|
|
CA certificate, the secure certificate store must contain that root
|
|
CA certificate. If the cluster certificate was signed with an
|
|
intermediate CA certificate, the secure certificate store must
|
|
contain the intermedia CA certificate \fIand\fP the root CA certificate.
|
|
.sp
|
|
Changed in version 4.4: \fI\%mongod\fP / \fBmongos\fP logs a warning on
|
|
connection if the presented x.509 certificate expires within \fB30\fP
|
|
days of the \fBmongod/mongos\fP host system time. See
|
|
4.4\-rel\-notes\-certificate\-expiration\-warning for more
|
|
information.
|
|
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-tlsClusterPassword <value>
|
|
New in version 4.2: Specifies the password to de\-crypt the x.509 certificate\-key file
|
|
specified with \fI\%\-\-tlsClusterFile\fP\&. Use the
|
|
\fI\%\-\-tlsClusterPassword\fP option only if the certificate\-key
|
|
file is encrypted. In all cases, the \fBmongod\fP will redact
|
|
the password from all logging and reporting output.
|
|
|
|
.sp
|
|
Starting in MongoDB 4.0:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
On Linux/BSD, if the private key in the x.509 file is encrypted and
|
|
you do not specify the \fI\%\-\-tlsClusterPassword\fP option,
|
|
MongoDB will prompt for a passphrase. See
|
|
ssl\-certificate\-password\&.
|
|
.IP \(bu 2
|
|
On macOS, if the private key in the x.509 file is
|
|
encrypted, you must explicitly specify the
|
|
\fI\%\-\-tlsClusterPassword\fP option. Alternatively, you can
|
|
either use a certificate from the secure system store (see
|
|
\fI\%\-\-tlsClusterCertificateSelector\fP) instead of a cluster PEM
|
|
file or use an unencrypted PEM file.
|
|
.IP \(bu 2
|
|
On Windows, MongoDB does not support encrypted certificates.
|
|
The \fI\%mongod\fP fails if it encounters an encrypted
|
|
PEM file. Use \fI\%\-\-tlsClusterCertificateSelector\fP instead.
|
|
.UNINDENT
|
|
.sp
|
|
For more information about TLS and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-tlsCAFile <filename>
|
|
New in version 4.2.
|
|
|
|
.sp
|
|
Specifies the \fB\&.pem\fP file that contains the root certificate
|
|
chain from the Certificate Authority. Specify the file name of the
|
|
\fB\&.pem\fP file using relative or absolute paths.
|
|
.INDENT 7.0
|
|
.TP
|
|
.B Windows/macOS Only
|
|
If using \fI\%\-\-tlsCertificateSelector\fP and/or
|
|
\fI\%\-\-tlsClusterCertificateSelector\fP, do \fBnot\fP use
|
|
\fI\%\-\-tlsCAFile\fP to specify the root and intermediate CA
|
|
certificates. Store all CA certificates required to validate the
|
|
full trust chain of the \fI\%\-\-tlsCertificateSelector\fP and/or
|
|
\fI\%\-\-tlsClusterCertificateSelector\fP certificates in the
|
|
secure certificate store.
|
|
.UNINDENT
|
|
.sp
|
|
For more information about TLS and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-tlsClusterCAFile <filename>
|
|
New in version 4.2.
|
|
|
|
.sp
|
|
Specifies the \fB\&.pem\fP file that contains the root certificate
|
|
chain from the Certificate Authority used to validate the certificate
|
|
presented by a client establishing a connection. Specify the file
|
|
name of the \fB\&.pem\fP file using relative or absolute paths.
|
|
\fI\%\-\-tlsClusterCAFile\fP requires that
|
|
\fI\%\-\-tlsCAFile\fP is set.
|
|
.sp
|
|
If \fI\%\-\-tlsClusterCAFile\fP does not specify the \fB\&.pem\fP
|
|
file for validating the certificate from a client establishing a
|
|
connection, the cluster uses the \fB\&.pem\fP file specified in the
|
|
\fI\%\-\-tlsCAFile\fP option.
|
|
.sp
|
|
\fI\%\-\-tlsClusterCAFile\fP lets you use separate Certificate
|
|
Authorities to verify the client to server and server to client
|
|
portions of the TLS handshake.
|
|
.INDENT 7.0
|
|
.TP
|
|
.B Windows/macOS Only
|
|
If using \fI\%\-\-tlsCertificateSelector\fP and/or
|
|
\fI\%\-\-tlsClusterCertificateSelector\fP, do \fBnot\fP use
|
|
\fI\%\-\-tlsClusterCAFile\fP to specify the root and
|
|
intermediate CA certificates. Store all CA certificates required to
|
|
validate the full trust chain of the
|
|
\fI\%\-\-tlsCertificateSelector\fP and/or
|
|
\fI\%\-\-tlsClusterCertificateSelector\fP certificates in the
|
|
secure certificate store.
|
|
.UNINDENT
|
|
.sp
|
|
For more information about TLS and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-tlsCRLFile <filename>
|
|
New in version 4.2: For MongoDB 4.0 and earlier, see \fI\%\-\-sslCRLFile\fP\&.
|
|
|
|
.sp
|
|
Specifies the \fB\&.pem\fP file that contains the Certificate Revocation
|
|
List. Specify the file name of the \fB\&.pem\fP file using relative or
|
|
absolute paths.
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.INDENT 0.0
|
|
.IP \(bu 2
|
|
Starting in MongoDB 4.0, you cannot specify a CRL file on
|
|
macOS. Instead, you can use the system SSL certificate store,
|
|
which uses OCSP (Online Certificate Status Protocol) to
|
|
validate the revocation status of certificates. See
|
|
\fI\%\-\-sslCertificateSelector\fP in MongoDB 4.0 and
|
|
\fI\%\-\-tlsCertificateSelector\fP in MongoDB 4.2+ to use the
|
|
system SSL certificate store.
|
|
.IP \(bu 2
|
|
Starting in version 4.4, to check for certificate revocation,
|
|
MongoDB \fBenables\fP the use of OCSP
|
|
(Online Certificate Status Protocol) by default as an
|
|
alternative to specifying a CRL file or using the system SSL
|
|
certificate store.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
For more information about TLS and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-tlsAllowInvalidCertificates
|
|
New in version 4.2.
|
|
|
|
.sp
|
|
Bypasses the validation checks for TLS certificates on other
|
|
servers in the cluster and allows the use of invalid certificates to
|
|
connect.
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
If you specify
|
|
\fB\-\-tlsAllowInvalidCertificates\fP or \fBtls.allowInvalidCertificates:
|
|
true\fP when using x.509 authentication, an invalid certificate is
|
|
only sufficient to establish a TLS connection but is
|
|
\fIinsufficient\fP for authentication.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
When using
|
|
the \fI\%\-\-tlsAllowInvalidCertificates\fP setting, MongoDB
|
|
logs a warning regarding the use of the invalid certificate.
|
|
.sp
|
|
For more information about TLS and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-tlsAllowInvalidHostnames
|
|
New in version 4.2.
|
|
|
|
.sp
|
|
Disables the validation of the hostnames in TLS certificates,
|
|
when connecting to other members of the replica set or sharded cluster
|
|
for inter\-process authentication. This allows \fBmongod\fP to connect
|
|
to other members if the hostnames in their certificates do not match
|
|
their configured hostname.
|
|
.sp
|
|
For more information about TLS and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-tlsAllowConnectionsWithoutCertificates
|
|
New in version 4.2.
|
|
|
|
.sp
|
|
For clients that do not present certificates, \fBmongod\fP bypasses
|
|
TLS/SSL certificate validation when establishing the connection.
|
|
.sp
|
|
For clients that present a certificate, however, \fBmongod\fP performs
|
|
certificate validation using the root certificate chain specified by
|
|
\fB\-\-tlsCAFile\fP and reject clients with invalid certificates.
|
|
.sp
|
|
Use the \fI\%\-\-tlsAllowConnectionsWithoutCertificates\fP option if you have a mixed deployment that includes
|
|
clients that do not or cannot present certificates to the \fBmongod\fP\&.
|
|
.sp
|
|
For more information about TLS and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-tlsDisabledProtocols <protocol(s)>
|
|
New in version 4.2.
|
|
|
|
.sp
|
|
Prevents a MongoDB server running with TLS from accepting
|
|
incoming connections that use a specific protocol or protocols. To
|
|
specify multiple protocols, use a comma separated list of protocols.
|
|
.sp
|
|
\fI\%\-\-tlsDisabledProtocols\fP recognizes the following protocols: \fBTLS1_0\fP, \fBTLS1_1\fP,
|
|
\fBTLS1_2\fP, and \fBTLS1_3\fP\&.
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
On macOS, you cannot disable \fBTLS1_1\fP and leave both \fBTLS1_0\fP and
|
|
\fBTLS1_2\fP enabled. You must disable at least one of the other
|
|
two, for example, \fBTLS1_0,TLS1_1\fP\&.
|
|
.IP \(bu 2
|
|
To list multiple protocols, specify as a comma separated list of
|
|
protocols. For example \fBTLS1_0,TLS1_1\fP\&.
|
|
.IP \(bu 2
|
|
Specifying an unrecognized protocol will prevent the server from
|
|
starting.
|
|
.IP \(bu 2
|
|
The specified disabled protocols overrides any default disabled
|
|
protocols.
|
|
.UNINDENT
|
|
.sp
|
|
Starting in version 4.0, MongoDB disables the use of TLS 1.0 if TLS
|
|
1.1+ is available on the system. To enable the disabled TLS 1.0,
|
|
specify \fBnone\fP to \fI\%\-\-tlsDisabledProtocols\fP\&. See 4.0\-disable\-tls\&.
|
|
.sp
|
|
Members of replica sets and sharded clusters must speak at least one
|
|
protocol in common.
|
|
.sp
|
|
\fBSEE ALSO:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
ssl\-disallow\-protocols
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-tlsFIPSMode
|
|
New in version 4.2.
|
|
|
|
.sp
|
|
Directs the \fBmongod\fP to use the FIPS mode of the TLS
|
|
library. Your system must have a FIPS
|
|
compliant library to use the \fI\%\-\-tlsFIPSMode\fP option.
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
FIPS\-compatible TLS/SSL is
|
|
available only in \fI\%MongoDB Enterprise\fP\&. See
|
|
/tutorial/configure\-fips for more information.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SS SSL Options (Deprecated)
|
|
.sp
|
|
\fBIMPORTANT:\fP
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
All SSL options are deprecated since 4.2. Use the \fI\%TLS counterparts\fP instead, as they have identical functionality to the
|
|
SSL options. The SSL protocol is deprecated and MongoDB supports TLS 1.0
|
|
and later.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
.SS See
|
|
.sp
|
|
/tutorial/configure\-ssl for full
|
|
documentation of MongoDB\(aqs support.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-sslOnNormalPorts
|
|
Deprecated since version 2.6: Use \fI\%\-\-tlsMode requireTLS\fP instead.
|
|
|
|
.sp
|
|
Enables TLS/SSL for \fBmongod\fP\&.
|
|
.sp
|
|
With \fI\%\-\-sslOnNormalPorts\fP, a \fBmongod\fP requires TLS/SSL encryption for all
|
|
connections on the default MongoDB port, or the port specified by
|
|
\fI\%\-\-port\fP\&. By default, \fI\%\-\-sslOnNormalPorts\fP is
|
|
disabled.
|
|
.sp
|
|
For more information about TLS/SSL and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-sslMode <mode>
|
|
Deprecated since version 4.2: Use \fI\%\-\-tlsMode\fP instead.
|
|
|
|
.sp
|
|
Enables TLS/SSL or mixed TLS/SSL used for all network connections. The
|
|
argument to the \fI\%\-\-sslMode\fP option can be one of the following:
|
|
.TS
|
|
center;
|
|
|l|l|.
|
|
_
|
|
T{
|
|
Value
|
|
T} T{
|
|
Description
|
|
T}
|
|
_
|
|
T{
|
|
\fBdisabled\fP
|
|
T} T{
|
|
The server does not use TLS/SSL.
|
|
T}
|
|
_
|
|
T{
|
|
\fBallowSSL\fP
|
|
T} T{
|
|
Connections between servers do not use TLS/SSL. For incoming
|
|
connections, the server accepts both TLS/SSL and non\-TLS/non\-SSL.
|
|
T}
|
|
_
|
|
T{
|
|
\fBpreferSSL\fP
|
|
T} T{
|
|
Connections between servers use TLS/SSL. For incoming
|
|
connections, the server accepts both TLS/SSL and non\-TLS/non\-SSL.
|
|
T}
|
|
_
|
|
T{
|
|
\fBrequireSSL\fP
|
|
T} T{
|
|
The server uses and accepts only TLS/SSL encrypted connections.
|
|
T}
|
|
_
|
|
.TE
|
|
.sp
|
|
Starting in version 3.4, if \fB\-\-tlsCAFile\fP/\fBnet.tls.CAFile\fP (or
|
|
their aliases \fB\-\-sslCAFile\fP/\fBnet.ssl.CAFile\fP) is not specified
|
|
and you are not using x.509 authentication, the system\-wide CA
|
|
certificate store will be used when connecting to an TLS/SSL\-enabled
|
|
server.
|
|
.sp
|
|
To use x.509 authentication, \fB\-\-tlsCAFile\fP or \fBnet.tls.CAFile\fP
|
|
must be specified unless using \fB\-\-tlsCertificateSelector\fP or
|
|
\fB\-\-net.tls.certificateSelector\fP\&. Or if using the \fBssl\fP aliases,
|
|
\fB\-\-sslCAFile\fP or \fBnet.ssl.CAFile\fP must be specified unless using
|
|
\fB\-\-sslCertificateSelector\fP or \fBnet.ssl.certificateSelector\fP\&.
|
|
.sp
|
|
For more information about TLS/SSL and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-sslPEMKeyFile <filename>
|
|
Deprecated since version 4.2: Use \fI\%\-\-tlsCertificateKeyFile\fP instead.
|
|
|
|
.sp
|
|
Specifies the \fB\&.pem\fP file that contains both the TLS/SSL
|
|
certificate and key.
|
|
.sp
|
|
Starting with MongoDB 4.0 on macOS or Windows, you can use the
|
|
\fI\%\-\-sslCertificateSelector\fP option to specify a
|
|
certificate from the operating system\(aqs secure certificate store
|
|
instead of a PEM key file. \fI\%\-\-sslPEMKeyFile\fP and
|
|
\fI\%\-\-sslCertificateSelector\fP options are mutually exclusive.
|
|
You can only specify one.
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
On Linux/BSD, you must specify \fI\%\-\-sslPEMKeyFile\fP when
|
|
TLS/SSL is enabled.
|
|
.IP \(bu 2
|
|
On Windows or macOS, you must specify either
|
|
\fI\%\-\-sslPEMKeyFile\fP or \fI\%\-\-sslCertificateSelector\fP
|
|
when TLS/SSL is enabled.
|
|
.sp
|
|
\fBIMPORTANT:\fP
|
|
.INDENT 2.0
|
|
.INDENT 3.5
|
|
For Windows \fBonly\fP, MongoDB 4.0 and later do not support
|
|
encrypted PEM files. The \fI\%mongod\fP fails to start if
|
|
it encounters an encrypted PEM file. To securely store and
|
|
access a certificate for use with TLS/SSL on Windows,
|
|
use \fI\%\-\-sslCertificateSelector\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
For more information about TLS/SSL and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-sslPEMKeyPassword <value>
|
|
Deprecated since version 4.2: Use \fI\%\-\-tlsCertificateKeyFilePassword\fP instead.
|
|
|
|
.sp
|
|
Specifies the password to de\-crypt the certificate\-key file (i.e.
|
|
\fI\%\-\-sslPEMKeyFile\fP). Use the \fI\%\-\-sslPEMKeyPassword\fP option only if the
|
|
certificate\-key file is encrypted. In all cases, the \fBmongod\fP will
|
|
redact the password from all logging and reporting output.
|
|
.sp
|
|
Starting in MongoDB 4.0:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
On Linux/BSD, if the private key in the PEM file is encrypted and
|
|
you do not specify the \fI\%\-\-sslPEMKeyPassword\fP option, MongoDB will prompt for a
|
|
passphrase. See ssl\-certificate\-password\&.
|
|
.IP \(bu 2
|
|
On macOS, if the private key in the PEM file is
|
|
encrypted, you must explicitly specify the
|
|
\fI\%\-\-sslPEMKeyPassword\fP option. Alternatively, you can use a
|
|
certificate from the secure system store (see
|
|
\fI\%\-\-sslCertificateSelector\fP) instead of a PEM key file or
|
|
use an unencrypted PEM file.
|
|
.IP \(bu 2
|
|
On Windows, MongoDB does not support encrypted certificates.
|
|
The \fI\%mongod\fP fails if it encounters an encrypted
|
|
PEM file. Use \fI\%\-\-sslCertificateSelector\fP instead.
|
|
.UNINDENT
|
|
.sp
|
|
For more information about TLS/SSL and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-sslClusterFile <filename>
|
|
Deprecated since version 4.2: Use \fI\%\-\-tlsClusterFile\fP instead.
|
|
|
|
.sp
|
|
Specifies the \fB\&.pem\fP file that contains the x.509
|
|
certificate\-key file for membership authentication for the cluster or replica set.
|
|
.sp
|
|
Starting with MongoDB 4.0 on macOS or Windows, you can use the
|
|
\fI\%\-\-sslClusterCertificateSelector\fP option to specify a
|
|
certificate from the operating system\(aqs secure certificate store
|
|
instead of a PEM key file. \fI\%\-\-sslClusterFile\fP and
|
|
\fI\%\-\-sslClusterCertificateSelector\fP options are mutually
|
|
exclusive. You can only specify one.
|
|
.sp
|
|
If \fI\%\-\-sslClusterFile\fP does not specify the \fB\&.pem\fP file for
|
|
internal cluster authentication or the alternative
|
|
\fI\%\-\-sslClusterCertificateSelector\fP, the cluster uses the
|
|
\fB\&.pem\fP file specified in the \fI\%\-\-sslPEMKeyFile\fP option or
|
|
the certificate returned by the \fI\%\-\-sslCertificateSelector\fP\&.
|
|
.sp
|
|
To use x.509 authentication, \fB\-\-tlsCAFile\fP or \fBnet.tls.CAFile\fP
|
|
must be specified unless using \fB\-\-tlsCertificateSelector\fP or
|
|
\fB\-\-net.tls.certificateSelector\fP\&. Or if using the \fBssl\fP aliases,
|
|
\fB\-\-sslCAFile\fP or \fBnet.ssl.CAFile\fP must be specified unless using
|
|
\fB\-\-sslCertificateSelector\fP or \fBnet.ssl.certificateSelector\fP\&.
|
|
.sp
|
|
For more information about TLS/SSL and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.sp
|
|
\fBIMPORTANT:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
For Windows \fBonly\fP, MongoDB 4.0 and later do not support
|
|
encrypted PEM files. The \fI\%mongod\fP fails to start if
|
|
it encounters an encrypted PEM file. To securely store and
|
|
access a certificate for use with membership authentication on
|
|
Windows, use \fI\%\-\-sslClusterCertificateSelector\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-sslCertificateSelector <parameter>=<value>
|
|
Deprecated since version 4.2: Use \fI\%\-\-tlsCertificateSelector\fP instead.
|
|
|
|
.sp
|
|
New in version 4.0: Available on Windows and macOS as an alternative to
|
|
\fI\%\-\-tlsCertificateKeyFile\fP\&.
|
|
.sp
|
|
Specifies a certificate property to select a matching certificate
|
|
from the operating system\(aqs secure certificate store to use for
|
|
TLS/SSL.
|
|
.sp
|
|
\fI\%\-\-sslPEMKeyFile\fP and \fI\%\-\-sslCertificateSelector\fP
|
|
options are mutually exclusive. You can only specify one.
|
|
|
|
.sp
|
|
\fI\%\-\-sslCertificateSelector\fP accepts an argument of the format
|
|
\fB<property>=<value>\fP where the property can be one of the
|
|
following:
|
|
.TS
|
|
center;
|
|
|l|l|l|.
|
|
_
|
|
T{
|
|
Property
|
|
T} T{
|
|
Value type
|
|
T} T{
|
|
Description
|
|
T}
|
|
_
|
|
T{
|
|
\fBsubject\fP
|
|
T} T{
|
|
ASCII string
|
|
T} T{
|
|
Subject name or common name on certificate
|
|
T}
|
|
_
|
|
T{
|
|
\fBthumbprint\fP
|
|
T} T{
|
|
hex string
|
|
T} T{
|
|
A sequence of bytes, expressed as hexadecimal, used to
|
|
identify a public key by its SHA\-1 digest.
|
|
.sp
|
|
The \fBthumbprint\fP is sometimes referred to as a
|
|
\fBfingerprint\fP\&.
|
|
T}
|
|
_
|
|
.TE
|
|
.sp
|
|
When using the system SSL certificate store, OCSP (Online
|
|
Certificate Status Protocol) is used to validate the revocation
|
|
status of certificates.
|
|
.sp
|
|
The \fI\%mongod\fP searches the operating system\(aqs secure
|
|
certificate store for the CA certificates required to validate the
|
|
full certificate chain of the specified TLS/SSL certificate.
|
|
Specifically, the secure certificate store must contain the root CA
|
|
and any intermediate CA certificates required to build the full
|
|
certificate chain to the TLS/SSL certificate. Do \fBnot\fP use
|
|
\fI\%\-\-sslCAFile\fP or \fI\%\-\-sslClusterCAFile\fP to specify the
|
|
root and intermediate CA certificate
|
|
.sp
|
|
For example, if the TLS/SSL certificate was signed with a single root
|
|
CA certificate, the secure certificate store must contain that root
|
|
CA certificate. If the TLS/SSL certificate was signed with an
|
|
intermediate CA certificate, the secure certificate store must
|
|
contain the intermedia CA certificate \fIand\fP the root CA certificate.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-sslClusterCertificateSelector <parameter>=<value>
|
|
Deprecated since version 4.2: Use \fI\%\-\-tlsClusterCertificateSelector\fP instead.
|
|
|
|
.sp
|
|
New in version 4.0: Available on Windows and macOS as an alternative to
|
|
\fI\%\-\-sslClusterFile\fP\&.
|
|
.sp
|
|
Specifies a certificate property to select a matching certificate
|
|
from the operating system\(aqs secure certificate store to use for
|
|
internal x.509 membership authentication\&.
|
|
.sp
|
|
\fI\%\-\-sslClusterFile\fP and
|
|
\fI\%\-\-sslClusterCertificateSelector\fP options are mutually
|
|
exclusive. You can only specify one.
|
|
|
|
.sp
|
|
\fI\%\-\-sslClusterCertificateSelector\fP accepts an argument of the
|
|
format \fB<property>=<value>\fP where the property can be one of the
|
|
following:
|
|
.TS
|
|
center;
|
|
|l|l|l|.
|
|
_
|
|
T{
|
|
Property
|
|
T} T{
|
|
Value type
|
|
T} T{
|
|
Description
|
|
T}
|
|
_
|
|
T{
|
|
\fBsubject\fP
|
|
T} T{
|
|
ASCII string
|
|
T} T{
|
|
Subject name or common name on certificate
|
|
T}
|
|
_
|
|
T{
|
|
\fBthumbprint\fP
|
|
T} T{
|
|
hex string
|
|
T} T{
|
|
A sequence of bytes, expressed as hexadecimal, used to
|
|
identify a public key by its SHA\-1 digest.
|
|
.sp
|
|
The \fBthumbprint\fP is sometimes referred to as a
|
|
\fBfingerprint\fP\&.
|
|
T}
|
|
_
|
|
.TE
|
|
.sp
|
|
The \fI\%mongod\fP searches the operating system\(aqs secure
|
|
certificate store for the CA certificates required to validate the
|
|
full certificate chain of the specified cluster certificate.
|
|
Specifically, the secure certificate store must contain the root CA
|
|
and any intermediate CA certificates required to build the full
|
|
certificate chain to the cluster certificate. Do \fBnot\fP use
|
|
\fI\%\-\-sslCAFile\fP or \fI\%\-\-sslClusterCAFile\fP to specify the
|
|
root and intermediate CA certificate.
|
|
.sp
|
|
For example, if the cluster certificate was signed with a single root
|
|
CA certificate, the secure certificate store must contain that root
|
|
CA certificate. If the cluster certificate was signed with an
|
|
intermediate CA certificate, the secure certificate store must
|
|
contain the intermedia CA certificate \fIand\fP the root CA certificate.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-sslClusterPassword <value>
|
|
Deprecated since version 4.2: Use \fI\%\-\-tlsClusterPassword\fP instead.
|
|
|
|
.sp
|
|
Specifies the password to de\-crypt the x.509 certificate\-key file
|
|
specified with \fB\-\-sslClusterFile\fP\&. Use the \fI\%\-\-sslClusterPassword\fP option only
|
|
if the certificate\-key file is encrypted. In all cases, the \fBmongod\fP
|
|
will redact the password from all logging and reporting output.
|
|
.sp
|
|
Starting in MongoDB 4.0:
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
On Linux/BSD, if the private key in the x.509 file is encrypted and
|
|
you do not specify the \fI\%\-\-sslClusterPassword\fP option, MongoDB will prompt for a
|
|
passphrase. See ssl\-certificate\-password\&.
|
|
.IP \(bu 2
|
|
On macOS, if the private key in the x.509 file is encrypted, you
|
|
must explicitly specify the \fI\%\-\-sslClusterPassword\fP option.
|
|
Alternatively, you can either use a certificate from the secure
|
|
system store (see \fI\%\-\-sslClusterCertificateSelector\fP)
|
|
instead of a cluster PEM file or use an unencrypted PEM file.
|
|
.IP \(bu 2
|
|
On Windows, MongoDB does not support encrypted certificates.
|
|
The \fI\%mongod\fP fails if it encounters an encrypted
|
|
PEM file. Use \fI\%\-\-sslClusterCertificateSelector\fP instead.
|
|
.UNINDENT
|
|
.sp
|
|
For more information about TLS/SSL and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-sslCAFile <filename>
|
|
Deprecated since version 4.2: Use \fI\%\-\-tlsCAFile\fP instead.
|
|
|
|
.sp
|
|
Specifies the \fB\&.pem\fP file that contains the root certificate
|
|
chain from the Certificate Authority. Specify the file name of the
|
|
\fB\&.pem\fP file using relative or absolute paths.
|
|
.INDENT 7.0
|
|
.TP
|
|
.B Windows/macOS Only
|
|
If using \fI\%\-\-sslCertificateSelector\fP and/or
|
|
\fI\%\-\-sslClusterCertificateSelector\fP, do \fBnot\fP use
|
|
\fI\%\-\-sslCAFile\fP to specify the root and intermediate CA
|
|
certificates. Store all CA certificates required to validate the
|
|
full trust chain of the \fI\%\-\-sslCertificateSelector\fP and/or
|
|
\fI\%\-\-sslClusterCertificateSelector\fP certificates in the
|
|
secure certificate store.
|
|
.UNINDENT
|
|
.sp
|
|
For more information about TLS/SSL and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-sslClusterCAFile <filename>
|
|
Deprecated since version 4.2: Use \fI\%\-\-tlsClusterCAFile\fP instead.
|
|
|
|
.sp
|
|
Specifies the \fB\&.pem\fP file that contains the root certificate
|
|
chain from the Certificate Authority used to validate the certificate
|
|
presented by a client establishing a connection. Specify the file
|
|
name of the \fB\&.pem\fP file using relative or absolute paths.
|
|
\fI\%\-\-sslClusterCAFile\fP requires that
|
|
\fI\%\-\-sslCAFile\fP is set.
|
|
.sp
|
|
If \fI\%\-\-sslClusterCAFile\fP does not specify the \fB\&.pem\fP
|
|
file for validating the certificate from a client establishing a
|
|
connection, the cluster uses the \fB\&.pem\fP file specified in the
|
|
\fI\%\-\-sslCAFile\fP option.
|
|
.sp
|
|
\fI\%\-\-sslClusterCAFile\fP lets you use separate Certificate
|
|
Authorities to verify the client to server and server to client
|
|
portions of the TLS handshake.
|
|
.INDENT 7.0
|
|
.TP
|
|
.B Windows/macOS Only
|
|
If using \fI\%\-\-sslCertificateSelector\fP and/or
|
|
\fI\%\-\-sslClusterCertificateSelector\fP, do \fBnot\fP use
|
|
\fI\%\-\-sslClusterCAFile\fP to specify the root and
|
|
intermediate CA certificates. Store all CA certificates required to
|
|
validate the full trust chain of the
|
|
\fI\%\-\-sslCertificateSelector\fP and/or
|
|
\fI\%\-\-sslClusterCertificateSelector\fP certificates in the
|
|
secure certificate store.
|
|
.UNINDENT
|
|
.sp
|
|
For more information about TLS/SSL and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-sslCRLFile <filename>
|
|
Deprecated since version 4.2: Use \fI\%\-\-tlsCRLFile\fP instead.
|
|
|
|
.sp
|
|
Specifies the \fB\&.pem\fP file that contains the Certificate Revocation
|
|
List. Specify the file name of the \fB\&.pem\fP file using relative or
|
|
absolute paths.
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.INDENT 0.0
|
|
.IP \(bu 2
|
|
Starting in MongoDB 4.0, you cannot specify a CRL file on
|
|
macOS. Instead, you can use the system SSL certificate store,
|
|
which uses OCSP (Online Certificate Status Protocol) to
|
|
validate the revocation status of certificates. See
|
|
\fI\%\-\-sslCertificateSelector\fP in MongoDB 4.0 and
|
|
\fI\%\-\-tlsCertificateSelector\fP in MongoDB 4.2+ to use the
|
|
system SSL certificate store.
|
|
.IP \(bu 2
|
|
Starting in version 4.4, to check for certificate revocation,
|
|
MongoDB \fBenables\fP the use of OCSP
|
|
(Online Certificate Status Protocol) by default as an
|
|
alternative to specifying a CRL file or using the system SSL
|
|
certificate store.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
For more information about TLS/SSL and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-sslAllowInvalidCertificates
|
|
Deprecated since version 4.2: Use \fI\%\-\-tlsAllowInvalidCertificates\fP instead.
|
|
|
|
.sp
|
|
Bypasses the validation checks for TLS/SSL certificates on other
|
|
servers in the cluster and allows the use of invalid certificates to
|
|
connect.
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Starting in MongoDB 4.0, if you specify
|
|
\fB\-\-sslAllowInvalidCertificates\fP or
|
|
\fBnet.ssl.allowInvalidCertificates: true\fP (or in MongoDB 4.2, the
|
|
alias \fB\-\-tlsAllowInvalidateCertificates\fP or
|
|
\fBnet.tls.allowInvalidCertificates: true\fP) when using x.509
|
|
authentication, an invalid certificate is only sufficient to
|
|
establish a TLS/SSL connection but is \fIinsufficient\fP for
|
|
authentication.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
When using
|
|
the \fI\%\-\-sslAllowInvalidCertificates\fP setting, MongoDB
|
|
logs a warning regarding the use of the invalid certificate.
|
|
.sp
|
|
For more information about TLS/SSL and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-sslAllowInvalidHostnames
|
|
Deprecated since version 4.2: Use \fI\%\-\-tlsAllowInvalidHostnames\fP instead.
|
|
|
|
.sp
|
|
Disables the validation of the hostnames in TLS/SSL certificates,
|
|
when connecting to other members of the replica set or sharded cluster
|
|
for inter\-process authentication. This allows \fBmongod\fP to connect
|
|
to other members if the hostnames in their certificates do not match
|
|
their configured hostname.
|
|
.sp
|
|
For more information about TLS/SSL and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-sslAllowConnectionsWithoutCertificates
|
|
Deprecated since version 4.2: Use \fI\%\-\-tlsAllowConnectionsWithoutCertificates\fP instead.
|
|
|
|
.sp
|
|
For clients that do not present certificates, \fBmongod\fP bypasses
|
|
TLS/SSL certificate validation when establishing the connection.
|
|
.sp
|
|
For clients that present a certificate, however, \fBmongod\fP performs
|
|
certificate validation using the root certificate chain specified by
|
|
\fB\-\-sslCAFile\fP and reject clients with invalid certificates.
|
|
.sp
|
|
Use the \fI\%\-\-sslAllowConnectionsWithoutCertificates\fP option if you have a mixed deployment that includes
|
|
clients that do not or cannot present certificates to the \fBmongod\fP\&.
|
|
.sp
|
|
For more information about TLS/SSL and MongoDB, see
|
|
/tutorial/configure\-ssl and
|
|
/tutorial/configure\-ssl\-clients .
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-sslDisabledProtocols <protocol(s)>
|
|
Deprecated since version 4.2: Use \fI\%\-\-tlsDisabledProtocols\fP instead.
|
|
|
|
.sp
|
|
Prevents a MongoDB server running with TLS/SSL from accepting
|
|
incoming connections that use a specific protocol or protocols. To
|
|
specify multiple protocols, use a comma separated list of protocols.
|
|
.sp
|
|
\fI\%\-\-sslDisabledProtocols\fP recognizes the following protocols: \fBTLS1_0\fP, \fBTLS1_1\fP,
|
|
\fBTLS1_2\fP, and starting in version 4.0.4 (and 3.6.9 and 3.4.24), \fBTLS1_3\fP\&.
|
|
.INDENT 7.0
|
|
.IP \(bu 2
|
|
On macOS, you cannot disable \fBTLS1_1\fP and leave both \fBTLS1_0\fP and
|
|
\fBTLS1_2\fP enabled. You must disable at least one of the other
|
|
two, for example, \fBTLS1_0,TLS1_1\fP\&.
|
|
.IP \(bu 2
|
|
To list multiple protocols, specify as a comma separated list of
|
|
protocols. For example \fBTLS1_0,TLS1_1\fP\&.
|
|
.IP \(bu 2
|
|
Specifying an unrecognized protocol will prevent the server from
|
|
starting.
|
|
.IP \(bu 2
|
|
The specified disabled protocols overrides any default disabled
|
|
protocols.
|
|
.UNINDENT
|
|
.sp
|
|
Starting in version 4.0, MongoDB disables the use of TLS 1.0 if TLS
|
|
1.1+ is available on the system. To enable the disabled TLS 1.0,
|
|
specify \fBnone\fP to \fI\%\-\-sslDisabledProtocols\fP\&. See 4.0\-disable\-tls\&.
|
|
.sp
|
|
Members of replica sets and sharded clusters must speak at least one
|
|
protocol in common.
|
|
.sp
|
|
\fBSEE ALSO:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
ssl\-disallow\-protocols
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-sslFIPSMode
|
|
Deprecated since version 4.2: Use \fI\%\-\-tlsFIPSMode\fP instead.
|
|
|
|
.sp
|
|
Directs the \fBmongod\fP to use the FIPS mode of the TLS/SSL
|
|
library. Your system must have a FIPS
|
|
compliant library to use the \fI\%\-\-sslFIPSMode\fP option.
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
FIPS\-compatible TLS/SSL is
|
|
available only in \fI\%MongoDB Enterprise\fP\&. See
|
|
/tutorial/configure\-fips for more information.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SS Profiler Options
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-profile <level>
|
|
\fIDefault\fP: 0
|
|
.sp
|
|
Configures the database profiler level.
|
|
The following profiler levels are available:
|
|
.TS
|
|
center;
|
|
|l|l|.
|
|
_
|
|
T{
|
|
Level
|
|
T} T{
|
|
Description
|
|
T}
|
|
_
|
|
T{
|
|
\fB0\fP
|
|
T} T{
|
|
The profiler is off and does not collect any data.
|
|
This is the default profiler level.
|
|
T}
|
|
_
|
|
T{
|
|
\fB1\fP
|
|
T} T{
|
|
The profiler collects data for operations that take longer
|
|
than the value of \fBslowms\fP\&.
|
|
T}
|
|
_
|
|
T{
|
|
\fB2\fP
|
|
T} T{
|
|
The profiler collects data for all operations.
|
|
T}
|
|
_
|
|
.TE
|
|
.sp
|
|
\fBIMPORTANT:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Profiling can impact performance and shares settings with the system
|
|
log. Carefully consider any performance and security implications
|
|
before configuring and enabling the profiler on a production
|
|
deployment.
|
|
.sp
|
|
See database\-profiling\-overhead for more information on
|
|
potential performance degradation.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-slowms <integer>
|
|
\fIDefault\fP: 100
|
|
.sp
|
|
The \fIslow\fP operation time threshold, in milliseconds. Operations
|
|
that run for longer than this threshold are considered \fIslow\fP\&.
|
|
.sp
|
|
When \fBlogLevel\fP is set to \fB0\fP, MongoDB records \fIslow\fP
|
|
operations to the diagnostic log at a rate determined by
|
|
\fBslowOpSampleRate\fP\&. Starting in MongoDB
|
|
4.2, the secondaries of replica sets log all oplog entry messages
|
|
that take longer than the slow operation threshold to apply regardless of the sample rate.
|
|
.sp
|
|
At higher \fBlogLevel\fP settings, all operations appear in
|
|
the diagnostic log regardless of their latency with the following
|
|
exception: the logging of slow oplog entry messages by the
|
|
secondaries\&. The secondaries log only the slow oplog
|
|
entries; increasing the \fBlogLevel\fP does not log all
|
|
oplog entries.
|
|
.sp
|
|
For \fI\%mongod\fP instances, \fI\%\-\-slowms\fP affects the diagnostic log
|
|
and, if enabled, the profiler.
|
|
.sp
|
|
\fBSEE ALSO:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
/tutorial/manage\-the\-database\-profiler
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-slowOpSampleRate <double>
|
|
\fIDefault\fP: 1.0
|
|
.sp
|
|
The fraction of \fIslow\fP operations that should be profiled or logged.
|
|
\fI\%\-\-slowOpSampleRate\fP accepts values between 0 and 1, inclusive.
|
|
.sp
|
|
\fI\%\-\-slowOpSampleRate\fP does not affect the slow oplog entry logging by the secondary members of a replica set. Secondary
|
|
members log all oplog entries that take longer than the slow
|
|
operation threshold regardless of the \fI\%\-\-slowOpSampleRate\fP\&.
|
|
.sp
|
|
For \fI\%mongod\fP instances, \fI\%\-\-slowOpSampleRate\fP affects the
|
|
diagnostic log and, if enabled, the profiler.
|
|
.UNINDENT
|
|
.SS Audit Options
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-auditDestination
|
|
Enables auditing and specifies where
|
|
\fBmongod\fP sends all audit events.
|
|
.sp
|
|
\fI\%\-\-auditDestination\fP can have one of the following values:
|
|
.TS
|
|
center;
|
|
|l|l|.
|
|
_
|
|
T{
|
|
Value
|
|
T} T{
|
|
Description
|
|
T}
|
|
_
|
|
T{
|
|
\fBsyslog\fP
|
|
T} T{
|
|
Output the audit events to syslog in JSON format. Not available on
|
|
Windows. Audit messages have a syslog severity level of \fBinfo\fP
|
|
and a facility level of \fBuser\fP\&.
|
|
.sp
|
|
The syslog message limit can result in the truncation of
|
|
audit messages. The auditing system will neither detect the
|
|
truncation nor error upon its occurrence.
|
|
T}
|
|
_
|
|
T{
|
|
\fBconsole\fP
|
|
T} T{
|
|
Output the audit events to \fBstdout\fP in JSON format.
|
|
T}
|
|
_
|
|
T{
|
|
\fBfile\fP
|
|
T} T{
|
|
Output the audit events to the file specified in
|
|
\fI\%\-\-auditPath\fP in the format specified in
|
|
\fI\%\-\-auditFormat\fP\&.
|
|
T}
|
|
_
|
|
.TE
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Available only in \fI\%MongoDB Enterprise\fP
|
|
and \fI\%MongoDB Atlas\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-auditFormat
|
|
Specifies the format of the output file for auditing if \fI\%\-\-auditDestination\fP is \fBfile\fP\&. The
|
|
\fI\%\-\-auditFormat\fP option can have one of the following values:
|
|
.TS
|
|
center;
|
|
|l|l|.
|
|
_
|
|
T{
|
|
Value
|
|
T} T{
|
|
Description
|
|
T}
|
|
_
|
|
T{
|
|
\fBJSON\fP
|
|
T} T{
|
|
Output the audit events in JSON format to the file specified
|
|
in \fI\%\-\-auditPath\fP\&.
|
|
T}
|
|
_
|
|
T{
|
|
\fBBSON\fP
|
|
T} T{
|
|
Output the audit events in BSON binary format to the file
|
|
specified in \fI\%\-\-auditPath\fP\&.
|
|
T}
|
|
_
|
|
.TE
|
|
.sp
|
|
Printing audit events to a file in JSON format degrades server
|
|
performance more than printing to a file in BSON format.
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Available only in \fI\%MongoDB Enterprise\fP
|
|
and \fI\%MongoDB Atlas\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-auditPath
|
|
Specifies the output file for auditing if
|
|
\fI\%\-\-auditDestination\fP has value of \fBfile\fP\&. The \fI\%\-\-auditPath\fP
|
|
option can take either a full path name or a relative path name.
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Available only in \fI\%MongoDB Enterprise\fP
|
|
and \fI\%MongoDB Atlas\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-auditFilter
|
|
Specifies the filter to limit the types of operations the audit system records. The option takes a string representation
|
|
of a query document of the form:
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.sp
|
|
.nf
|
|
.ft C
|
|
{ <field1>: <expression1>, ... }
|
|
.ft P
|
|
.fi
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
The \fB<field>\fP can be any field in the audit message, including fields returned in the
|
|
param document. The
|
|
\fB<expression>\fP is a query condition expression\&.
|
|
.sp
|
|
To specify an audit filter, enclose the filter document in single
|
|
quotes to pass the document as a string.
|
|
.sp
|
|
To specify the audit filter in a configuration file, you must use the YAML format of
|
|
the configuration file.
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Available only in \fI\%MongoDB Enterprise\fP
|
|
and \fI\%MongoDB Atlas\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SS SNMP Options
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
MongoDB Enterprise on macOS does \fInot\fP include support for SNMP due
|
|
to \fI\%SERVER\-29352\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-snmp\-disabled
|
|
Disables SNMP access to \fI\%mongod\fP\&. The option is incompatible
|
|
with \fI\%\-\-snmp\-subagent\fP and \fI\%\-\-snmp\-master\fP\&.
|
|
.sp
|
|
New in version 4.0.6.
|
|
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-snmp\-subagent
|
|
Runs SNMP as a subagent. The option is incompatible with \fI\%\-\-snmp\-disabled\fP\&.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-snmp\-master
|
|
Runs SNMP as a master. The option is incompatible with \fI\%\-\-snmp\-disabled\fP\&.
|
|
.UNINDENT
|
|
.sp
|
|
\fBSEE ALSO:\fP
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
.INDENT 0.0
|
|
.IP \(bu 2
|
|
/tutorial/monitor\-with\-snmp
|
|
.IP \(bu 2
|
|
/tutorial/monitor\-with\-snmp\-on\-windows
|
|
.IP \(bu 2
|
|
/tutorial/troubleshoot\-snmp
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SS inMemory Options
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-inMemorySizeGB <float>
|
|
\fIDefault\fP: 50% of physical RAM less 1 GB
|
|
.sp
|
|
Changed in version 3.4: Values can range from 256MB to 10TB and can be a float.
|
|
|
|
.sp
|
|
Maximum amount of memory to allocate for in\-memory storage
|
|
engine data, including indexes, oplog if the
|
|
\fI\%mongod\fP is part of replica set, replica set or sharded
|
|
cluster metadata, etc.
|
|
.sp
|
|
By default, the in\-memory storage engine uses 50% of physical RAM minus
|
|
1 GB.
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.IP "Enterprise Feature"
|
|
.sp
|
|
Available in MongoDB Enterprise only.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SS Encryption Key Management Options
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-enableEncryption <boolean>
|
|
\fIDefault\fP: false
|
|
.sp
|
|
New in version 3.2.
|
|
|
|
.sp
|
|
Enables encryption for the WiredTiger storage engine. You must set
|
|
to \fBtrue\fP to pass in encryption keys and configurations.
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.IP "Enterprise Feature"
|
|
.sp
|
|
Available in MongoDB Enterprise only.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-encryptionCipherMode <string>
|
|
\fIDefault\fP: AES256\-CBC
|
|
.sp
|
|
New in version 3.2.
|
|
|
|
.sp
|
|
The cipher mode to use for encryption at rest:
|
|
.TS
|
|
center;
|
|
|l|l|.
|
|
_
|
|
T{
|
|
Mode
|
|
T} T{
|
|
Description
|
|
T}
|
|
_
|
|
T{
|
|
\fBAES256\-CBC\fP
|
|
T} T{
|
|
256\-bit Advanced Encryption Standard in Cipher Block Chaining
|
|
Mode
|
|
T}
|
|
_
|
|
T{
|
|
\fBAES256\-GCM\fP
|
|
T} T{
|
|
256\-bit Advanced Encryption Standard in Galois/Counter Mode
|
|
.sp
|
|
Changed in version 4.0: MongoDB Enterprise on Windows no longer supports \fBAES256\-GCM\fP\&. This
|
|
cipher is now available only on Linux.
|
|
T}
|
|
_
|
|
.TE
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.IP "Enterprise Feature"
|
|
.sp
|
|
Available in MongoDB Enterprise only.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-encryptionKeyFile <string>
|
|
New in version 3.2.
|
|
|
|
.sp
|
|
The path to the local keyfile when managing keys via process \fIother
|
|
than\fP KMIP. Only set when managing keys via process other than KMIP.
|
|
If data is already encrypted using KMIP, MongoDB will throw an error.
|
|
.sp
|
|
The keyfile can contain only a single key. The key is either a 16 or
|
|
32 character string.
|
|
.sp
|
|
Requires \fBenableEncryption\fP to be \fBtrue\fP\&.
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.IP "Enterprise Feature"
|
|
.sp
|
|
Available in MongoDB Enterprise only.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-kmipKeyIdentifier <string>
|
|
New in version 3.2.
|
|
|
|
.sp
|
|
Unique KMIP identifier for an existing key within the KMIP server.
|
|
Include to use the key associated with the identifier as the system
|
|
key. You can only use the setting the first time you enable
|
|
encryption for the \fI\%mongod\fP instance. Requires
|
|
\fBenableEncryption\fP to be true.
|
|
.sp
|
|
If unspecified, MongoDB will request that the KMIP server create a
|
|
new key to utilize as the system key.
|
|
.sp
|
|
If the KMIP server cannot locate a key with the specified identifier
|
|
or the data is already encrypted with a key, MongoDB will throw an
|
|
error
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.IP "Enterprise Feature"
|
|
.sp
|
|
Available in MongoDB Enterprise only.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-kmipRotateMasterKey <boolean>
|
|
\fIDefault\fP: false
|
|
.sp
|
|
New in version 3.2.
|
|
|
|
.sp
|
|
If true, rotate the master key and re\-encrypt the internal
|
|
keystore.
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.IP "Enterprise Feature"
|
|
.sp
|
|
Available in MongoDB Enterprise only.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
\fBSEE ALSO:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
kmip\-master\-key\-rotation
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-kmipServerName <string>
|
|
New in version 3.2.
|
|
|
|
.sp
|
|
Hostname or IP address of the KMIP server to connect to. Requires
|
|
\fI\%\-\-enableEncryption\fP to be true.
|
|
.sp
|
|
Starting in MongoDB 4.2.1 (and 4.0.14), you can specify multiple KMIP
|
|
servers as a comma\-separated list, e.g.
|
|
\fBserver1.example.com,server2.example.com\fP\&. On startup, the
|
|
\fI\%mongod\fP will attempt to establish a connection to each
|
|
server in the order listed, and will select the first server to
|
|
which it can successfully establish a connection. KMIP server
|
|
selection occurs only at startup.
|
|
.sp
|
|
When connecting to a KMIP server, the \fI\%mongod\fP
|
|
verifies that the specified \fI\%\-\-kmipServerName\fP matches the
|
|
Subject Alternative Name \fBSAN\fP (or, if \fBSAN\fP is not present, the
|
|
Common Name \fBCN\fP) in the certificate presented by the KMIP server.
|
|
If \fBSAN\fP is present, \fI\%mongod\fP does not match against
|
|
the \fBCN\fP\&. If the hostname does not match the \fBSAN\fP (or \fBCN\fP),
|
|
the \fI\%mongod\fP will fail to connect.
|
|
.sp
|
|
Starting in MongoDB 4.2, when performing comparison of SAN, MongoDB
|
|
supports comparison of DNS names or IP addresses. In previous versions,
|
|
MongoDB only supports comparisons of DNS names.
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.IP "Enterprise Feature"
|
|
.sp
|
|
Available in MongoDB Enterprise only.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-kmipPort <number>
|
|
\fIDefault\fP: 5696
|
|
.sp
|
|
New in version 3.2.
|
|
|
|
.sp
|
|
Port number to use to communicate with the KMIP server.
|
|
Requires \fI\%\-\-kmipServerName\fP\&. Requires
|
|
\fI\%\-\-enableEncryption\fP to be true.
|
|
.sp
|
|
If specifying multiple KMIP servers with \fI\%\-\-kmipServerName\fP,
|
|
the \fI\%mongod\fP will use the port specified with
|
|
\fI\%\-\-kmipPort\fP for all provided KMIP servers.
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.IP "Enterprise Feature"
|
|
.sp
|
|
Available in MongoDB Enterprise only.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-kmipConnectRetries <number>
|
|
\fIDefault\fP: 0
|
|
.sp
|
|
New in version 4.4.
|
|
|
|
.sp
|
|
How many times to retry the initial connection to the KMIP server.
|
|
Use together with \fI\%\-\-kmipConnectTimeoutMS\fP to
|
|
control how long the \fI\%mongod\fP waits for a response
|
|
between each retry.
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.IP "Enterprise Feature"
|
|
.sp
|
|
Available in MongoDB Enterprise only.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-kmipConnectTimeoutMS <number>
|
|
\fIDefault\fP: 5000
|
|
.sp
|
|
New in version 4.4.
|
|
|
|
.sp
|
|
Timeout in milliseconds to wait for a response from the KMIP server.
|
|
If the \fI\%\-\-kmipConnectRetries\fP setting is specified,
|
|
the \fI\%mongod\fP will wait up to the value specified with
|
|
\fI\%\-\-kmipConnectTimeoutMS\fP for each retry.
|
|
.sp
|
|
Value must be \fB1000\fP or greater.
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.IP "Enterprise Feature"
|
|
.sp
|
|
Available in MongoDB Enterprise only.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-kmipClientCertificateSelector <string>
|
|
New in version 4.0: Available on Windows and macOS as an alternative to
|
|
\fI\%\-\-kmipClientCertificateFile\fP\&.
|
|
.sp
|
|
\fI\%\-\-kmipClientCertificateFile\fP and \fI\%\-\-kmipClientCertificateSelector\fP options are mutually exclusive. You can only
|
|
specify one.
|
|
|
|
.sp
|
|
Specifies a certificate property in order to select a matching
|
|
certificate from the operating system\(aqs certificate store to
|
|
authenticate MongoDB to the KMIP server.
|
|
.sp
|
|
\fI\%\-\-kmipClientCertificateSelector\fP accepts an argument of the format \fB<property>=<value>\fP
|
|
where the property can be one of the following:
|
|
.TS
|
|
center;
|
|
|l|l|l|.
|
|
_
|
|
T{
|
|
Property
|
|
T} T{
|
|
Value type
|
|
T} T{
|
|
Description
|
|
T}
|
|
_
|
|
T{
|
|
\fBsubject\fP
|
|
T} T{
|
|
ASCII string
|
|
T} T{
|
|
Subject name or common name on certificate
|
|
T}
|
|
_
|
|
T{
|
|
\fBthumbprint\fP
|
|
T} T{
|
|
hex string
|
|
T} T{
|
|
A sequence of bytes, expressed as hexadecimal, used to
|
|
identify a public key by its SHA\-1 digest.
|
|
.sp
|
|
The \fBthumbprint\fP is sometimes referred to as a
|
|
\fBfingerprint\fP\&.
|
|
T}
|
|
_
|
|
.TE
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.IP "Enterprise Feature"
|
|
.sp
|
|
Available in MongoDB Enterprise only.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-kmipClientCertificateFile <string>
|
|
New in version 3.2.
|
|
|
|
.sp
|
|
String containing the path to the client certificate used for
|
|
authenticating MongoDB to the KMIP server. Requires that a
|
|
\fBkmipServerName\fP be provided.
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Starting in 4.0, on macOS or Windows, you can use a certificate
|
|
from the operating system\(aqs secure store instead of a PEM key
|
|
file. See \fI\%\-\-kmipClientCertificateSelector\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.IP "Enterprise Feature"
|
|
.sp
|
|
Available in MongoDB Enterprise only.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-kmipClientCertificatePassword <string>
|
|
New in version 3.2.
|
|
|
|
.sp
|
|
The password (if one exists) for the client certificate passed into
|
|
\fBkmipClientCertificateFile\fP\&. Is used for
|
|
authenticating MongoDB to the KMIP server. Requires that a
|
|
\fBkmipClientCertificateFile\fP be provided.
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.IP "Enterprise Feature"
|
|
.sp
|
|
Available in MongoDB Enterprise only.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-kmipServerCAFile <string>
|
|
New in version 3.2.
|
|
|
|
.sp
|
|
Path to CA File. Used for validating secure client connection to
|
|
KMIP server.
|
|
.sp
|
|
\fBNOTE:\fP
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
Starting in 4.0, on macOS or Windows, you can use a certificate
|
|
from the operating system\(aqs secure store instead of a PEM key
|
|
file. See \fI\%\-\-kmipClientCertificateSelector\fP\&. When using the secure store, you do not
|
|
need to, but can, also specify the \fI\%\-\-kmipServerCAFile\fP\&.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-\-eseDatabaseKeyRollover
|
|
New in version 4.2.
|
|
|
|
.sp
|
|
Roll over the encrypted storage engine database keys configured with
|
|
\fBAES256\-GCM\fP cipher.
|
|
.sp
|
|
When \fI\%mongod\fP instance is started with this option, the
|
|
instance rotates the keys and exits.
|
|
.INDENT 7.0
|
|
.INDENT 3.5
|
|
.IP "Enterprise Feature"
|
|
.sp
|
|
Available in MongoDB Enterprise only.
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SH AUTHOR
|
|
MongoDB Documentation Project
|
|
.SH COPYRIGHT
|
|
2008-2020
|
|
.\" Generated by docutils manpage writer.
|
|
.
|