<section>
 <h1 class="contains-headerlink leafygreen-ui-41fr9s" weight="medium">
  <code class="leafygreen-ui-1l06pbn">
   mongos
  </code>
  <a class="headerlink leafygreen-ui-1kepx47" href="#mongos" title="Permalink to this heading">
   <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
    <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
    </path>
    <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
    </path>
   </svg>
   <div class="css-1btu0w3 evvkmar0" id="mongos">
   </div>
  </a>
 </h1>
 <div class="leafygreen-ui-a5yxub">
  <p class="css-1cmx2d4 ef7gu8j0">
   On this page
  </p>
  <ul class="css-1qb0mst ef7gu8j1">
   <li class="leafygreen-ui-1e7a0ei">
    <a class="lg-ui-0001 leafygreen-ui-e98ikf" href="#synopsis" target="_self">
     <span>
      Synopsis
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-cpmeq5" href="#considerations" target="_self">
     <span>
      Considerations
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-cpmeq5" href="#options" target="_self">
     <span>
      Options
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-x9koo9" href="#core-options" target="_self">
     <span>
      Core Options
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-x9koo9" href="#sharded-cluster-options" target="_self">
     <span>
      Sharded Cluster Options
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-x9koo9" href="#tls-options" target="_self">
     <span>
      TLS Options
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-x9koo9" href="#audit-options" target="_self">
     <span>
      Audit Options
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-x9koo9" href="#profiler-options" target="_self">
     <span>
      Profiler Options
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-x9koo9" href="#ldap-authentication-and-authorization-options" target="_self">
     <span>
      LDAP Authentication and Authorization Options
     </span>
    </a>
   </li>
   <li class="leafygreen-ui-1jqtqlb">
    <a class="lg-ui-0001 leafygreen-ui-x9koo9" href="#additional-options" target="_self">
     <span>
      Additional Options
     </span>
    </a>
   </li>
  </ul>
 </div>
 <section>
  <h2 class="contains-headerlink leafygreen-ui-19f71ei" weight="medium">
   Synopsis
   <a class="headerlink leafygreen-ui-1kepx47" href="#synopsis" title="Permalink to this heading">
    <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
     <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
     </path>
     <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
     </path>
    </svg>
    <div class="css-1btu0w3 evvkmar0" id="synopsis">
    </div>
   </a>
  </h2>
  <p class="leafygreen-ui-1kp3ins">
   For a
   <a class="leafygreen-ui-tqgtui" href="/docs/manual/sharding/#std-label-sharding-sharded-cluster">
    sharded cluster
   </a>
   , the
   <code class="leafygreen-ui-1l06pbn">
    mongos
   </code>
   instances provide the interface between the client applications and the
sharded cluster. The
   <code class="leafygreen-ui-1l06pbn">
    mongos
   </code>
   instances route queries and
write operations to the shards. From the perspective of the
application, a
   <code class="leafygreen-ui-1l06pbn">
    mongos
   </code>
   instance behaves identically to
any other MongoDB instance.
  </p>
 </section>
 <section>
  <h2 class="contains-headerlink leafygreen-ui-19f71ei" weight="medium">
   Considerations
   <a class="headerlink leafygreen-ui-1kepx47" href="#considerations" title="Permalink to this heading">
    <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
     <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
     </path>
     <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
     </path>
    </svg>
    <div class="css-1btu0w3 evvkmar0" id="considerations">
    </div>
   </a>
  </h2>
  <ul class="leafygreen-ui-rioki0">
   <li class="leafygreen-ui-d7p7b6">
    <p class="leafygreen-ui-1kp3ins">
     Never change the name of the
     <code class="leafygreen-ui-1l06pbn">
      mongos
     </code>
     binary.
    </p>
   </li>
   <li class="leafygreen-ui-d7p7b6">
    <p class="leafygreen-ui-1kp3ins">
     MongoDB
     <!-- -->
     disables support for TLS 1.0
encryption on systems where TLS 1.1+ is available.
    </p>
   </li>
   <li class="leafygreen-ui-d7p7b6">
    <p class="leafygreen-ui-1kp3ins">
     The
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-binary-bin.mongos" target="_self">
      <span>
       <code class="leafygreen-ui-1l06pbn">
        mongos
       </code>
      </span>
     </a>
     binary cannot connect to
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#mongodb-binary-bin.mongod">
      <code class="leafygreen-ui-1l06pbn">
       mongod
      </code>
     </a>
     instances whose
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/setFeatureCompatibilityVersion/#std-label-view-fcv">
      feature compatibility version (fCV)
     </a>
     is greater
than that of the
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-binary-bin.mongos" target="_self">
      <span>
       <code class="leafygreen-ui-1l06pbn">
        mongos
       </code>
      </span>
     </a>
     . For example, you cannot connect
a MongoDB
     <!-- -->
     5.0
     <!-- -->
     version
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-binary-bin.mongos" target="_self">
      <span>
       <code class="leafygreen-ui-1l06pbn">
        mongos
       </code>
      </span>
     </a>
     to a
     <!-- -->
     8.0
     <!-- -->
     sharded cluster with
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/setFeatureCompatibilityVersion/#std-label-view-fcv">
      fCV
     </a>
     set to
     <!-- -->
     8.0
     <!-- -->
     . You
can, however, connect a MongoDB
     <!-- -->
     5.0
     <!-- -->
     version
     <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-binary-bin.mongos" target="_self">
      <span>
       <code class="leafygreen-ui-1l06pbn">
        mongos
       </code>
      </span>
     </a>
     to a
     <!-- -->
     8.0
     <!-- -->
     sharded cluster with
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/setFeatureCompatibilityVersion/#std-label-view-fcv">
      fCV
     </a>
     set to
     <!-- -->
     5.0
     <!-- -->
     .
    </p>
   </li>
   <li class="leafygreen-ui-d7p7b6">
    <p class="leafygreen-ui-1kp3ins">
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#mongodb-binary-bin.mongod">
      <code class="leafygreen-ui-1l06pbn">
       mongod
      </code>
     </a>
     includes a
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/administration/full-time-diagnostic-data-capture/#std-label-ftdc-stub">
      Full Time Diagnostic Data Capture
     </a>
     mechanism to assist MongoDB engineers with troubleshooting
deployments. If this thread fails, it terminates the originating process.
To avoid the most common failures, confirm that the user running the
process has permissions to create the FTDC
     <code class="leafygreen-ui-1l06pbn">
      diagnostic.data
     </code>
     directory. For
     <code class="leafygreen-ui-1l06pbn">
      mongod
     </code>
     the directory is within
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/configuration-options/#mongodb-setting-storage.dbPath">
      <code class="leafygreen-ui-1l06pbn">
       storage.dbPath
      </code>
     </a>
     . For
     <code class="leafygreen-ui-1l06pbn">
      mongos
     </code>
     it is parallel to
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/configuration-options/#mongodb-setting-systemLog.path">
      <code class="leafygreen-ui-1l06pbn">
       systemLog.path
      </code>
      .
     </a>
    </p>
   </li>
  </ul>
 </section>
 <section>
  <h2 class="contains-headerlink leafygreen-ui-19f71ei" weight="medium">
   Options
   <a class="headerlink leafygreen-ui-1kepx47" href="#options" title="Permalink to this heading">
    <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
     <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
     </path>
     <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
     </path>
    </svg>
    <div class="css-1btu0w3 evvkmar0" id="options">
    </div>
   </a>
  </h2>
  <div class="leafygreen-ui-13vw3ie" role="note">
   <h2 class="leafygreen-ui-1fn4p2b">
    Tip
   </h2>
   <h3 class="leafygreen-ui-144d5kf">
    <strong>
     See also:
    </strong>
   </h3>
   <div class="leafygreen-ui-9mycqc">
    <p class="leafygreen-ui-1kp3ins">
     <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/configuration-file-settings-command-line-options-mapping/#std-label-conf-file-command-line-mapping">
      Self-Managed Configuration File Settings and Command-Line Options Mapping
     </a>
    </p>
   </div>
  </div>
  <div class="leafygreen-ui-15mdk4" role="note">
   <h2 class="leafygreen-ui-6n7b7d">
    Note
   </h2>
   <div class="leafygreen-ui-9mycqc">
    <ul class="leafygreen-ui-rioki0">
     <li class="leafygreen-ui-d7p7b6">
      <p class="leafygreen-ui-1kp3ins">
       MongoDB deprecates the SSL options and instead adds new
corresponding TLS options.
      </p>
     </li>
     <li class="leafygreen-ui-d7p7b6">
      <p class="leafygreen-ui-1kp3ins">
       MongoDB adds
       <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsClusterCAFile" target="_self">
        <span>
         <code class="leafygreen-ui-1l06pbn">
          --tlsClusterCAFile
         </code>
        </span>
       </a>
       /
       <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/configuration-options/#mongodb-setting-net.tls.clusterCAFile">
        <code class="leafygreen-ui-1l06pbn">
         net.tls.clusterCAFile
        </code>
        .
       </a>
      </p>
     </li>
    </ul>
   </div>
  </div>
  <div class="leafygreen-ui-15mdk4" role="note">
   <h2 class="leafygreen-ui-6n7b7d">
    Note
   </h2>
   <div class="leafygreen-ui-9mycqc">
    <ul class="leafygreen-ui-rioki0">
     <li class="leafygreen-ui-d7p7b6">
      <p class="leafygreen-ui-1kp3ins">
       MongoDB 5.0 removes the
       <code class="leafygreen-ui-1l06pbn">
        --serviceExecutor
       </code>
       command-line option and the
corresponding
       <code class="leafygreen-ui-1l06pbn">
        net.serviceExecutor
       </code>
       configuration option.
      </p>
     </li>
    </ul>
   </div>
  </div>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Core Options
    <a class="headerlink leafygreen-ui-1kepx47" href="#core-options" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="core-options">
     </div>
    </a>
   </h3>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --help, -h
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--help" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--help">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Returns information on the options and use of
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      .
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --version
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--version" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--version">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Returns the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      release number.
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --config &lt;filename&gt;, -f &lt;filename&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--config" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--config">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Specifies a configuration file for runtime configuration options. The
configuration file is the preferred method for runtime configuration of
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      . The options are equivalent to the command-line
configuration options. See
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/configuration-options/">
       Self-Managed Configuration File Options
      </a>
      for
more information.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Ensure the configuration file uses ASCII encoding. The
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      instance does not support configuration files with non-ASCII encoding,
including UTF-8.
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --configExpand &lt;none|rest|exec&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--configExpand" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--configExpand">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      : none
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Enables using
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/expansion-directives/#std-label-externally-sourced-values">
       Expansion Directives
      </a>
      in configuration files. Expansion directives allow you to set
externally sourced values for configuration file options.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--configExpand" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --configExpand
        </code>
       </span>
      </a>
      supports the following expansion directives:
     </p>
     <div class="leafygreen-ui-skkc39" tabindex="0">
      <table class="leafygreen-ui-hr8lsv">
       <colgroup>
        <col style="width:20%"/>
        <col style="width:40%"/>
       </colgroup>
       <thead class="leafygreen-ui-a9ho40">
        <tr data-testid="leafygreen-ui-header-row">
         <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Value
           </div>
          </div>
         </th>
         <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Description
           </div>
          </div>
         </th>
        </tr>
       </thead>
       <tbody>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             none
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            Default.
            <code class="leafygreen-ui-1l06pbn">
             mongos
            </code>
            does not expand expansion directives.
            <code class="leafygreen-ui-1l06pbn">
             mongos
            </code>
            fails to start if any configuration file settings
use expansion directives.
           </div>
          </div>
         </td>
        </tr>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             rest
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             mongos
            </code>
            expands
            <code class="leafygreen-ui-1l06pbn">
             __rest
            </code>
            expansion directives when
parsing the configuration file.
           </div>
          </div>
         </td>
        </tr>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             exec
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             mongos
            </code>
            expands
            <code class="leafygreen-ui-1l06pbn">
             __exec
            </code>
            expansion directives when
parsing the configuration file.
           </div>
          </div>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      You can specify multiple expansion directives as a comma-separated
list, for example:
      <code class="leafygreen-ui-1l06pbn">
       rest, exec
      </code>
      . If the configuration file contains
expansion directives not specified to
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--configExpand" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --configExpand
        </code>
       </span>
      </a>
      , the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      returns an error and terminates.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      See
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/expansion-directives/#std-label-externally-sourced-values">
       Externally Sourced Configuration File Values for Self-Managed Deployments
      </a>
      for configuration files
for more information on expansion directives.
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --verbose, -v
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--verbose" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--verbose">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Increases the amount of internal reporting returned on standard output
or in log files. Increase the verbosity with the
      <code class="leafygreen-ui-1l06pbn">
       -v
      </code>
      form by
including the option multiple times, for example:
      <code class="leafygreen-ui-1l06pbn">
       -vvvvv
      </code>
      .
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --quiet
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--quiet" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--quiet">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Runs
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      in a quiet mode that attempts to limit the amount
of output.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      This option suppresses:
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        output from
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-database-command">
         database commands
        </a>
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        replication activity
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        connection accepted events
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        connection closed events
       </p>
      </li>
     </ul>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --port &lt;port&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--port" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--port">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      : 27017
     </p>
     <p class="leafygreen-ui-1kp3ins">
      The TCP port on which the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      instance listens for
client connections.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      The
      <code class="leafygreen-ui-1l06pbn">
       --port
      </code>
      option
      <!-- -->
      accepts a range of values between
      <code class="leafygreen-ui-1l06pbn">
       0
      </code>
      and
      <code class="leafygreen-ui-1l06pbn">
       65535
      </code>
      .
Setting the port to
      <code class="leafygreen-ui-1l06pbn">
       0
      </code>
      configures
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      to use an arbitrary port
assigned by the operating system.
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --bind_ip &lt;hostnames|ipaddresses|Unix domain socket paths&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--bind_ip" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--bind_ip">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      : localhost
     </p>
     <p class="leafygreen-ui-1kp3ins">
      The hostnames and/or IP addresses and/or full Unix domain socket
paths on which
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      should listen for client connections. You
may attach
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      to any interface. To bind to multiple
addresses, enter a list of comma-separated values.
     </p>
     <div class="leafygreen-ui-vg7qwp" role="note">
      <h2 class="leafygreen-ui-2xicti">
       Example
      </h2>
      <h3 class="leafygreen-ui-144d5kf">
       <strong>
        localhost,/tmp/mongod.sock
       </strong>
      </h3>
      <div class="leafygreen-ui-9mycqc">
      </div>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      You can specify both IPv4 and IPv6 addresses, or hostnames that
resolve to an IPv4 or IPv6 address.
     </p>
     <div class="leafygreen-ui-vg7qwp" role="note">
      <h2 class="leafygreen-ui-2xicti">
       Example
      </h2>
      <h3 class="leafygreen-ui-144d5kf">
       <strong>
        localhost, 2001:0DB8:e132:ba26:0d5c:2774:e7f9:d513
       </strong>
      </h3>
      <div class="leafygreen-ui-9mycqc">
      </div>
     </div>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        If specifying an IPv6 address
        <em>
         or
        </em>
        a hostname that resolves to an
IPv6 address to
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--bind_ip" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --bind_ip
          </code>
         </span>
        </a>
        , you must start
        <code class="leafygreen-ui-1l06pbn">
         mongos
        </code>
        with
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ipv6" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --ipv6
          </code>
         </span>
        </a>
        to enable IPv6 support. Specifying an IPv6 address
to
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--bind_ip" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --bind_ip
          </code>
         </span>
        </a>
        does not enable IPv6 support.
       </p>
      </div>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      If specifying a
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://en.wikipedia.org/wiki/Link-local_address#IPv6" rel="noopener noreferrer">
       <span>
        link-local IPv6 address
       </span>
       <svg alt="" aria-hidden="true" class="leafygreen-ui-1ie5kuq" height="16" role="presentation" viewbox="0 0 16 16" width="16">
        <path d="M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z" fill="currentColor">
        </path>
        <path d="M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z" fill="currentColor">
        </path>
       </svg>
      </a>
      (
      <code class="leafygreen-ui-1l06pbn">
       fe80::/10
      </code>
      ), you must append the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://en.wikipedia.org/wiki/IPv6_address#Scoped_literal_IPv6_addresses_(with_zone_index)" rel="noopener noreferrer">
       <span>
        zone index
       </span>
       <svg alt="" aria-hidden="true" class="leafygreen-ui-1ie5kuq" height="16" role="presentation" viewbox="0 0 16 16" width="16">
        <path d="M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z" fill="currentColor">
        </path>
        <path d="M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z" fill="currentColor">
        </path>
       </svg>
      </a>
      to that address (i.e.
      <code class="leafygreen-ui-1l06pbn">
       fe80::&lt;address&gt;%&lt;adapter-name&gt;
      </code>
      ).
     </p>
     <div class="leafygreen-ui-vg7qwp" role="note">
      <h2 class="leafygreen-ui-2xicti">
       Example
      </h2>
      <h3 class="leafygreen-ui-144d5kf">
       <strong>
        localhost,fe80::a00:27ff:fee0:1fcf%enp0s3
       </strong>
      </h3>
      <div class="leafygreen-ui-9mycqc">
      </div>
     </div>
     <div class="leafygreen-ui-85da11" role="note">
      <h2 class="leafygreen-ui-1ac4g5h">
       Important
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        To avoid configuration updates due to IP address changes, use DNS
hostnames instead of IP addresses. It is particularly important to
use a DNS hostname instead of an IP address when configuring replica
set members or sharded cluster members.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        Use hostnames instead of IP addresses to configure clusters across a
split network horizon. Starting in MongoDB 5.0, nodes that are only
configured with an IP address fail startup validation and do not start.
       </p>
      </div>
     </div>
     <div class="leafygreen-ui-1sjx7ru" role="note">
      <h2 class="leafygreen-ui-29m78u">
       Warning
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        Before you bind your instance to a publicly-accessible IP address,
you must secure your cluster from unauthorized access. For a complete
list of security recommendations, see
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/administration/security-checklist/#std-label-security-checklist">
         Security Checklist for Self-Managed Deployments
        </a>
        . At minimum, consider
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/administration/security-checklist/#std-label-checklist-auth">
         enabling authentication
        </a>
        and
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/security-hardening/#std-label-network-config-hardening">
         hardening
network infrastructure
         <!-- -->
         .
        </a>
       </p>
      </div>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      For more information about IP Binding, refer to the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/security-mongodb-configuration/">
       IP Binding in Self-Managed Deployments
      </a>
      documentation.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      To bind to all IPv4 addresses, enter
      <code class="leafygreen-ui-1l06pbn">
       0.0.0.0
      </code>
      .
     </p>
     <p class="leafygreen-ui-1kp3ins">
      To bind to all IPv4 and IPv6 addresses, enter
      <code class="leafygreen-ui-1l06pbn">
       ::,0.0.0.0
      </code>
      or
an asterisk
      <code class="leafygreen-ui-1l06pbn">
       "*"
      </code>
      (enclose the asterisk in quotes to avoid filename pattern
expansion). Alternatively, use the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/configuration-options/#mongodb-setting-net.bindIpAll">
       <code class="leafygreen-ui-1l06pbn">
        net.bindIpAll
       </code>
      </a>
      setting.
     </p>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <ul class="leafygreen-ui-rioki0">
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          <code class="leafygreen-ui-1l06pbn">
           --bind_ip
          </code>
          and
          <code class="leafygreen-ui-1l06pbn">
           --bind_ip_all
          </code>
          are mutually exclusive.
Specifying both options causes
          <code class="leafygreen-ui-1l06pbn">
           mongos
          </code>
          to throw an error and
terminate.
         </p>
        </li>
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          The command-line option
          <code class="leafygreen-ui-1l06pbn">
           --bind
          </code>
          overrides the configuration
file setting
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/configuration-options/#mongodb-setting-net.bindIp">
           <code class="leafygreen-ui-1l06pbn">
            net.bindIp
           </code>
           .
          </a>
         </p>
        </li>
       </ul>
      </div>
     </div>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --bind_ip_all
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--bind_ip_all" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--bind_ip_all">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      If specified, the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      instance binds to all IPv4
addresses (i.e.
      <code class="leafygreen-ui-1l06pbn">
       0.0.0.0
      </code>
      ). If
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      starts with
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ipv6" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ipv6
        </code>
       </span>
      </a>
      ,
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--bind_ip_all" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --bind_ip_all
        </code>
       </span>
      </a>
      also binds to all IPv6 addresses
(i.e.
      <code class="leafygreen-ui-1l06pbn">
       ::
      </code>
      ).
     </p>
     <p class="leafygreen-ui-1kp3ins">
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      only supports IPv6 if started with
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ipv6" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ipv6
        </code>
       </span>
      </a>
      . Specifying
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--bind_ip_all" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --bind_ip_all
        </code>
       </span>
      </a>
      alone does not enable IPv6 support.
     </p>
     <div class="leafygreen-ui-1sjx7ru" role="note">
      <h2 class="leafygreen-ui-29m78u">
       Warning
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        Before you bind your instance to a publicly-accessible IP address,
you must secure your cluster from unauthorized access. For a complete
list of security recommendations, see
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/administration/security-checklist/#std-label-security-checklist">
         Security Checklist for Self-Managed Deployments
        </a>
        . At minimum, consider
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/administration/security-checklist/#std-label-checklist-auth">
         enabling authentication
        </a>
        and
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/security-hardening/#std-label-network-config-hardening">
         hardening
network infrastructure
         <!-- -->
         .
        </a>
       </p>
      </div>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      For more information about IP Binding, refer to the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/security-mongodb-configuration/">
       IP Binding in Self-Managed Deployments
      </a>
      documentation.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Alternatively, you can set the
      <code class="leafygreen-ui-1l06pbn">
       --bind_ip
      </code>
      option to
      <code class="leafygreen-ui-1l06pbn">
       ::,0.0.0.0
      </code>
      or to an asterisk
      <code class="leafygreen-ui-1l06pbn">
       "*"
      </code>
      (enclose the asterisk in quotes to avoid filename
pattern expansion).
     </p>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        <code class="leafygreen-ui-1l06pbn">
         --bind_ip
        </code>
        and
        <code class="leafygreen-ui-1l06pbn">
         --bind_ip_all
        </code>
        are mutually exclusive. That
is, you can specify one or the other, but not both.
       </p>
      </div>
     </div>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --listenBacklog &lt;number&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--listenBacklog" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--listenBacklog">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      : Target system
      <code class="leafygreen-ui-1l06pbn">
       SOMAXCONN
      </code>
      constant
     </p>
     <p class="leafygreen-ui-1kp3ins">
      The maximum number of connections that can exist in the listen
queue.
     </p>
     <div class="leafygreen-ui-1sjx7ru" role="note">
      <h2 class="leafygreen-ui-29m78u">
       Warning
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        Consult your local system's documentation to understand the
limitations and configuration requirements before using this
parameter.
       </p>
      </div>
     </div>
     <div class="leafygreen-ui-85da11" role="note">
      <h2 class="leafygreen-ui-1ac4g5h">
       Important
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        To prevent undefined behavior, specify a value for this
parameter between
        <code class="leafygreen-ui-1l06pbn">
         1
        </code>
        and the local system
        <code class="leafygreen-ui-1l06pbn">
         SOMAXCONN
        </code>
        constant.
       </p>
      </div>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      The default value for the
      <code class="leafygreen-ui-1l06pbn">
       listenBacklog
      </code>
      parameter is set at
compile time to the target system
      <code class="leafygreen-ui-1l06pbn">
       SOMAXCONN
      </code>
      constant.
      <code class="leafygreen-ui-1l06pbn">
       SOMAXCONN
      </code>
      is the maximum valid value that is documented for
the
      <em>
       backlog
      </em>
      parameter to the
      <em>
       listen
      </em>
      system call.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Some systems may interpret
      <code class="leafygreen-ui-1l06pbn">
       SOMAXCONN
      </code>
      symbolically, and others
numerically. The actual
      <em>
       listen backlog
      </em>
      applied in practice may
differ from any numeric interpretation of the
      <code class="leafygreen-ui-1l06pbn">
       SOMAXCONN
      </code>
      constant
or argument to
      <code class="leafygreen-ui-1l06pbn">
       --listenBacklog
      </code>
      , and may also be constrained by
system settings like
      <code class="leafygreen-ui-1l06pbn">
       net.core.somaxconn
      </code>
      on Linux.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Passing a value for the
      <code class="leafygreen-ui-1l06pbn">
       listenBacklog
      </code>
      parameter that exceeds the
      <code class="leafygreen-ui-1l06pbn">
       SOMAXCONN
      </code>
      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.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      On systems with workloads that exhibit connection spikes, for which
it is empirically known that the local system can honor higher
values for the
      <em>
       backlog
      </em>
      parameter than the
      <code class="leafygreen-ui-1l06pbn">
       SOMAXCONN
      </code>
      constant,
setting the
      <code class="leafygreen-ui-1l06pbn">
       listenBacklog
      </code>
      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.
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --maxConns &lt;number&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--maxConns" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--maxConns">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      The maximum number of simultaneous connections that
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      accepts. This setting has no effect if it is higher than your
operating system's configured maximum connection tracking threshold.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Do not assign too low of a value to this option, or you will
encounter errors during normal application operation.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      This is particularly useful for a
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-binary-bin.mongos" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         mongos
        </code>
       </span>
      </a>
      if you have a client
that creates multiple connections and allows them to timeout rather
than closing them.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      In this case, set
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/configuration-options/#mongodb-setting-net.maxIncomingConnections">
       <code class="leafygreen-ui-1l06pbn">
        maxIncomingConnections
       </code>
      </a>
      to a value slightly
higher than the maximum number of connections that the client creates, or the
maximum size of the connection pool.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      This setting prevents the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      from causing connection spikes on
the individual
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-shard">
       shards
      </a>
      . Spikes like these may disrupt the
operation and memory allocation of the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-sharded-cluster">
       sharded cluster
       <!-- -->
       .
      </a>
     </p>
    </dd>
   </dl>
   <span class="leafygreen-ui-1qnjd6d" id="std-label-mongos-log-options-section">
   </span>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --logpath &lt;path&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--logpath" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--logpath">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Sends all diagnostic logging information to a log file instead of to
standard output or to the host's
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-syslog">
       syslog
      </a>
      system. MongoDB creates
the log file at the path you specify.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      By default, MongoDB will move any existing log file rather than overwrite
it. To instead append to the log file, set the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--logappend" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --logappend
        </code>
       </span>
      </a>
      option.
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --syslog
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--syslog" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--syslog">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Sends all logging output to the host's
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-syslog">
       syslog
      </a>
      system rather
than to standard output or to a log file (
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--logpath" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --logpath
        </code>
       </span>
      </a>
      ).
     </p>
     <p class="leafygreen-ui-1kp3ins">
      The
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--syslog" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --syslog
        </code>
       </span>
      </a>
      option is not supported on Windows.
     </p>
     <div class="leafygreen-ui-1sjx7ru" role="note">
      <h2 class="leafygreen-ui-29m78u">
       Warning
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        The
        <code class="leafygreen-ui-1l06pbn">
         syslog
        </code>
        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
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--logpath" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --logpath
          </code>
         </span>
        </a>
        option for production systems to
ensure accurate timestamps.
       </p>
      </div>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      MongoDB includes the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/log-messages/#std-label-log-message-components">
       component
      </a>
      in its log
messages to
      <code class="leafygreen-ui-1l06pbn">
       syslog
      </code>
      .
     </p>
     <script class="structured_data" type="application/ld+json">
      {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"...  ACCESS   [repl writer worker 5] Unsupported modification to roles collection ..."}
     </script>
     <div class="css-16lmvu9">
      <div class="leafygreen-ui-196mwvg">
       <div class="leafygreen-ui-1b1bvay">
        <pre class="leafygreen-ui-1q4bxgx" tabindex="0"><code class="lg-highlight-hljs-light none leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx">...  ACCESS   [repl writer worker 5] Unsupported modification to roles collection ...</td></tr></tbody></table></code></pre>
        <div class="leafygreen-ui-1bqcprk" data-testid="leafygreen-code-panel">
         <button aria-disabled="false" aria-label="Copy" class="leafygreen-ui-1c6zwke" data-testid="code_copy-button" tabindex="0">
          <div class="leafygreen-ui-xhlipt">
           <svg aria-label="Copy Icon" class="leafygreen-ui-1st74h4" height="16" role="img" viewbox="0 0 16 16" width="16">
            <path clip-rule="evenodd" d="M1 5.71428V10.2857C1 11.2325 1.76751 12 2.71429 12H5.75V7.10957C5.75 6.54414 5.97724 6.00244 6.38065 5.60623L8.67403 3.35381C8.77447 3.25516 8.88376 3.16757 9 3.09182V2.71429C9 1.76751 8.23249 1 7.28571 1H5.8V4.42857C5.8 5.13865 5.22437 5.71428 4.51429 5.71428H1ZM9 4.78571L7.25654 6.49804C7.24689 6.50752 7.23749 6.5172 7.22834 6.52708C7.22208 6.53383 7.21594 6.54068 7.20991 6.54762C7.07504 6.70295 7 6.90234 7 7.10957V7.79762H9H10.0095C10.4829 7.79762 10.8667 7.41386 10.8667 6.94047V4H10.1505C9.92587 4 9.7102 4.0882 9.54992 4.24562L9 4.78571ZM4.86667 1H4.15053C3.92587 1 3.7102 1.0882 3.54992 1.24562L1.25654 3.49804C1.09244 3.65921 1 3.87957 1 4.10957V4.79762H4.00952C4.48291 4.79762 4.86667 4.41386 4.86667 3.94047V1ZM7 12V8.71428H9H10.5143C11.2244 8.71428 11.8 8.13865 11.8 7.42857V4H13.2857C14.2325 4 15 4.76751 15 5.71429V13.2857C15 14.2325 14.2325 15 13.2857 15H8.71429C7.76751 15 7 14.2325 7 13.2857V12Z" fill="currentColor" fill-rule="evenodd">
            </path>
           </svg>
          </div>
         </button>
        </div>
       </div>
      </div>
     </div>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --syslogFacility &lt;string&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--syslogFacility" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--syslogFacility">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      : user
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Specifies the facility level used when logging messages to syslog.
The value you specify must be supported by your
operating system's implementation of syslog. To use this option, you
must  enable the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--syslog" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --syslog
        </code>
       </span>
      </a>
      option.
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --logappend
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--logappend" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--logappend">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Appends new entries to the end of the existing log file when the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      instance restarts. Without this option,
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#mongodb-binary-bin.mongod">
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
      </a>
      will back up the
existing log and create a new file.
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --logRotate &lt;string&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--logRotate" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--logRotate">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      : rename
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Determines the behavior for the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/logRotate/#mongodb-dbcommand-dbcmd.logRotate">
       <code class="leafygreen-ui-1l06pbn">
        logRotate
       </code>
      </a>
      command when
rotating the server log and/or the audit log. Specify either
      <code class="leafygreen-ui-1l06pbn">
       rename
      </code>
      or
      <code class="leafygreen-ui-1l06pbn">
       reopen
      </code>
      :
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        <code class="leafygreen-ui-1l06pbn">
         rename
        </code>
        renames the log file.
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        <code class="leafygreen-ui-1l06pbn">
         reopen
        </code>
        closes and reopens the log file following the typical
Linux/Unix log rotate behavior. Use
        <code class="leafygreen-ui-1l06pbn">
         reopen
        </code>
        when using the
Linux/Unix logrotate utility to avoid log loss.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        If you specify
        <code class="leafygreen-ui-1l06pbn">
         reopen
        </code>
        , you must also use
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--logappend" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --logappend
          </code>
          .
         </span>
        </a>
       </p>
      </li>
     </ul>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --redactClientLogData
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--redactClientLogData" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--redactClientLogData">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Available in MongoDB Enterprise only.
      </em>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      A
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      running with
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--redactClientLogData" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --redactClientLogData
        </code>
       </span>
      </a>
      redacts any message accompanying a given
log event before logging. This prevents the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      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.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Use
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--redactClientLogData" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --redactClientLogData
        </code>
       </span>
      </a>
      in conjunction with
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/security-encryption-at-rest/">
       Encryption at Rest
      </a>
      and
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/security-transport-encryption/">
       TLS/SSL (Transport Encryption)
      </a>
      to assist compliance with
regulatory requirements.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      For example, a MongoDB deployment might store Personally Identifiable
Information (PII) in one or more collections. The
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      logs events
such as those related to CRUD operations, sharding metadata, etc. It is
possible that the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      may expose PII as a part of these logging
operations. A
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      running with
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--redactClientLogData" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --redactClientLogData
        </code>
       </span>
      </a>
      removes any message
accompanying these events before being output to the log, effectively
removing the PII.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Diagnostics on a
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      running with
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--redactClientLogData" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --redactClientLogData
        </code>
       </span>
      </a>
      may be more difficult
due to the lack of data related to a log event. See the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/administration/monitoring/#std-label-monitoring-log-redaction">
       process logging
      </a>
      manual page for an
example of the effect of
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--redactClientLogData" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --redactClientLogData
        </code>
       </span>
      </a>
      on log output.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      On a running
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      , use
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/setParameter/#mongodb-dbcommand-dbcmd.setParameter">
       <code class="leafygreen-ui-1l06pbn">
        setParameter
       </code>
      </a>
      with the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/parameters/#mongodb-parameter-param.redactClientLogData">
       <code class="leafygreen-ui-1l06pbn">
        redactClientLogData
       </code>
      </a>
      parameter to configure this setting.
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --timeStampFormat &lt;string&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--timeStampFormat" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--timeStampFormat">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      : iso8601-local
     </p>
     <p class="leafygreen-ui-1kp3ins">
      The time format for timestamps in log messages. Specify one of the
following values:
     </p>
     <div class="leafygreen-ui-skkc39" tabindex="0">
      <table class="leafygreen-ui-hr8lsv">
       <colgroup>
        <col style="width:20%"/>
        <col style="width:40%"/>
       </colgroup>
       <thead class="leafygreen-ui-a9ho40">
        <tr data-testid="leafygreen-ui-header-row">
         <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Value
           </div>
          </div>
         </th>
         <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Description
           </div>
          </div>
         </th>
        </tr>
       </thead>
       <tbody>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             iso8601-utc
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            Displays timestamps in Coordinated Universal Time (UTC) in the
ISO-8601 format. For example, for New York at the start of the
Epoch:
            <code class="leafygreen-ui-1l06pbn">
             1970-01-01T00:00:00.000Z
            </code>
           </div>
          </div>
         </td>
        </tr>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             iso8601-local
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            Displays timestamps in local time in the ISO-8601
format. For example, for New York at the start of the Epoch:
            <code class="leafygreen-ui-1l06pbn">
             1969-12-31T19:00:00.000-05:00
            </code>
           </div>
          </div>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--timeStampFormat" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --timeStampFormat
          </code>
         </span>
        </a>
        no longer supports
        <code class="leafygreen-ui-1l06pbn">
         ctime
        </code>
        . An example of
        <code class="leafygreen-ui-1l06pbn">
         ctime
        </code>
        formatted date is:
        <code class="leafygreen-ui-1l06pbn">
         Wed Dec 31 18:17:54.811
        </code>
        .
       </p>
      </div>
     </div>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --pidfilepath &lt;path&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--pidfilepath" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--pidfilepath">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Specifies a file location to store the process ID (PID) of the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      process. The user running the
      <code class="leafygreen-ui-1l06pbn">
       mongod
      </code>
      or
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      process must be able to write to this path. If the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--pidfilepath" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --pidfilepath
        </code>
       </span>
      </a>
      option is not
specified, the process does not create a PID file. This option is generally
only useful in combination with the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--fork" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --fork
        </code>
       </span>
      </a>
      option.
     </p>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <h3 class="leafygreen-ui-144d5kf">
       <strong>
        Linux
       </strong>
      </h3>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        On Linux, PID file management is generally the responsibility of
your distro's init system: usually a service file in the
        <code class="leafygreen-ui-1l06pbn">
         /etc/init.d
        </code>
        directory, or a systemd unit file registered with
        <code class="leafygreen-ui-1l06pbn">
         systemctl
        </code>
        . Only
use the
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--pidfilepath" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --pidfilepath
          </code>
         </span>
        </a>
        option if you are not using one of these init
systems. For more information, please see the respective
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/installation/#std-label-tutorial-installation">
         Installation Guide
        </a>
        for your operating system.
       </p>
      </div>
     </div>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <h3 class="leafygreen-ui-144d5kf">
       <strong>
        macOS
       </strong>
      </h3>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        On macOS, PID file management is generally handled by
        <code class="leafygreen-ui-1l06pbn">
         brew
        </code>
        . Only use
the
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--pidfilepath" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --pidfilepath
          </code>
         </span>
        </a>
        option if you are not using
        <code class="leafygreen-ui-1l06pbn">
         brew
        </code>
        on your macOS system.
For more information, please see the respective
Installation Guide for your operating system.
       </p>
      </div>
     </div>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --keyFile &lt;file&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--keyFile" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--keyFile">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Specifies the path to a key file that stores the shared secret
that MongoDB instances use to authenticate to each other in a
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-sharded-cluster">
       sharded cluster
      </a>
      or
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-replica-set">
       replica set
      </a>
      .
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--keyFile" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --keyFile
        </code>
       </span>
      </a>
      implies
      <code class="leafygreen-ui-1l06pbn">
       client authorization
      </code>
      . See
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/security-internal-authentication/#std-label-inter-process-auth">
       Self-Managed Internal/Membership Authentication
      </a>
      for more
information.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/security-internal-authentication/#std-label-internal-auth-keyfile">
       Keyfiles for internal membership authentication
      </a>
      use YAML format to allow for multiple keys in a
keyfile. The YAML format accepts either:
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        A single key string (same as in earlier versions)
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        A sequence of key strings
       </p>
      </li>
     </ul>
     <p class="leafygreen-ui-1kp3ins">
      The YAML format is compatible with the existing single-key
keyfiles that use the text file format.
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --setParameter &lt;options&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--setParameter" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--setParameter">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Specifies one of the MongoDB parameters described in
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/parameters/">
       MongoDB Server Parameters for a Self-Managed Deployment
      </a>
      . You can specify multiple
      <code class="leafygreen-ui-1l06pbn">
       setParameter
      </code>
      fields.
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --noscripting
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--noscripting" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--noscripting">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Disables the scripting engine.  When disabled, you cannot use
operations that perform server-side execution of JavaScript code,
such as the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/operator/query/where/#mongodb-query-op.-where">
       <code class="leafygreen-ui-1l06pbn">
        $where
       </code>
      </a>
      query operator,
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/mapReduce/#mongodb-dbcommand-dbcmd.mapReduce">
       <code class="leafygreen-ui-1l06pbn">
        mapReduce
       </code>
      </a>
      command,
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/operator/aggregation/accumulator/#mongodb-group-grp.-accumulator">
       <code class="leafygreen-ui-1l06pbn">
        $accumulator
       </code>
      </a>
      , and
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/operator/aggregation/function/#mongodb-expression-exp.-function">
       <code class="leafygreen-ui-1l06pbn">
        $function
       </code>
       .
      </a>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      If you do not use these operations, disable server-side scripting.
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --nounixsocket
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--nounixsocket" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--nounixsocket">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Disables listening on the UNIX domain socket.
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--nounixsocket" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --nounixsocket
        </code>
       </span>
      </a>
      applies only
to Unix-based systems.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      The
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      process
always listens on the UNIX socket unless one of the following is true:
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--nounixsocket" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --nounixsocket
          </code>
         </span>
        </a>
        is set
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/configuration-options/#mongodb-setting-net.bindIp">
         <code class="leafygreen-ui-1l06pbn">
          net.bindIp
         </code>
        </a>
        is not set
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/configuration-options/#mongodb-setting-net.bindIp">
         <code class="leafygreen-ui-1l06pbn">
          net.bindIp
         </code>
        </a>
        does not specify
        <code class="leafygreen-ui-1l06pbn">
         localhost
        </code>
        or its associated IP address
       </p>
      </li>
     </ul>
     <p class="leafygreen-ui-1kp3ins">
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      installed from official
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/install-mongodb-on-debian/">
       .deb
      </a>
      and
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/install-mongodb-on-red-hat/">
       .rpm
      </a>
      packages
have the
      <code class="leafygreen-ui-1l06pbn">
       bind_ip
      </code>
      configuration set to
      <code class="leafygreen-ui-1l06pbn">
       127.0.0.1
      </code>
      by
default.
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --unixSocketPrefix &lt;path&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--unixSocketPrefix" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--unixSocketPrefix">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      : /tmp
     </p>
     <p class="leafygreen-ui-1kp3ins">
      The path for the UNIX socket.
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--unixSocketPrefix" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --unixSocketPrefix
        </code>
       </span>
      </a>
      applies only
to Unix-based systems.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      If this option has no value, the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      process creates a socket with
      <code class="leafygreen-ui-1l06pbn">
       /tmp
      </code>
      as a prefix. MongoDB
creates and listens on a UNIX socket unless one of the following is true:
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/configuration-options/#mongodb-setting-net.unixDomainSocket.enabled">
         <code class="leafygreen-ui-1l06pbn">
          net.unixDomainSocket.enabled
         </code>
        </a>
        is
        <code class="leafygreen-ui-1l06pbn">
         false
        </code>
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--nounixsocket" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --nounixsocket
          </code>
         </span>
        </a>
        is set
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/configuration-options/#mongodb-setting-net.bindIp">
         <code class="leafygreen-ui-1l06pbn">
          net.bindIp
         </code>
        </a>
        is not set
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/configuration-options/#mongodb-setting-net.bindIp">
         <code class="leafygreen-ui-1l06pbn">
          net.bindIp
         </code>
        </a>
        does not specify
        <code class="leafygreen-ui-1l06pbn">
         localhost
        </code>
        or its associated IP address
       </p>
      </li>
     </ul>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --filePermissions &lt;path&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--filePermissions" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--filePermissions">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      :
      <code class="leafygreen-ui-1l06pbn">
       0700
      </code>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Sets the permission for the UNIX domain socket file.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--filePermissions" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --filePermissions
        </code>
       </span>
      </a>
      applies only to Unix-based systems.
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --fork
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--fork" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--fork">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Enables a
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-daemon">
       daemon
      </a>
      mode that runs the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      process in the
background. The
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--fork" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --fork
        </code>
       </span>
      </a>
      option is not supported on Windows.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      By default
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      does not run as a daemon. You run
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      as
a daemon by using either
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--fork" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --fork
        </code>
       </span>
      </a>
      or a controlling process
that handles daemonization, such as
      <code class="leafygreen-ui-1l06pbn">
       upstart
      </code>
      or
      <code class="leafygreen-ui-1l06pbn">
       systemd
      </code>
      .
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Using the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--fork" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --fork
        </code>
       </span>
      </a>
      option requires that you configure log
output for the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      with one of the following:
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--logpath" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --logpath
          </code>
         </span>
        </a>
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--syslog" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --syslog
          </code>
         </span>
        </a>
       </p>
      </li>
     </ul>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --transitionToAuth
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--transitionToAuth" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--transitionToAuth">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Allows the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      to accept and create authenticated and
non-authenticated connections to and from other
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#mongodb-binary-bin.mongod">
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
      </a>
      and
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      instances in the deployment. Used for
performing rolling transition of replica sets or sharded clusters
from a no-auth configuration to
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/security-internal-authentication/#std-label-inter-process-auth">
       internal authentication
      </a>
      . Requires specifying a
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/security-internal-authentication/#std-label-inter-process-auth">
       internal
authentication
      </a>
      mechanism such as
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--keyFile" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --keyFile
        </code>
        .
       </span>
      </a>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      For example, if using
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/security-internal-authentication/#std-label-internal-auth-keyfile">
       keyfiles
      </a>
      for
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/security-internal-authentication/#std-label-inter-process-auth">
       internal authentication
      </a>
      , the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      creates
an authenticated connection with any
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#mongodb-binary-bin.mongod">
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
      </a>
      or
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      in the deployment using a matching keyfile. If the security mechanisms do
not match, the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      utilizes a non-authenticated connection instead.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      A
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      running with
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--transitionToAuth" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --transitionToAuth
        </code>
       </span>
      </a>
      does not enforce
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/authorization/#std-label-authorization">
       user access
controls
      </a>
      . Users may connect to your deployment without any
access control checks and perform read, write, and administrative operations.
     </p>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        A
        <code class="leafygreen-ui-1l06pbn">
         mongos
        </code>
        running with
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/security-internal-authentication/#std-label-inter-process-auth">
         internal authentication
        </a>
        and
        <em>
         without
        </em>
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--transitionToAuth" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --transitionToAuth
          </code>
         </span>
        </a>
        requires clients to connect
using
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/authorization/#std-label-authorization">
         user access controls
        </a>
        . Update clients to
connect to the
        <code class="leafygreen-ui-1l06pbn">
         mongos
        </code>
        using the appropriate
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/security-users/#std-label-users">
         user
        </a>
        prior to restarting
        <code class="leafygreen-ui-1l06pbn">
         mongos
        </code>
        without
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--transitionToAuth" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --transitionToAuth
          </code>
          .
         </span>
        </a>
       </p>
      </div>
     </div>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --networkMessageCompressors &lt;string&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--networkMessageCompressors" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--networkMessageCompressors">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      : snappy,zstd,zlib
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Specifies the default compressor(s) to use for
communication between this
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      instance and:
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        other members of the sharded cluster
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://www.mongodb.com/docs/mongodb-shell/#mongodb-binary-bin.mongosh" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           mongosh
          </code>
         </span>
        </a>
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        drivers that support the
        <code class="leafygreen-ui-1l06pbn">
         OP_COMPRESSED
        </code>
        message format.
       </p>
      </li>
     </ul>
     <p class="leafygreen-ui-1kp3ins">
      MongoDB supports the following compressors:
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-snappy">
         snappy
        </a>
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-zlib">
         zlib
        </a>
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-zstd">
         zstd
        </a>
       </p>
      </li>
     </ul>
     <p class="leafygreen-ui-1kp3ins">
      Both
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#mongodb-binary-bin.mongod">
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
      </a>
      and
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      instances
default to
      <code class="leafygreen-ui-1l06pbn">
       snappy,zstd,zlib
      </code>
      compressors, in that order.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      To disable network compression, set the value to
      <code class="leafygreen-ui-1l06pbn">
       disabled
      </code>
      .
     </p>
     <div class="leafygreen-ui-85da11" role="note">
      <h2 class="leafygreen-ui-1ac4g5h">
       Important
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        Messages are compressed when both parties enable network
compression. Otherwise, messages between the parties are
uncompressed.
       </p>
      </div>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      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 class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://www.mongodb.com/docs/mongodb-shell/#mongodb-binary-bin.mongosh" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         mongosh
        </code>
       </span>
      </a>
      specifies the following network
compressors
      <code class="leafygreen-ui-1l06pbn">
       zlib,snappy
      </code>
      and the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#mongodb-binary-bin.mongod">
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
      </a>
      specifies
      <code class="leafygreen-ui-1l06pbn">
       snappy,zlib
      </code>
      , messages between
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://www.mongodb.com/docs/mongodb-shell/#mongodb-binary-bin.mongosh" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         mongosh
        </code>
       </span>
      </a>
      and
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#mongodb-binary-bin.mongod">
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
      </a>
      uses
      <code class="leafygreen-ui-1l06pbn">
       zlib
      </code>
      .
     </p>
     <p class="leafygreen-ui-1kp3ins">
      If the parties do not share at least one common compressor, messages
between the parties are uncompressed. For example, if
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://www.mongodb.com/docs/mongodb-shell/#mongodb-binary-bin.mongosh" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         mongosh
        </code>
       </span>
      </a>
      specifies the network compressor
      <code class="leafygreen-ui-1l06pbn">
       zlib
      </code>
      and
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#mongodb-binary-bin.mongod">
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
      </a>
      specifies
      <code class="leafygreen-ui-1l06pbn">
       snappy
      </code>
      , messages
between
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://www.mongodb.com/docs/mongodb-shell/#mongodb-binary-bin.mongosh" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         mongosh
        </code>
       </span>
      </a>
      and
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#mongodb-binary-bin.mongod">
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
      </a>
      are not
compressed.
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --timeZoneInfo &lt;path&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--timeZoneInfo" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--timeZoneInfo">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      The full path from which to load the time zone database. If this option
is not provided, then MongoDB uses its built-in time zone database.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      The configuration file included with Linux and macOS packages sets the
time zone database path to
      <code class="leafygreen-ui-1l06pbn">
       /usr/share/zoneinfo
      </code>
      by default.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      The built-in time zone database is a copy of the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://www.iana.org/time-zones" rel="noopener noreferrer">
       <span>
        Olson/IANA time zone
database
       </span>
       <svg alt="" aria-hidden="true" class="leafygreen-ui-1ie5kuq" height="16" role="presentation" viewbox="0 0 16 16" width="16">
        <path d="M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z" fill="currentColor">
        </path>
        <path d="M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z" fill="currentColor">
        </path>
       </svg>
      </a>
      . It is updated along with
MongoDB releases, but the time zone database release cycle
differs from the MongoDB release cycle. The most recent release of
the time zone database is available on our
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://downloads.mongodb.org/olson_tz_db/timezonedb-latest.zip" rel="noopener noreferrer">
       <span>
        download site
       </span>
       <svg alt="" aria-hidden="true" class="leafygreen-ui-1ie5kuq" height="16" role="presentation" viewbox="0 0 16 16" width="16">
        <path d="M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z" fill="currentColor">
        </path>
        <path d="M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z" fill="currentColor">
        </path>
       </svg>
      </a>
      .
     </p>
     <script class="structured_data" type="application/ld+json">
      {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"wget https://downloads.mongodb.org/olson_tz_db/timezonedb-latest.zip\nunzip timezonedb-latest.zip\nmongos --timeZoneInfo timezonedb-2017b/","programmingLanguage":"Bash"}
     </script>
     <div class="css-16lmvu9">
      <div class="leafygreen-ui-196mwvg">
       <div class="leafygreen-ui-1b1bvay">
        <pre class="leafygreen-ui-11itue3" tabindex="0"><code class="lg-highlight-hljs-light bash leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx">wget https:/<!-- -->/downloads.mongodb.org/olson_tz_db/timezonedb-latest.zip</td></tr><tr class=""><td class="leafygreen-ui-7razhx">unzip timezonedb-latest.zip</td></tr><tr class=""><td class="leafygreen-ui-7razhx">mongos --timeZoneInfo timezonedb-2017b/</td></tr></tbody></table></code></pre>
        <div class="leafygreen-ui-1bqcprk" data-testid="leafygreen-code-panel">
         <button aria-disabled="false" aria-label="Copy" class="leafygreen-ui-1c6zwke" data-testid="code_copy-button" tabindex="0">
          <div class="leafygreen-ui-xhlipt">
           <svg aria-label="Copy Icon" class="leafygreen-ui-1st74h4" height="16" role="img" viewbox="0 0 16 16" width="16">
            <path clip-rule="evenodd" d="M1 5.71428V10.2857C1 11.2325 1.76751 12 2.71429 12H5.75V7.10957C5.75 6.54414 5.97724 6.00244 6.38065 5.60623L8.67403 3.35381C8.77447 3.25516 8.88376 3.16757 9 3.09182V2.71429C9 1.76751 8.23249 1 7.28571 1H5.8V4.42857C5.8 5.13865 5.22437 5.71428 4.51429 5.71428H1ZM9 4.78571L7.25654 6.49804C7.24689 6.50752 7.23749 6.5172 7.22834 6.52708C7.22208 6.53383 7.21594 6.54068 7.20991 6.54762C7.07504 6.70295 7 6.90234 7 7.10957V7.79762H9H10.0095C10.4829 7.79762 10.8667 7.41386 10.8667 6.94047V4H10.1505C9.92587 4 9.7102 4.0882 9.54992 4.24562L9 4.78571ZM4.86667 1H4.15053C3.92587 1 3.7102 1.0882 3.54992 1.24562L1.25654 3.49804C1.09244 3.65921 1 3.87957 1 4.10957V4.79762H4.00952C4.48291 4.79762 4.86667 4.41386 4.86667 3.94047V1ZM7 12V8.71428H9H10.5143C11.2244 8.71428 11.8 8.13865 11.8 7.42857V4H13.2857C14.2325 4 15 4.76751 15 5.71429V13.2857C15 14.2325 14.2325 15 13.2857 15H8.71429C7.76751 15 7 14.2325 7 13.2857V12Z" fill="currentColor" fill-rule="evenodd">
            </path>
           </svg>
          </div>
         </button>
        </div>
       </div>
      </div>
     </div>
     <div class="leafygreen-ui-1sjx7ru" role="note">
      <h2 class="leafygreen-ui-29m78u">
       Warning
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        MongoDB uses the third party
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://github.com/derickr/timelib" rel="noopener noreferrer">
         <span>
          timelib
         </span>
         <svg alt="" aria-hidden="true" class="leafygreen-ui-1ie5kuq" height="16" role="presentation" viewbox="0 0 16 16" width="16">
          <path d="M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z" fill="currentColor">
          </path>
          <path d="M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z" fill="currentColor">
          </path>
         </svg>
        </a>
        library to provide accurate
conversions between timezones. Due to a recent update,
        <code class="leafygreen-ui-1l06pbn">
         timelib
        </code>
        could create inaccurate time zone conversions in older versions of
MongoDB.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        To explicitly link to the time zone database in versions of MongoDB
prior to 5.0, download the
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://downloads.mongodb.org/olson_tz_db/timezonedb-latest.zip" rel="noopener noreferrer">
         <span>
          time zone database
         </span>
         <svg alt="" aria-hidden="true" class="leafygreen-ui-1ie5kuq" height="16" role="presentation" viewbox="0 0 16 16" width="16">
          <path d="M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z" fill="currentColor">
          </path>
          <path d="M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z" fill="currentColor">
          </path>
         </svg>
        </a>
        .
and use the
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#std-option-mongod.--timeZoneInfo">
         <code class="leafygreen-ui-1l06pbn">
          timeZoneInfo
         </code>
        </a>
        parameter.
       </p>
      </div>
     </div>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --outputConfig
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--outputConfig" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--outputConfig">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Outputs the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      instance's configuration options, formatted
in YAML, to
      <code class="leafygreen-ui-1l06pbn">
       stdout
      </code>
      and exits the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      instance. For
configuration options that uses
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/expansion-directives/#std-label-externally-sourced-values">
       Externally Sourced Configuration File Values for Self-Managed Deployments
      </a>
      ,
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--outputConfig" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --outputConfig
        </code>
       </span>
      </a>
      returns the resolved value for those options.
     </p>
     <div class="leafygreen-ui-1sjx7ru" role="note">
      <h2 class="leafygreen-ui-29m78u">
       Warning
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        This may include any configured passwords or secrets previously
obfuscated through the external source.
       </p>
      </div>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      For usage examples, see:
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/expansion-directives/#std-label-expansion-directive-output">
         Output the Configuration File with Resolved Expansion Directive Values
        </a>
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/convert-command-line-options-to-yaml/">
         Convert Self-Managed Command-Line Options to YAML
        </a>
       </p>
      </li>
     </ul>
    </dd>
   </dl>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Sharded Cluster Options
    <a class="headerlink leafygreen-ui-1kepx47" href="#sharded-cluster-options" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="sharded-cluster-options">
     </div>
    </a>
   </h3>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --configdb &lt;replicasetName&gt;/&lt;config1&gt;,&lt;config2&gt;...
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--configdb" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--configdb">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Specifies the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/sharded-cluster-config-servers/#std-label-sharding-config-server">
       configuration servers
      </a>
      for the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-sharded-cluster">
       sharded cluster
       <!-- -->
       .
      </a>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Config servers for sharded clusters are
deployed as a
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/replication/">
       replica set
      </a>
      . The
replica set config servers must run the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/wiredtiger/">
       WiredTiger storage engine
       <!-- -->
       .
      </a>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Specify the config server replica set name and the hostname and port of
at least one of the members of the config server replica set.
     </p>
     <script class="structured_data" type="application/ld+json">
      {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"sharding:\n  configDB: &lt;configreplsetname&gt;/cfg1.example.net:27019, cfg2.example.net:27019,...","programmingLanguage":"JavaScript"}
     </script>
     <div class="css-16lmvu9">
      <div class="leafygreen-ui-196mwvg">
       <div class="leafygreen-ui-1b1bvay">
        <pre class="leafygreen-ui-11itue3" tabindex="0"><code class="lg-highlight-hljs-light javascript leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx"><span class="lg-highlight-attr">sharding</span>:</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  <span class="lg-highlight-attr">configDB</span>: &lt;<!-- -->configReplSetName<!-- -->&gt;<!-- -->/<!-- -->cfg1.<span class="lg-highlight-property">example</span>.<span class="lg-highlight-property">net</span>:<span class="lg-highlight-number">27019</span>, <!-- -->cfg2.<span class="lg-highlight-property">example</span>.<span class="lg-highlight-property">net</span>:<span class="lg-highlight-number">27019</span>,<!-- -->...</td></tr></tbody></table></code></pre>
        <div class="leafygreen-ui-1bqcprk" data-testid="leafygreen-code-panel">
         <button aria-disabled="false" aria-label="Copy" class="leafygreen-ui-1c6zwke" data-testid="code_copy-button" tabindex="0">
          <div class="leafygreen-ui-xhlipt">
           <svg aria-label="Copy Icon" class="leafygreen-ui-1st74h4" height="16" role="img" viewbox="0 0 16 16" width="16">
            <path clip-rule="evenodd" d="M1 5.71428V10.2857C1 11.2325 1.76751 12 2.71429 12H5.75V7.10957C5.75 6.54414 5.97724 6.00244 6.38065 5.60623L8.67403 3.35381C8.77447 3.25516 8.88376 3.16757 9 3.09182V2.71429C9 1.76751 8.23249 1 7.28571 1H5.8V4.42857C5.8 5.13865 5.22437 5.71428 4.51429 5.71428H1ZM9 4.78571L7.25654 6.49804C7.24689 6.50752 7.23749 6.5172 7.22834 6.52708C7.22208 6.53383 7.21594 6.54068 7.20991 6.54762C7.07504 6.70295 7 6.90234 7 7.10957V7.79762H9H10.0095C10.4829 7.79762 10.8667 7.41386 10.8667 6.94047V4H10.1505C9.92587 4 9.7102 4.0882 9.54992 4.24562L9 4.78571ZM4.86667 1H4.15053C3.92587 1 3.7102 1.0882 3.54992 1.24562L1.25654 3.49804C1.09244 3.65921 1 3.87957 1 4.10957V4.79762H4.00952C4.48291 4.79762 4.86667 4.41386 4.86667 3.94047V1ZM7 12V8.71428H9H10.5143C11.2244 8.71428 11.8 8.13865 11.8 7.42857V4H13.2857C14.2325 4 15 4.76751 15 5.71429V13.2857C15 14.2325 14.2325 15 13.2857 15H8.71429C7.76751 15 7 14.2325 7 13.2857V12Z" fill="currentColor" fill-rule="evenodd">
            </path>
           </svg>
          </div>
         </button>
        </div>
       </div>
      </div>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      The
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      instances for the sharded cluster must specify
the same config server replica set name but can specify hostname and
port of different members of the replica set.
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --localThreshold
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--localThreshold" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--localThreshold">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      : 15
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Specifies the ping time, in milliseconds, that
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      uses
to determine which secondary replica set members to pass read
operations from clients. The default value of
      <code class="leafygreen-ui-1l06pbn">
       15
      </code>
      corresponds to
the default value in all of the client
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://www.mongodb.com/docs/drivers/" target="_self">
       <span>
        drivers
        <!-- -->
        .
       </span>
      </a>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      When
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      receives a request that permits reads to
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-secondary">
       secondary
      </a>
      members, it:
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        Finds the member of the set with the lowest ping time.
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        Constructs a list of replica set members that is within a ping time of
15 milliseconds of the nearest suitable member of the set.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        If you specify a value for the
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--localThreshold" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --localThreshold
          </code>
         </span>
        </a>
        option,
        <code class="leafygreen-ui-1l06pbn">
         mongos
        </code>
        constructs the list of replica members that are within
the latency allowed by this value.
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        Selects a member to read from at random from this list.
       </p>
      </li>
     </ul>
     <p class="leafygreen-ui-1kp3ins">
      The ping time used for a member compared by the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--localThreshold" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --localThreshold
        </code>
       </span>
      </a>
      setting is a
moving average of recent ping times, calculated at most every 10
seconds. As a result, some queries may reach members above the threshold
until the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      recalculates the average.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      See the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/read-preference-mechanics/#std-label-replica-set-read-preference-behavior-member-selection">
       Read Preference for Replica Sets
      </a>
      section of the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/read-preference/#std-label-read-preference">
       read preference
      </a>
      documentation for more information.
     </p>
    </dd>
   </dl>
   <span class="leafygreen-ui-1qnjd6d" id="std-label-mongos-tls-options">
   </span>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    TLS Options
    <a class="headerlink leafygreen-ui-1kepx47" href="#tls-options" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="tls-options">
     </div>
    </a>
   </h3>
   <div class="leafygreen-ui-13vw3ie" role="note">
    <h2 class="leafygreen-ui-1fn4p2b">
     Tip
    </h2>
    <h3 class="leafygreen-ui-144d5kf">
     <strong>
      See:
     </strong>
    </h3>
    <div class="leafygreen-ui-9mycqc">
     <p class="leafygreen-ui-1kp3ins">
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl/">
       Configure
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
       and
       <code class="leafygreen-ui-1l06pbn">
        mongos
       </code>
       for TLS/SSL
      </a>
      for full documentation of MongoDB's
support.
     </p>
    </div>
   </div>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --tlsMode &lt;mode&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--tlsMode" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--tlsMode">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Enables TLS used for all network connections. The
argument to the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsMode" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsMode
        </code>
       </span>
      </a>
      option can be one of the following:
     </p>
     <div class="leafygreen-ui-skkc39" tabindex="0">
      <table class="leafygreen-ui-hr8lsv">
       <colgroup>
        <col style="width:20%"/>
        <col style="width:40%"/>
       </colgroup>
       <thead class="leafygreen-ui-a9ho40">
        <tr data-testid="leafygreen-ui-header-row">
         <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Value
           </div>
          </div>
         </th>
         <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Description
           </div>
          </div>
         </th>
        </tr>
       </thead>
       <tbody>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             disabled
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            The server does not use TLS.
           </div>
          </div>
         </td>
        </tr>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             allowTLS
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            Connections between servers do not use TLS. For incoming
connections, the server accepts both TLS and non-TLS.
           </div>
          </div>
         </td>
        </tr>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             preferTLS
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            Connections between servers use TLS. For incoming
connections, the server accepts both TLS and non-TLS.
           </div>
          </div>
         </td>
        </tr>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             requireTLS
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            The server uses and accepts only TLS encrypted connections.
           </div>
          </div>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      If
      <code class="leafygreen-ui-1l06pbn">
       --tlsCAFile
      </code>
      or
      <code class="leafygreen-ui-1l06pbn">
       tls.CAFile
      </code>
      is not
specified and you are not using x.509 authentication, you must set the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/parameters/#mongodb-parameter-param.tlsUseSystemCA">
       <code class="leafygreen-ui-1l06pbn">
        tlsUseSystemCA
       </code>
      </a>
      parameter to
      <code class="leafygreen-ui-1l06pbn">
       true
      </code>
      . This makes MongoDB use
the system-wide CA certificate store when connecting to a TLS-enabled server.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      If using x.509 authentication,
      <code class="leafygreen-ui-1l06pbn">
       --tlsCAFile
      </code>
      or
      <code class="leafygreen-ui-1l06pbn">
       tls.CAFile
      </code>
      must be specified unless using
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#std-option-mongod.--tlsCertificateSelector">
       <code class="leafygreen-ui-1l06pbn">
        --tlsCertificateSelector
       </code>
       .
      </a>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      For more information about TLS and MongoDB, see
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl/">
       Configure
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
       and
       <code class="leafygreen-ui-1l06pbn">
        mongos
       </code>
       for TLS/SSL
      </a>
      and
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl-clients/">
       TLS/SSL Configuration for Clients
      </a>
      .
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --tlsCertificateKeyFile &lt;filename&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--tlsCertificateKeyFile" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--tlsCertificateKeyFile">
      </div>
     </a>
    </dt>
    <dd>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        On macOS or Windows, you can use a certificate from
the operating system's secure store instead of specifying a PEM file. See
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsCertificateSelector" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --tlsCertificateSelector
          </code>
          .
         </span>
        </a>
       </p>
      </div>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      Specifies the
      <code class="file docutils literal">
       <span class="pre">
        .pem
       </span>
      </code>
      file that contains both the TLS certificate
and key.
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        On Linux/BSD, you must specify
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsCertificateKeyFile" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --tlsCertificateKeyFile
          </code>
         </span>
        </a>
        when TLS is enabled.
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        On Windows or macOS, you must specify either
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsCertificateKeyFile" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --tlsCertificateKeyFile
          </code>
         </span>
        </a>
        or
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsCertificateSelector" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --tlsCertificateSelector
          </code>
         </span>
        </a>
        when TLS is enabled.
       </p>
      </li>
     </ul>
     <p class="leafygreen-ui-1kp3ins">
      For more information about TLS and MongoDB, see
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl/">
       Configure
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
       and
       <code class="leafygreen-ui-1l06pbn">
        mongos
       </code>
       for TLS/SSL
      </a>
      and
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl-clients/">
       TLS/SSL Configuration for Clients
      </a>
      .
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --tlsCertificateKeyFilePassword &lt;value&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--tlsCertificateKeyFilePassword" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--tlsCertificateKeyFilePassword">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Specifies the password to decrypt the certificate-key file (i.e.
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsCertificateKeyFile" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsCertificateKeyFile
        </code>
       </span>
      </a>
      ). Use the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsCertificateKeyFilePassword" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsCertificateKeyFilePassword
        </code>
       </span>
      </a>
      option only if the
certificate-key file is encrypted. In all cases, the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      redacts the password from all logging and reporting output.
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        On Linux/BSD, if the private key in the PEM file is encrypted and
you do not specify the
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsCertificateKeyFilePassword" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --tlsCertificateKeyFilePassword
          </code>
         </span>
        </a>
        option, MongoDB prompts for a
passphrase. See
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl/#std-label-ssl-certificate-password">
         TLS/SSL Certificate Passphrase
         <!-- -->
         .
        </a>
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        On macOS or Windows, if the private key in the PEM file is
encrypted, you must explicitly specify the
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsCertificateKeyFilePassword" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --tlsCertificateKeyFilePassword
          </code>
         </span>
        </a>
        option.
Alternatively, you can use a certificate from the secure system
store (see
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsCertificateSelector" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --tlsCertificateSelector
          </code>
         </span>
        </a>
        ) instead of a PEM file or use an
unencrypted PEM file.
       </p>
      </li>
     </ul>
     <p class="leafygreen-ui-1kp3ins">
      For more information about TLS and MongoDB, see
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl/">
       Configure
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
       and
       <code class="leafygreen-ui-1l06pbn">
        mongos
       </code>
       for TLS/SSL
      </a>
      and
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl-clients/">
       TLS/SSL Configuration for Clients
      </a>
      .
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --clusterAuthMode &lt;option&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--clusterAuthMode" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--clusterAuthMode">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      : keyFile
     </p>
     <p class="leafygreen-ui-1kp3ins">
      The authentication mode used for cluster authentication. If you use
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-x509-member-authentication/#std-label-x509-internal-authentication">
       internal x.509 authentication
      </a>
      ,
specify so here. This option can have one of the following values:
     </p>
     <div class="leafygreen-ui-skkc39" tabindex="0">
      <table class="leafygreen-ui-hr8lsv">
       <colgroup>
        <col style="width:20%"/>
        <col style="width:40%"/>
       </colgroup>
       <thead class="leafygreen-ui-a9ho40">
        <tr data-testid="leafygreen-ui-header-row">
         <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Value
           </div>
          </div>
         </th>
         <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Description
           </div>
          </div>
         </th>
        </tr>
       </thead>
       <tbody>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             keyFile
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            Use a keyfile for authentication.
Accept only keyfiles.
           </div>
          </div>
         </td>
        </tr>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             sendKeyFile
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            For rolling upgrade purposes. Send a keyfile for
authentication but can accept both keyfiles and x.509
certificates.
           </div>
          </div>
         </td>
        </tr>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             sendX509
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            For rolling upgrade purposes. Send the x.509 certificate for
authentication but can accept both keyfiles and x.509
certificates.
           </div>
          </div>
         </td>
        </tr>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             x509
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            Recommended. Send the x.509 certificate for authentication and
accept only x.509 certificates.
           </div>
          </div>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      If
      <code class="leafygreen-ui-1l06pbn">
       --tlsCAFile
      </code>
      or
      <code class="leafygreen-ui-1l06pbn">
       tls.CAFile
      </code>
      is not
specified and you are not using x.509 authentication, you must set the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/parameters/#mongodb-parameter-param.tlsUseSystemCA">
       <code class="leafygreen-ui-1l06pbn">
        tlsUseSystemCA
       </code>
      </a>
      parameter to
      <code class="leafygreen-ui-1l06pbn">
       true
      </code>
      . This makes MongoDB use
the system-wide CA certificate store when connecting to a TLS-enabled server.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      If using x.509 authentication,
      <code class="leafygreen-ui-1l06pbn">
       --tlsCAFile
      </code>
      or
      <code class="leafygreen-ui-1l06pbn">
       tls.CAFile
      </code>
      must be specified unless using
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#std-option-mongod.--tlsCertificateSelector">
       <code class="leafygreen-ui-1l06pbn">
        --tlsCertificateSelector
       </code>
       .
      </a>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      For more information about TLS and MongoDB, see
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl/">
       Configure
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
       and
       <code class="leafygreen-ui-1l06pbn">
        mongos
       </code>
       for TLS/SSL
      </a>
      and
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl-clients/">
       TLS/SSL Configuration for Clients
      </a>
      .
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --tlsClusterFile &lt;filename&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--tlsClusterFile" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--tlsClusterFile">
      </div>
     </a>
    </dt>
    <dd>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        On macOS or Windows, you can use a certificate
from the operating system's secure store instead of a PEM
file. See
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsClusterCertificateSelector" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --tlsClusterCertificateSelector
          </code>
          .
         </span>
        </a>
       </p>
      </div>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      Specifies the
      <code class="file docutils literal">
       <span class="pre">
        .pem
       </span>
      </code>
      file that contains the x.509 certificate-key
file for
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-x509-member-authentication/#std-label-x509-internal-authentication">
       membership authentication
      </a>
      for the cluster or replica set.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      If
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsClusterFile" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsClusterFile
        </code>
       </span>
      </a>
      does not specify the
      <code class="leafygreen-ui-1l06pbn">
       .pem
      </code>
      file for internal cluster
authentication or the alternative
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsClusterCertificateSelector" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsClusterCertificateSelector
        </code>
       </span>
      </a>
      , the cluster uses the
      <code class="leafygreen-ui-1l06pbn">
       .pem
      </code>
      file specified in the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsCertificateKeyFile" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsCertificateKeyFile
        </code>
       </span>
      </a>
      option or
the certificate returned by the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsCertificateSelector" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsCertificateSelector
        </code>
        .
       </span>
      </a>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      If using x.509 authentication,
      <code class="leafygreen-ui-1l06pbn">
       --tlsCAFile
      </code>
      or
      <code class="leafygreen-ui-1l06pbn">
       tls.CAFile
      </code>
      must be specified unless using
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#std-option-mongod.--tlsCertificateSelector">
       <code class="leafygreen-ui-1l06pbn">
        --tlsCertificateSelector
       </code>
       .
      </a>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#mongodb-binary-bin.mongod">
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
      </a>
      /
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-binary-bin.mongos" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         mongos
        </code>
       </span>
      </a>
      logs a warning on
connection if the presented x.509 certificate expires within
      <code class="leafygreen-ui-1l06pbn">
       30
      </code>
      days of the
      <code class="leafygreen-ui-1l06pbn">
       mongod/mongos
      </code>
      host system time.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      For more information about TLS and MongoDB, see
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl/">
       Configure
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
       and
       <code class="leafygreen-ui-1l06pbn">
        mongos
       </code>
       for TLS/SSL
      </a>
      and
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl-clients/">
       TLS/SSL Configuration for Clients
      </a>
      .
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --tlsClusterPassword &lt;value&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--tlsClusterPassword" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--tlsClusterPassword">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Specifies the password to decrypt the x.509 certificate-key file
specified with
      <code class="leafygreen-ui-1l06pbn">
       --tlsClusterFile
      </code>
      . Use the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsClusterPassword" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsClusterPassword
        </code>
       </span>
      </a>
      option only
if the certificate-key file is encrypted. In all cases, the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      redacts the password from all logging and reporting output.
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        On Linux/BSD, if the private key in the x.509 file is encrypted and
you do not specify the
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsClusterPassword" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --tlsClusterPassword
          </code>
         </span>
        </a>
        option, MongoDB prompts for a
passphrase. See
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl/#std-label-ssl-certificate-password">
         TLS/SSL Certificate Passphrase
         <!-- -->
         .
        </a>
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        On macOS or Windows, if the private key in the x.509 file is
encrypted, you must explicitly specify the
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsClusterPassword" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --tlsClusterPassword
          </code>
         </span>
        </a>
        option.
Alternatively, you can either use a certificate from the secure
system store (see
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsClusterCertificateSelector" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --tlsClusterCertificateSelector
          </code>
         </span>
        </a>
        ) instead of a cluster PEM file or
use an unencrypted PEM file.
       </p>
      </li>
     </ul>
     <p class="leafygreen-ui-1kp3ins">
      For more information about TLS and MongoDB, see
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl/">
       Configure
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
       and
       <code class="leafygreen-ui-1l06pbn">
        mongos
       </code>
       for TLS/SSL
      </a>
      and
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl-clients/">
       TLS/SSL Configuration for Clients
      </a>
      .
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --tlsCAFile &lt;filename&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--tlsCAFile" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--tlsCAFile">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Specifies the
      <code class="file docutils literal">
       <span class="pre">
        .pem
       </span>
      </code>
      file that contains the root certificate chain
from the Certificate Authority. Specify the file name of the
      <code class="file docutils literal">
       <span class="pre">
        .pem
       </span>
      </code>
      file using relative or absolute paths.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      On macOS or Windows, you can use a certificate from
the operating system's secure store instead of a PEM key file. See
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsCertificateSelector" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsCertificateSelector
        </code>
       </span>
      </a>
      . When using the secure store, you
do not need to, but can, also specify the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsCAFile" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsCAFile
        </code>
        .
       </span>
      </a>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      For more information about TLS and MongoDB, see
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl/">
       Configure
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
       and
       <code class="leafygreen-ui-1l06pbn">
        mongos
       </code>
       for TLS/SSL
      </a>
      and
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl-clients/">
       TLS/SSL Configuration for Clients
      </a>
      .
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --tlsClusterCAFile &lt;filename&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--tlsClusterCAFile" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--tlsClusterCAFile">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Specifies the
      <code class="file docutils literal">
       <span class="pre">
        .pem
       </span>
      </code>
      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
      <code class="file docutils literal">
       <span class="pre">
        .pem
       </span>
      </code>
      file using relative or absolute paths.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      If
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsClusterCAFile" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsClusterCAFile
        </code>
       </span>
      </a>
      does not specify the
      <code class="file docutils literal">
       <span class="pre">
        .pem
       </span>
      </code>
      file for validating the
certificate from a client establishing a connection, the cluster uses
the
      <code class="file docutils literal">
       <span class="pre">
        .pem
       </span>
      </code>
      file specified in the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsCAFile" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsCAFile
        </code>
       </span>
      </a>
      option.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsClusterCAFile" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsClusterCAFile
        </code>
       </span>
      </a>
      lets you use separate Certificate Authorities to verify the
client to server and server to client portions of the TLS handshake.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      On macOS or Windows, you can use a certificate from
the operating system's secure store instead of a PEM key file. See
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsClusterCertificateSelector" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsClusterCertificateSelector
        </code>
       </span>
      </a>
      . When using the secure store, you
do not need to, but can, also specify the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsClusterCAFile" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsClusterCAFile
        </code>
        .
       </span>
      </a>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Requires that
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsCAFile" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsCAFile
        </code>
       </span>
      </a>
      is set.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      For more information about TLS and MongoDB, see
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl/">
       Configure
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
       and
       <code class="leafygreen-ui-1l06pbn">
        mongos
       </code>
       for TLS/SSL
      </a>
      and
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl-clients/">
       TLS/SSL Configuration for Clients
      </a>
      .
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --tlsCertificateSelector &lt;parameter&gt;=&lt;value&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--tlsCertificateSelector" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--tlsCertificateSelector">
      </div>
     </a>
    </dt>
    <dd>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        Available on Windows and macOS as an alternative to
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsCertificateKeyFile" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --tlsCertificateKeyFile
          </code>
          .
         </span>
        </a>
       </p>
       <p class="leafygreen-ui-1kp3ins">
        The
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsCertificateKeyFile" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --tlsCertificateKeyFile
          </code>
         </span>
        </a>
        and
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsCertificateSelector" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --tlsCertificateSelector
          </code>
         </span>
        </a>
        options are mutually exclusive. You can only
specify one.
       </p>
      </div>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      Specifies a certificate property in order to select a matching
certificate from the operating system's certificate store.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsCertificateSelector" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsCertificateSelector
        </code>
       </span>
      </a>
      accepts an argument of the format
      <code class="leafygreen-ui-1l06pbn">
       &lt;property&gt;=&lt;value&gt;
      </code>
      where the property can be one of the following:
     </p>
     <div class="leafygreen-ui-skkc39" tabindex="0">
      <table class="leafygreen-ui-hr8lsv">
       <thead class="leafygreen-ui-a9ho40">
        <tr data-testid="leafygreen-ui-header-row">
         <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Property
           </div>
          </div>
         </th>
         <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Value type
           </div>
          </div>
         </th>
         <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Description
           </div>
          </div>
         </th>
        </tr>
       </thead>
       <tbody>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             subject
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            ASCII string
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            Subject name or common name on certificate
           </div>
          </div>
         </td>
        </tr>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             thumbprint
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            hex string
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <p class="leafygreen-ui-1kp3ins">
             A sequence of bytes, expressed as hexadecimal, used to
identify a public key by its SHA-1 digest.
            </p>
            <p class="leafygreen-ui-1kp3ins">
             The
             <code class="leafygreen-ui-1l06pbn">
              thumbprint
             </code>
             is sometimes referred to as a
             <code class="leafygreen-ui-1l06pbn">
              fingerprint
             </code>
             .
            </p>
           </div>
          </div>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      When using the system SSL certificate store, OCSP (Online
Certificate Status Protocol) is used to validate the revocation
status of certificates.
     </p>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        You cannot use the
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/rotateCertificates/#mongodb-dbcommand-dbcmd.rotateCertificates">
         <code class="leafygreen-ui-1l06pbn">
          rotateCertificates
         </code>
        </a>
        command or the
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/method/db.rotateCertificates/#mongodb-method-db.rotateCertificates">
         <code class="leafygreen-ui-1l06pbn">
          db.rotateCertificates()
         </code>
        </a>
        shell method when using
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/configuration-options/#mongodb-setting-net.tls.certificateSelector">
         <code class="leafygreen-ui-1l06pbn">
          net.tls.certificateSelector
         </code>
        </a>
        or
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#std-option-mongod.--tlsCertificateSelector">
         <code class="leafygreen-ui-1l06pbn">
          --tlsCertificateSelector
         </code>
        </a>
        set to
        <code class="leafygreen-ui-1l06pbn">
         thumbprint
        </code>
       </p>
      </div>
     </div>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --tlsClusterCertificateSelector &lt;parameter&gt;=&lt;value&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--tlsClusterCertificateSelector" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--tlsClusterCertificateSelector">
      </div>
     </a>
    </dt>
    <dd>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        Available on Windows and macOS as an alternative to
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsClusterFile" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --tlsClusterFile
          </code>
          .
         </span>
        </a>
       </p>
       <p class="leafygreen-ui-1kp3ins">
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsClusterFile" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --tlsClusterFile
          </code>
         </span>
        </a>
        and
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsClusterCertificateSelector" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --tlsClusterCertificateSelector
          </code>
         </span>
        </a>
        options are mutually exclusive. You can only
specify one.
       </p>
      </div>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      Specifies a certificate property in order to select a matching
certificate from the operating system's certificate store to use for
internal authentication.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsClusterCertificateSelector" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsClusterCertificateSelector
        </code>
       </span>
      </a>
      accepts an argument of the format
      <code class="leafygreen-ui-1l06pbn">
       &lt;property&gt;=&lt;value&gt;
      </code>
      where the property can be one of the following:
     </p>
     <div class="leafygreen-ui-skkc39" tabindex="0">
      <table class="leafygreen-ui-hr8lsv">
       <thead class="leafygreen-ui-a9ho40">
        <tr data-testid="leafygreen-ui-header-row">
         <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Property
           </div>
          </div>
         </th>
         <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Value type
           </div>
          </div>
         </th>
         <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Description
           </div>
          </div>
         </th>
        </tr>
       </thead>
       <tbody>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             subject
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            ASCII string
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            Subject name or common name on certificate
           </div>
          </div>
         </td>
        </tr>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             thumbprint
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            hex string
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <p class="leafygreen-ui-1kp3ins">
             A sequence of bytes, expressed as hexadecimal, used to
identify a public key by its SHA-1 digest.
            </p>
            <p class="leafygreen-ui-1kp3ins">
             The
             <code class="leafygreen-ui-1l06pbn">
              thumbprint
             </code>
             is sometimes referred to as a
             <code class="leafygreen-ui-1l06pbn">
              fingerprint
             </code>
             .
            </p>
           </div>
          </div>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#mongodb-binary-bin.mongod">
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
      </a>
      /
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-binary-bin.mongos" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         mongos
        </code>
       </span>
      </a>
      logs a warning on
connection if the presented x.509 certificate expires within
      <code class="leafygreen-ui-1l06pbn">
       30
      </code>
      days of the
      <code class="leafygreen-ui-1l06pbn">
       mongod/mongos
      </code>
      host system time.
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --tlsCRLFile &lt;filename&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--tlsCRLFile" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--tlsCRLFile">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Specifies the
      <code class="file docutils literal">
       <span class="pre">
        .pem
       </span>
      </code>
      file that contains the Certificate Revocation
List. Specify the file name of the
      <code class="file docutils literal">
       <span class="pre">
        .pem
       </span>
      </code>
      file using relative or
absolute paths.
     </p>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <ul class="leafygreen-ui-rioki0">
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          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. To use the
system SSL certificate store, see
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsCertificateSelector" target="_self">
           <span>
            <code class="leafygreen-ui-1l06pbn">
             --tlsCertificateSelector
            </code>
            .
           </span>
          </a>
         </p>
        </li>
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          To check for certificate revocation,
MongoDB
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/parameters/#mongodb-parameter-param.ocspEnabled">
           <code class="leafygreen-ui-1l06pbn">
            enables
           </code>
          </a>
          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.
         </p>
        </li>
       </ul>
      </div>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      For more information about TLS and MongoDB, see
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl/">
       Configure
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
       and
       <code class="leafygreen-ui-1l06pbn">
        mongos
       </code>
       for TLS/SSL
      </a>
      and
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl-clients/">
       TLS/SSL Configuration for Clients
      </a>
      .
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --tlsAllowConnectionsWithoutCertificates
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--tlsAllowConnectionsWithoutCertificates" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--tlsAllowConnectionsWithoutCertificates">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      By default, the server bypasses client certificate validation unless
the server is configured to use a CA file. If a CA file is provided, the
following rules apply:
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        For clients that don't provide certificates,
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#mongodb-binary-bin.mongod">
         <code class="leafygreen-ui-1l06pbn">
          mongod
         </code>
        </a>
        or
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#mongodb-binary-bin.mongos" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           mongos
          </code>
         </span>
        </a>
        encrypts the TLS/SSL connection, assuming the
connection is successfully made.
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        For clients that present a certificate,
        <code class="leafygreen-ui-1l06pbn">
         mongos
        </code>
        performs
certificate validation using the root certificate chain specified by
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#std-option-mongod.--tlsCAFile">
         <code class="leafygreen-ui-1l06pbn">
          --tlsCAFile
         </code>
        </a>
        and reject clients with invalid
certificates.
       </p>
      </li>
     </ul>
     <p class="leafygreen-ui-1kp3ins">
      Use the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsAllowConnectionsWithoutCertificates" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsAllowConnectionsWithoutCertificates
        </code>
       </span>
      </a>
      option if you have
a mixed deployment that includes clients that do not or cannot present
certificates to the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      .
     </p>
     <p class="leafygreen-ui-1kp3ins">
      For more information about TLS and MongoDB, see
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl/">
       Configure
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
       and
       <code class="leafygreen-ui-1l06pbn">
        mongos
       </code>
       for TLS/SSL
      </a>
      and
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl-clients/">
       TLS/SSL Configuration for Clients
      </a>
      .
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --tlsAllowInvalidCertificates
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--tlsAllowInvalidCertificates" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--tlsAllowInvalidCertificates">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Bypasses the validation checks for TLS certificates on other
servers in the cluster and allows the use of invalid certificates to
connect.
     </p>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        If you specify
        <code class="leafygreen-ui-1l06pbn">
         --tlsAllowInvalidCertificates
        </code>
        or
        <code class="leafygreen-ui-1l06pbn">
         tls.allowInvalidCertificates:
true
        </code>
        when using x.509 authentication, an invalid certificate is
only sufficient to establish a TLS connection but is
        <em>
         insufficient
        </em>
        for authentication.
       </p>
      </div>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      When using
the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsAllowInvalidCertificates" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsAllowInvalidCertificates
        </code>
       </span>
      </a>
      setting, MongoDB
logs a warning regarding the use of the invalid certificate.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      For more information about TLS and MongoDB, see
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl/">
       Configure
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
       and
       <code class="leafygreen-ui-1l06pbn">
        mongos
       </code>
       for TLS/SSL
      </a>
      and
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl-clients/">
       TLS/SSL Configuration for Clients
      </a>
      .
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --tlsAllowInvalidHostnames
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--tlsAllowInvalidHostnames" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--tlsAllowInvalidHostnames">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      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
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      to connect
to other members if the hostnames in their certificates do not match
their configured hostname.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      For more information about TLS and MongoDB, see
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl/">
       Configure
       <code class="leafygreen-ui-1l06pbn">
        mongod
       </code>
       and
       <code class="leafygreen-ui-1l06pbn">
        mongos
       </code>
       for TLS/SSL
      </a>
      and
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl-clients/">
       TLS/SSL Configuration for Clients
      </a>
      .
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --tlsDisabledProtocols &lt;protocol(s)&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--tlsDisabledProtocols" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--tlsDisabledProtocols">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      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.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsDisabledProtocols" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsDisabledProtocols
        </code>
       </span>
      </a>
      recognizes the following protocols:
      <code class="leafygreen-ui-1l06pbn">
       TLS1_0
      </code>
      ,
      <code class="leafygreen-ui-1l06pbn">
       TLS1_1
      </code>
      ,
      <code class="leafygreen-ui-1l06pbn">
       TLS1_2
      </code>
      , and
      <code class="leafygreen-ui-1l06pbn">
       TLS1_3
      </code>
      .
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        On macOS, you cannot disable
        <code class="leafygreen-ui-1l06pbn">
         TLS1_1
        </code>
        and leave both
        <code class="leafygreen-ui-1l06pbn">
         TLS1_0
        </code>
        and
        <code class="leafygreen-ui-1l06pbn">
         TLS1_2
        </code>
        enabled. You must disable at least one of the other
two, for example,
        <code class="leafygreen-ui-1l06pbn">
         TLS1_0,TLS1_1
        </code>
        .
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        To list multiple protocols, specify as a comma separated list of
protocols. For example
        <code class="leafygreen-ui-1l06pbn">
         TLS1_0,TLS1_1
        </code>
        .
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        Specifying an unrecognized protocol prevents the server from
starting.
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        The specified disabled protocols overrides any default disabled
protocols.
       </p>
      </li>
     </ul>
     <p class="leafygreen-ui-1kp3ins">
      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
      <code class="leafygreen-ui-1l06pbn">
       none
      </code>
      to
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsDisabledProtocols" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsDisabledProtocols
        </code>
        .
       </span>
      </a>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Members of replica sets and sharded clusters must speak at least one
protocol in common.
     </p>
     <div class="leafygreen-ui-13vw3ie" role="note">
      <h2 class="leafygreen-ui-1fn4p2b">
       Tip
      </h2>
      <h3 class="leafygreen-ui-144d5kf">
       <strong>
        See also:
       </strong>
      </h3>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-ssl/#std-label-ssl-disallow-protocols">
         Disallow Protocols
        </a>
       </p>
      </div>
     </div>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --tlsFIPSMode
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--tlsFIPSMode" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--tlsFIPSMode">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Directs the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      to use the FIPS mode of the  TLS
library. Your system must have a FIPS
compliant library to use the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--tlsFIPSMode" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --tlsFIPSMode
        </code>
       </span>
      </a>
      option.
     </p>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        FIPS-compatible TLS/SSL is
available only in
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="http://www.mongodb.com/products/mongodb-enterprise-advanced?tck=docs_server" target="_self">
         <span>
          MongoDB Enterprise
         </span>
        </a>
        . See
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/tutorial/configure-fips/">
         Configure MongoDB for FIPS
        </a>
        for more information.
       </p>
      </div>
     </div>
    </dd>
   </dl>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Audit Options
    <a class="headerlink leafygreen-ui-1kepx47" href="#audit-options" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="audit-options">
     </div>
    </a>
   </h3>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --auditCompressionMode
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--auditCompressionMode" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--auditCompressionMode">
      </div>
     </a>
    </dt>
    <dd>
     <div>
      <p>
       <em>
        New
        <!-- -->
        in version
        <!-- -->
        5.3
       </em>
       .
      </p>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      Specifies the compression mode for
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/security-encryption-at-rest/#std-label-security-encryption-at-rest-audit-log">
       audit log encryption
      </a>
      . You must also enable audit log
encryption using either
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--auditEncryptionKeyUID" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --auditEncryptionKeyUID
        </code>
       </span>
      </a>
      or
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--auditLocalKeyFile" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --auditLocalKeyFile
        </code>
       </span>
      </a>
      .
     </p>
     <p class="leafygreen-ui-1kp3ins">
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--auditCompressionMode" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --auditCompressionMode
        </code>
       </span>
      </a>
      can be set to one of these values:
     </p>
     <div class="leafygreen-ui-skkc39" tabindex="0">
      <table class="leafygreen-ui-hr8lsv">
       <colgroup>
        <col style="width:15%"/>
        <col style="width:50%"/>
       </colgroup>
       <thead class="leafygreen-ui-a9ho40">
        <tr data-testid="leafygreen-ui-header-row">
         <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Value
           </div>
          </div>
         </th>
         <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Description
           </div>
          </div>
         </th>
        </tr>
       </thead>
       <tbody>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             zstd
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            Use the
            <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/glossary/#std-term-zstd">
             zstd
            </a>
            algorithm to compress the audit log.
           </div>
          </div>
         </td>
        </tr>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             none
            </code>
            <em>
             (default)
            </em>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            Do not compress the audit log.
           </div>
          </div>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        Available only in
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="http://www.mongodb.com/products/mongodb-enterprise-advanced?tck=docs_server" target="_self">
         <span>
          MongoDB Enterprise
         </span>
        </a>
        .
MongoDB Enterprise and Atlas have different configuration
requirements.
       </p>
      </div>
     </div>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --auditDestination
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--auditDestination" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--auditDestination">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Enables
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/auditing/#std-label-auditing">
       auditing
      </a>
      and specifies where
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      sends all audit events.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--auditDestination" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --auditDestination
        </code>
       </span>
      </a>
      can have one of the following values:
     </p>
     <div class="leafygreen-ui-skkc39" tabindex="0">
      <table class="leafygreen-ui-hr8lsv">
       <colgroup>
        <col style="width:15%"/>
        <col style="width:50%"/>
       </colgroup>
       <thead class="leafygreen-ui-a9ho40">
        <tr data-testid="leafygreen-ui-header-row">
         <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Value
           </div>
          </div>
         </th>
         <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Description
           </div>
          </div>
         </th>
        </tr>
       </thead>
       <tbody>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             syslog
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <p class="leafygreen-ui-1kp3ins">
             Output the audit events to syslog in JSON format. Not available on
Windows. Audit messages have a syslog severity level of
             <code class="leafygreen-ui-1l06pbn">
              info
             </code>
             and a facility level of
             <code class="leafygreen-ui-1l06pbn">
              user
             </code>
             .
            </p>
            <p class="leafygreen-ui-1kp3ins">
             The syslog message limit can result in the truncation of
audit messages. The auditing system neither detects the
truncation nor errors upon its occurrence.
            </p>
           </div>
          </div>
         </td>
        </tr>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             console
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            Output the audit events to
            <code class="leafygreen-ui-1l06pbn">
             stdout
            </code>
            in JSON format.
           </div>
          </div>
         </td>
        </tr>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             file
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            Output the audit events to the file specified in
            <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--auditPath" target="_self">
             <span>
              <code class="leafygreen-ui-1l06pbn">
               --auditPath
              </code>
             </span>
            </a>
            in the format specified in
            <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--auditFormat" target="_self">
             <span>
              <code class="leafygreen-ui-1l06pbn">
               --auditFormat
              </code>
              .
             </span>
            </a>
           </div>
          </div>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        Available only in
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="http://www.mongodb.com/products/mongodb-enterprise-advanced?tck=docs_server" target="_self">
         <span>
          MongoDB Enterprise
         </span>
        </a>
        and
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://cloud.mongodb.com/user#/atlas/login" target="_self">
         <span>
          MongoDB Atlas
         </span>
        </a>
        .
       </p>
      </div>
     </div>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --auditEncryptionKeyUID
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--auditEncryptionKeyUID" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--auditEncryptionKeyUID">
      </div>
     </a>
    </dt>
    <dd>
     <div>
      <p>
       <em>
        New
        <!-- -->
        in version
        <!-- -->
        6.0
       </em>
       .
      </p>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      Specifies the unique identifier of the Key Management
Interoperability Protocol (KMIP) key for
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/security-encryption-at-rest/#std-label-security-encryption-at-rest-audit-log">
       audit log encryption
       <!-- -->
       .
      </a>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      You cannot use
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--auditEncryptionKeyUID" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --auditEncryptionKeyUID
        </code>
       </span>
      </a>
      and
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--auditLocalKeyFile" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --auditLocalKeyFile
        </code>
       </span>
      </a>
      together.
     </p>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        Available only in
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="http://www.mongodb.com/products/mongodb-enterprise-advanced?tck=docs_server" target="_self">
         <span>
          MongoDB Enterprise
         </span>
        </a>
        .
MongoDB Enterprise and Atlas have different configuration
requirements.
       </p>
      </div>
     </div>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --auditFormat
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--auditFormat" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--auditFormat">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Specifies the format of the output file for
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/auditing/">
       auditing
      </a>
      if
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--auditDestination" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --auditDestination
        </code>
       </span>
      </a>
      is
      <code class="leafygreen-ui-1l06pbn">
       file
      </code>
      . The
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--auditFormat" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --auditFormat
        </code>
       </span>
      </a>
      option can have one of the following values:
     </p>
     <div class="leafygreen-ui-skkc39" tabindex="0">
      <table class="leafygreen-ui-hr8lsv">
       <colgroup>
        <col style="width:15%"/>
        <col style="width:50%"/>
       </colgroup>
       <thead class="leafygreen-ui-a9ho40">
        <tr data-testid="leafygreen-ui-header-row">
         <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Value
           </div>
          </div>
         </th>
         <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Description
           </div>
          </div>
         </th>
        </tr>
       </thead>
       <tbody>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             JSON
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            Output the audit events in JSON format to the file specified
in
            <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--auditPath" target="_self">
             <span>
              <code class="leafygreen-ui-1l06pbn">
               --auditPath
              </code>
              .
             </span>
            </a>
           </div>
          </div>
         </td>
        </tr>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             BSON
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            Output the audit events in BSON binary format to the file
specified in
            <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--auditPath" target="_self">
             <span>
              <code class="leafygreen-ui-1l06pbn">
               --auditPath
              </code>
              .
             </span>
            </a>
           </div>
          </div>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      Printing audit events to a file in JSON format degrades server
performance more than printing to a file in BSON format.
     </p>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        Available only in
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="http://www.mongodb.com/products/mongodb-enterprise-advanced?tck=docs_server" target="_self">
         <span>
          MongoDB Enterprise
         </span>
        </a>
        and
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://cloud.mongodb.com/user#/atlas/login" target="_self">
         <span>
          MongoDB Atlas
         </span>
        </a>
        .
       </p>
      </div>
     </div>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --auditLocalKeyFile
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--auditLocalKeyFile" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--auditLocalKeyFile">
      </div>
     </a>
    </dt>
    <dd>
     <div>
      <p>
       <em>
        New
        <!-- -->
        in version
        <!-- -->
        5.3
       </em>
       .
      </p>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      Specifies the path and file name for a local audit key file for
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/security-encryption-at-rest/#std-label-security-encryption-at-rest-audit-log">
       audit log encryption
       <!-- -->
       .
      </a>
     </p>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        Only use
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--auditLocalKeyFile" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --auditLocalKeyFile
          </code>
         </span>
        </a>
        for testing because the key is
not secured. To secure the key, use
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--auditEncryptionKeyUID" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --auditEncryptionKeyUID
          </code>
         </span>
        </a>
        and an external Key
Management Interoperability Protocol (KMIP) server.
       </p>
      </div>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      You cannot use
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--auditLocalKeyFile" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --auditLocalKeyFile
        </code>
       </span>
      </a>
      and
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--auditEncryptionKeyUID" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --auditEncryptionKeyUID
        </code>
       </span>
      </a>
      together.
     </p>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        Available only in
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="http://www.mongodb.com/products/mongodb-enterprise-advanced?tck=docs_server" target="_self">
         <span>
          MongoDB Enterprise
         </span>
        </a>
        .
MongoDB Enterprise and Atlas have different configuration
requirements.
       </p>
      </div>
     </div>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --auditPath
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--auditPath" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--auditPath">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Specifies the output file for auditing if
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--auditDestination" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --auditDestination
        </code>
       </span>
      </a>
      has value of
      <code class="leafygreen-ui-1l06pbn">
       file
      </code>
      . The
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--auditPath" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --auditPath
        </code>
       </span>
      </a>
      option can take either a full path name or a
relative path name.
     </p>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        Available only in
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="http://www.mongodb.com/products/mongodb-enterprise-advanced?tck=docs_server" target="_self">
         <span>
          MongoDB Enterprise
         </span>
        </a>
        and
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://cloud.mongodb.com/user#/atlas/login" target="_self">
         <span>
          MongoDB Atlas
         </span>
        </a>
        .
       </p>
      </div>
     </div>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --auditFilter
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--auditFilter" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--auditFilter">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Specifies the filter to limit the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/audit-message/mongo/#std-label-audit-action-details-results">
       types of operations
      </a>
      the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/auditing/">
       audit system
      </a>
      records. The option takes a string representation
of a query document of the form:
     </p>
     <script class="structured_data" type="application/ld+json">
      {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"{ &lt;field1&gt;: &lt;expression1&gt;, ... }","programmingLanguage":"JavaScript"}
     </script>
     <div class="css-16lmvu9">
      <div class="leafygreen-ui-196mwvg">
       <div class="leafygreen-ui-yzcs8i">
        <pre class="leafygreen-ui-1q4bxgx" tabindex="-1"><code class="lg-highlight-hljs-light javascript leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx">{ &lt;<!-- -->field1<!-- -->&gt;<!-- -->: &lt;<!-- -->expression1<!-- -->&gt;<!-- -->,<!-- --> <!-- -->...<!-- --> }</td></tr></tbody></table></code></pre>
        <div class="leafygreen-ui-1bqcprk" data-testid="leafygreen-code-panel">
         <button aria-disabled="false" aria-label="Copy" class="leafygreen-ui-1c6zwke" data-testid="code_copy-button" tabindex="0">
          <div class="leafygreen-ui-xhlipt">
           <svg aria-label="Copy Icon" class="leafygreen-ui-1st74h4" height="16" role="img" viewbox="0 0 16 16" width="16">
            <path clip-rule="evenodd" d="M1 5.71428V10.2857C1 11.2325 1.76751 12 2.71429 12H5.75V7.10957C5.75 6.54414 5.97724 6.00244 6.38065 5.60623L8.67403 3.35381C8.77447 3.25516 8.88376 3.16757 9 3.09182V2.71429C9 1.76751 8.23249 1 7.28571 1H5.8V4.42857C5.8 5.13865 5.22437 5.71428 4.51429 5.71428H1ZM9 4.78571L7.25654 6.49804C7.24689 6.50752 7.23749 6.5172 7.22834 6.52708C7.22208 6.53383 7.21594 6.54068 7.20991 6.54762C7.07504 6.70295 7 6.90234 7 7.10957V7.79762H9H10.0095C10.4829 7.79762 10.8667 7.41386 10.8667 6.94047V4H10.1505C9.92587 4 9.7102 4.0882 9.54992 4.24562L9 4.78571ZM4.86667 1H4.15053C3.92587 1 3.7102 1.0882 3.54992 1.24562L1.25654 3.49804C1.09244 3.65921 1 3.87957 1 4.10957V4.79762H4.00952C4.48291 4.79762 4.86667 4.41386 4.86667 3.94047V1ZM7 12V8.71428H9H10.5143C11.2244 8.71428 11.8 8.13865 11.8 7.42857V4H13.2857C14.2325 4 15 4.76751 15 5.71429V13.2857C15 14.2325 14.2325 15 13.2857 15H8.71429C7.76751 15 7 14.2325 7 13.2857V12Z" fill="currentColor" fill-rule="evenodd">
            </path>
           </svg>
          </div>
         </button>
        </div>
       </div>
      </div>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      The
      <code class="leafygreen-ui-1l06pbn">
       &lt;field&gt;
      </code>
      can be
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/audit-message/">
       any field in the audit message
      </a>
      , including fields returned in the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/audit-message/mongo/#std-label-audit-action-details-results">
       param
      </a>
      document. The
      <code class="leafygreen-ui-1l06pbn">
       &lt;expression&gt;
      </code>
      is a
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/operator/query/#std-label-query-selectors">
       query condition expression
       <!-- -->
       .
      </a>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      To specify an audit filter, enclose the filter document in single
quotes to pass the document as a string.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      To specify the audit filter in a
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/configuration-options/#std-label-configuration-options">
       configuration file
      </a>
      , you must use the YAML format
of the configuration file.
     </p>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        Available only in
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="http://www.mongodb.com/products/mongodb-enterprise-advanced?tck=docs_server" target="_self">
         <span>
          MongoDB Enterprise
         </span>
        </a>
        and
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://cloud.mongodb.com/user#/atlas/login" target="_self">
         <span>
          MongoDB Atlas
         </span>
        </a>
        .
       </p>
      </div>
     </div>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --auditSchema
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--auditSchema" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--auditSchema">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Type
      </em>
      : string
     </p>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      :
      <code class="leafygreen-ui-1l06pbn">
       mongo
      </code>
     </p>
     <div>
      <p>
       <em>
        New
        <!-- -->
        in version
        <!-- -->
        8.0
       </em>
       .
      </p>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      Specifies the format used for audit logs. You can specify one of the
following values for
      <code class="leafygreen-ui-1l06pbn">
       --auditSchema
      </code>
      :
     </p>
     <div class="leafygreen-ui-skkc39" tabindex="0">
      <table class="leafygreen-ui-hr8lsv">
       <colgroup>
        <col style="width:10%"/>
        <col style="width:20%"/>
       </colgroup>
       <thead class="leafygreen-ui-a9ho40">
        <tr data-testid="leafygreen-ui-header-row">
         <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Value
           </div>
          </div>
         </th>
         <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Description
           </div>
          </div>
         </th>
        </tr>
       </thead>
       <tbody>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             mongo
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <p class="leafygreen-ui-1kp3ins">
             Logs are written in a format designed by MongoDB.
            </p>
            <p class="leafygreen-ui-1kp3ins">
             For example log messages, see
             <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/audit-message/mongo/#std-label-event-audit-messages-mongo">
              mongo Schema Audit Messages
              <!-- -->
              .
             </a>
            </p>
           </div>
          </div>
         </td>
        </tr>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             OCSF
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <p class="leafygreen-ui-1kp3ins">
             Logs are written in
             <span class="leafygreen-ui-vm4wms" tabindex="0">
              OCSF
             </span>
             format. This option provides logs in a standardized
format compatible with log processors.
            </p>
            <p class="leafygreen-ui-1kp3ins">
             For example log messages, see
             <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/audit-message/ocsf/#std-label-event-audit-messages-ocsf">
              OCSF Schema Audit Messages
              <!-- -->
              .
             </a>
            </p>
           </div>
          </div>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
    </dd>
   </dl>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Profiler Options
    <a class="headerlink leafygreen-ui-1kepx47" href="#profiler-options" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="profiler-options">
     </div>
    </a>
   </h3>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --slowms &lt;integer&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--slowms" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--slowms">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      : 100
     </p>
     <p class="leafygreen-ui-1kp3ins">
      The
      <em>
       slow
      </em>
      operation time threshold, in milliseconds. Operations
that run for longer than this threshold are considered
      <em>
       slow
      </em>
      .
     </p>
     <p class="leafygreen-ui-1kp3ins">
      When
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/parameters/#mongodb-parameter-param.logLevel">
       <code class="leafygreen-ui-1l06pbn">
        logLevel
       </code>
      </a>
      is set to
      <code class="leafygreen-ui-1l06pbn">
       0
      </code>
      , MongoDB records
      <em>
       slow
      </em>
      operations to the diagnostic log at a rate determined by
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/configuration-options/#mongodb-setting-operationProfiling.slowOpSampleRate">
       <code class="leafygreen-ui-1l06pbn">
        slowOpSampleRate
       </code>
       .
      </a>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      At higher
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/parameters/#mongodb-parameter-param.logLevel">
       <code class="leafygreen-ui-1l06pbn">
        logLevel
       </code>
      </a>
      settings, all operations appear
in the diagnostic log regardless of their latency.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      For
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      instances,  affects the diagnostic
log only and not the profiler since profiling is not available on
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      .
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --slowOpSampleRate &lt;double&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--slowOpSampleRate" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--slowOpSampleRate">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      : 1.0
     </p>
     <p class="leafygreen-ui-1kp3ins">
      The fraction of
      <em>
       slow
      </em>
      operations that should be logged.
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--slowOpSampleRate" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --slowOpSampleRate
        </code>
       </span>
      </a>
      accepts values between 0 and 1, inclusive.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      For
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      instances,
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--slowOpSampleRate" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --slowOpSampleRate
        </code>
       </span>
      </a>
      affects the diagnostic log
only and not the profiler since profiling is not available on
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      .
     </p>
    </dd>
   </dl>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    LDAP Authentication and Authorization Options
    <a class="headerlink leafygreen-ui-1kepx47" href="#ldap-authentication-and-authorization-options" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="ldap-authentication-and-authorization-options">
     </div>
    </a>
   </h3>
   <div class="leafygreen-ui-15mdk4" role="note">
    <h2 class="leafygreen-ui-6n7b7d">
     Note
    </h2>
    <div class="leafygreen-ui-9mycqc">
     <p class="leafygreen-ui-1kp3ins">
      Starting in MongoDB 8.0, LDAP authentication and authorization is
deprecated. LDAP is available and will continue to operate without
changes throughout the lifetime of MongoDB 8. LDAP will be removed in a
future major release.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      For details, see
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/LDAP-deprecation/#std-label-ldap-deprecation">
       LDAP Deprecation
       <!-- -->
       .
      </a>
     </p>
    </div>
   </div>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --ldapServers &lt;host1&gt;:&lt;port&gt;,&lt;host2&gt;:&lt;port&gt;,...,&lt;hostN&gt;:&lt;port&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--ldapServers" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--ldapServers">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Available in MongoDB Enterprise only.
      </em>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      The LDAP server against which the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      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.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      If your LDAP infrastructure partitions the LDAP directory over multiple LDAP
servers, specify
      <em>
       one
      </em>
      LDAP server or any of its replicated instances to
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapServers" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapServers
        </code>
       </span>
      </a>
      . MongoDB supports following LDAP referrals as defined in
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://www.rfc-editor.org/rfc/rfc4511.txt" rel="noopener noreferrer">
       <span>
        RFC 4511
4.1.10
       </span>
       <svg alt="" aria-hidden="true" class="leafygreen-ui-1ie5kuq" height="16" role="presentation" viewbox="0 0 16 16" width="16">
        <path d="M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z" fill="currentColor">
        </path>
        <path d="M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z" fill="currentColor">
        </path>
       </svg>
      </a>
      . Do not use
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapServers" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapServers
        </code>
       </span>
      </a>
      for listing every LDAP server in your infrastructure.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      This setting can be configured on a running
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      using
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/setParameter/#mongodb-dbcommand-dbcmd.setParameter">
       <code class="leafygreen-ui-1l06pbn">
        setParameter
       </code>
       .
      </a>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      If unset,
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      cannot use
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/security-ldap/">
       LDAP authentication or authorization
       <!-- -->
       .
      </a>
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --ldapValidateLDAPServerConfig &lt;boolean&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--ldapValidateLDAPServerConfig" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--ldapValidateLDAPServerConfig">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Available in MongoDB Enterprise
      </em>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      A flag that determines if the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      instance checks
the availability of the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapServers" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         LDAP server(s)
        </code>
       </span>
      </a>
      as part of its startup:
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        If
        <code class="leafygreen-ui-1l06pbn">
         true
        </code>
        , the
        <code class="leafygreen-ui-1l06pbn">
         mongos
        </code>
        instance performs the
availability check and only continues to start up if the LDAP
server is available.
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        If
        <code class="leafygreen-ui-1l06pbn">
         false
        </code>
        , the
        <code class="leafygreen-ui-1l06pbn">
         mongos
        </code>
        instance skips the
availability check; i.e. the instance starts up even if the LDAP
server is unavailable.
       </p>
      </li>
     </ul>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --ldapQueryUser &lt;string&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--ldapQueryUser" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--ldapQueryUser">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Available in MongoDB Enterprise only.
      </em>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      The identity with which
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      binds as, when connecting to or
performing queries on an LDAP server.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Only required if any of the following are true:
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        Using
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/security-ldap-external/#std-label-security-ldap-external">
         LDAP authorization
         <!-- -->
         .
        </a>
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        Using an LDAP query for
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapUserToDNMapping" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           username transformation
          </code>
          .
         </span>
        </a>
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        The LDAP server disallows anonymous binds
       </p>
      </li>
     </ul>
     <p class="leafygreen-ui-1kp3ins">
      You must use
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapQueryUser" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapQueryUser
        </code>
       </span>
      </a>
      with
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapQueryPassword" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapQueryPassword
        </code>
        .
       </span>
      </a>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      If unset,
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      doesn't attempt to bind to the LDAP server.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      This setting can be configured on a running
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      using
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/setParameter/#mongodb-dbcommand-dbcmd.setParameter">
       <code class="leafygreen-ui-1l06pbn">
        setParameter
       </code>
       .
      </a>
     </p>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        Windows MongoDB deployments can use
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapBindWithOSDefaults" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --ldapBindWithOSDefaults
          </code>
         </span>
        </a>
        instead of
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapQueryUser" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --ldapQueryUser
          </code>
         </span>
        </a>
        and
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapQueryPassword" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --ldapQueryPassword
          </code>
         </span>
        </a>
        . You cannot specify
both
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapQueryUser" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --ldapQueryUser
          </code>
         </span>
        </a>
        and
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapBindWithOSDefaults" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --ldapBindWithOSDefaults
          </code>
         </span>
        </a>
        at the same time.
       </p>
      </div>
     </div>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --ldapQueryPassword &lt;string&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--ldapQueryPassword" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--ldapQueryPassword">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Available in MongoDB Enterprise only.
      </em>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      The password used to bind to an LDAP server when using
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapQueryUser" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapQueryUser
        </code>
       </span>
      </a>
      . You must use
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapQueryPassword" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapQueryPassword
        </code>
       </span>
      </a>
      with
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapQueryUser" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapQueryUser
        </code>
        .
       </span>
      </a>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      If unset,
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      doesn't attempt to bind to the LDAP server.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      This setting can be configured on a running
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      using
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/setParameter/#mongodb-dbcommand-dbcmd.setParameter">
       <code class="leafygreen-ui-1l06pbn">
        setParameter
       </code>
       .
      </a>
     </p>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        Windows MongoDB deployments can use
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapBindWithOSDefaults" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --ldapBindWithOSDefaults
          </code>
         </span>
        </a>
        instead of
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapQueryPassword" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --ldapQueryPassword
          </code>
         </span>
        </a>
        and
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapQueryPassword" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --ldapQueryPassword
          </code>
         </span>
        </a>
        . You cannot specify
both
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapQueryPassword" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --ldapQueryPassword
          </code>
         </span>
        </a>
        and
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapBindWithOSDefaults" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --ldapBindWithOSDefaults
          </code>
         </span>
        </a>
        at the same time.
       </p>
      </div>
     </div>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --ldapBindWithOSDefaults &lt;bool&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--ldapBindWithOSDefaults" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--ldapBindWithOSDefaults">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      : false
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Available in MongoDB Enterprise for the Windows platform only.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Allows
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      to authenticate, or bind, using your Windows login
credentials when connecting to the LDAP server.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Only required if:
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        Using
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/security-ldap-external/#std-label-security-ldap-external">
         LDAP authorization
         <!-- -->
         .
        </a>
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        Using an LDAP query for
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapUserToDNMapping" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           username transformation
          </code>
          .
         </span>
        </a>
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        The LDAP server disallows anonymous binds
       </p>
      </li>
     </ul>
     <p class="leafygreen-ui-1kp3ins">
      Use
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapBindWithOSDefaults" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapBindWithOSDefaults
        </code>
       </span>
      </a>
      to replace
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapQueryUser" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapQueryUser
        </code>
       </span>
      </a>
      and
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapQueryPassword" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapQueryPassword
        </code>
        .
       </span>
      </a>
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --ldapBindMethod &lt;string&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--ldapBindMethod" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--ldapBindMethod">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      : simple
     </p>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Available in MongoDB Enterprise only.
      </em>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      The method
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      uses to authenticate to an LDAP server.
Use with
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapQueryUser" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapQueryUser
        </code>
       </span>
      </a>
      and
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapQueryPassword" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapQueryPassword
        </code>
       </span>
      </a>
      to
connect to the LDAP server.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapBindMethod" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapBindMethod
        </code>
       </span>
      </a>
      supports the following values:
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        <code class="leafygreen-ui-1l06pbn">
         simple
        </code>
        -
        <code class="leafygreen-ui-1l06pbn">
         mongos
        </code>
        uses simple authentication.
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        <code class="leafygreen-ui-1l06pbn">
         sasl
        </code>
        -
        <code class="leafygreen-ui-1l06pbn">
         mongos
        </code>
        uses SASL protocol for authentication
       </p>
      </li>
     </ul>
     <p class="leafygreen-ui-1kp3ins">
      If you specify
      <code class="leafygreen-ui-1l06pbn">
       sasl
      </code>
      , you can configure the available SASL mechanisms
using
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapBindSaslMechanisms" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapBindSaslMechanisms
        </code>
       </span>
      </a>
      .
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      defaults to
using
      <code class="leafygreen-ui-1l06pbn">
       DIGEST-MD5
      </code>
      mechanism.
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --ldapBindSaslMechanisms &lt;string&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--ldapBindSaslMechanisms" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--ldapBindSaslMechanisms">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      : DIGEST-MD5
     </p>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Available in MongoDB Enterprise only.
      </em>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      A comma-separated list of SASL mechanisms
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      can
use when authenticating to the LDAP server. The
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      and the
LDAP server must agree on at least one mechanism. The
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      dynamically loads any SASL mechanism libraries installed on the host
machine at runtime.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Install and configure the appropriate libraries for the selected
SASL mechanism(s) on both the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      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.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      If using the
      <code class="leafygreen-ui-1l06pbn">
       GSSAPI
      </code>
      SASL mechanism for use with
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/kerberos/#std-label-security-kerberos">
       Kerberos Authentication on Self-Managed Deployments
      </a>
      , verify the following for the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      host machine:
     </p>
     <dl>
      <dt>
       <code class="leafygreen-ui-1l06pbn">
        Linux
       </code>
      </dt>
      <dd class="css-1ufxuu7">
       <ul class="leafygreen-ui-rioki0">
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          The
          <code class="leafygreen-ui-1l06pbn">
           KRB5_CLIENT_KTNAME
          </code>
          environment
variable resolves to the name of the client
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/kerberos/#std-label-keytab-files">
           Linux Keytab Files
          </a>
          for the host machine. For more on Kerberos environment
variables, please defer to the
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://web.mit.edu/kerberos/krb5-1.13/doc/admin/env_variables.html" rel="noopener noreferrer">
           <span>
            Kerberos documentation
            <!-- -->
            .
           </span>
           <svg alt="" aria-hidden="true" class="leafygreen-ui-1ie5kuq" height="16" role="presentation" viewbox="0 0 16 16" width="16">
            <path d="M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z" fill="currentColor">
            </path>
            <path d="M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z" fill="currentColor">
            </path>
           </svg>
          </a>
         </p>
        </li>
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          The client keytab includes a
          <a class="leafygreen-ui-tqgtui" href="/docs/manual/core/kerberos/#std-label-kerberos-user-principal">
           User Principal
          </a>
          for the
          <code class="leafygreen-ui-1l06pbn">
           mongos
          </code>
          to use when
connecting to the LDAP server and execute LDAP queries.
         </p>
        </li>
       </ul>
      </dd>
      <dt>
       <code class="leafygreen-ui-1l06pbn">
        Windows
       </code>
      </dt>
      <dd class="css-1ufxuu7">
       If connecting to an Active Directory server, the Windows
Kerberos configuration automatically generates a
       <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa380510(v=vs.85).aspx" rel="noopener noreferrer">
        <span>
         Ticket-Granting-Ticket
        </span>
        <svg alt="" aria-hidden="true" class="leafygreen-ui-1ie5kuq" height="16" role="presentation" viewbox="0 0 16 16" width="16">
         <path d="M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z" fill="currentColor">
         </path>
         <path d="M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z" fill="currentColor">
         </path>
        </svg>
       </a>
       when the user logs onto the system. Set
       <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapBindWithOSDefaults" target="_self">
        <span>
         <code class="leafygreen-ui-1l06pbn">
          --ldapBindWithOSDefaults
         </code>
        </span>
       </a>
       to
       <code class="leafygreen-ui-1l06pbn">
        true
       </code>
       to allow
       <code class="leafygreen-ui-1l06pbn">
        mongos
       </code>
       to use the generated credentials when
connecting to the Active Directory server and execute queries.
      </dd>
     </dl>
     <p class="leafygreen-ui-1kp3ins">
      Set
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapBindMethod" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapBindMethod
        </code>
       </span>
      </a>
      to
      <code class="leafygreen-ui-1l06pbn">
       sasl
      </code>
      to use this option.
     </p>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        For a complete list of SASL mechanisms see the
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="http://www.iana.org/assignments/sasl-mechanisms/sasl-mechanisms.xhtml" rel="noopener noreferrer">
         <span>
          IANA listing
         </span>
         <svg alt="" aria-hidden="true" class="leafygreen-ui-1ie5kuq" height="16" role="presentation" viewbox="0 0 16 16" width="16">
          <path d="M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z" fill="currentColor">
          </path>
          <path d="M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z" fill="currentColor">
          </path>
         </svg>
        </a>
        .
Defer to the documentation for your LDAP or Active Directory
service for identifying the SASL mechanisms compatible with the
service.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        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.
       </p>
       <p class="leafygreen-ui-1kp3ins">
        For more information on SASL, defer to the following resources:
       </p>
       <ul class="leafygreen-ui-rioki0">
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          For Linux, please see the
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://www.cyrusimap.org/sasl/" rel="noopener noreferrer">
           <span>
            Cyrus SASL documentation
            <!-- -->
            .
           </span>
           <svg alt="" aria-hidden="true" class="leafygreen-ui-1ie5kuq" height="16" role="presentation" viewbox="0 0 16 16" width="16">
            <path d="M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z" fill="currentColor">
            </path>
            <path d="M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z" fill="currentColor">
            </path>
           </svg>
          </a>
         </p>
        </li>
        <li class="leafygreen-ui-d7p7b6">
         <p class="leafygreen-ui-1kp3ins">
          For Windows, please see the
          <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://msdn.microsoft.com/en-us/library/cc223500.aspx" rel="noopener noreferrer">
           <span>
            Windows SASL documentation
            <!-- -->
            .
           </span>
           <svg alt="" aria-hidden="true" class="leafygreen-ui-1ie5kuq" height="16" role="presentation" viewbox="0 0 16 16" width="16">
            <path d="M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z" fill="currentColor">
            </path>
            <path d="M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z" fill="currentColor">
            </path>
           </svg>
          </a>
         </p>
        </li>
       </ul>
      </div>
     </div>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --ldapTransportSecurity &lt;string&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--ldapTransportSecurity" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--ldapTransportSecurity">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      : tls
     </p>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Available in MongoDB Enterprise only.
      </em>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      By default,
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      creates a TLS/SSL secured connection to the LDAP
server.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      For Linux deployments, you must configure the appropriate TLS Options in
      <code class="leafygreen-ui-1l06pbn">
       /etc/openldap/ldap.conf
      </code>
      file. Your operating system's package manager
creates this file as part of the MongoDB Enterprise installation, via the
      <code class="leafygreen-ui-1l06pbn">
       libldap
      </code>
      dependency. See the documentation for
      <code class="leafygreen-ui-1l06pbn">
       TLS Options
      </code>
      in the
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="http://www.openldap.org/software/man.cgi?query=ldap.conf&amp;manpath=OpenLDAP+2.4-Release" rel="noopener noreferrer">
       <span>
        ldap.conf OpenLDAP documentation
       </span>
       <svg alt="" aria-hidden="true" class="leafygreen-ui-1ie5kuq" height="16" role="presentation" viewbox="0 0 16 16" width="16">
        <path d="M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z" fill="currentColor">
        </path>
        <path d="M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z" fill="currentColor">
        </path>
       </svg>
      </a>
      for more complete instructions.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      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.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Set
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapTransportSecurity" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapTransportSecurity
        </code>
       </span>
      </a>
      to
      <code class="leafygreen-ui-1l06pbn">
       none
      </code>
      to disable TLS/SSL between
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      and the LDAP
server.
     </p>
     <div class="leafygreen-ui-1sjx7ru" role="note">
      <h2 class="leafygreen-ui-29m78u">
       Warning
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        Setting
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapTransportSecurity" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --ldapTransportSecurity
          </code>
         </span>
        </a>
        to
        <code class="leafygreen-ui-1l06pbn">
         none
        </code>
        transmits plaintext information and possibly
credentials between
        <code class="leafygreen-ui-1l06pbn">
         mongos
        </code>
        and the LDAP server.
       </p>
      </div>
     </div>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --ldapTimeoutMS &lt;int&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--ldapTimeoutMS" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--ldapTimeoutMS">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      : 10000
     </p>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Available in MongoDB Enterprise only.
      </em>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      The amount of time in milliseconds
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      should wait for an LDAP server
to respond to a request.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Increasing the value of
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapTimeoutMS" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapTimeoutMS
        </code>
       </span>
      </a>
      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
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapTimeoutMS" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapTimeoutMS
        </code>
       </span>
      </a>
      reduces the time
MongoDB waits for a response from the LDAP server.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      This setting can be configured on a running
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      using
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/setParameter/#mongodb-dbcommand-dbcmd.setParameter">
       <code class="leafygreen-ui-1l06pbn">
        setParameter
       </code>
       .
      </a>
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --ldapRetryCount &lt;int&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--ldapRetryCount" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--ldapRetryCount">
      </div>
     </a>
    </dt>
    <dd>
     <div>
      <p>
       <em>
        New
        <!-- -->
        in version
        <!-- -->
        6.1
       </em>
       .
      </p>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Default
      </em>
      : 0
     </p>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Available in MongoDB Enterprise only.
      </em>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Number of operation retries by the server LDAP manager after a
network error.
     </p>
    </dd>
   </dl>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --ldapUserToDNMapping &lt;string&gt;
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--ldapUserToDNMapping" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--ldapUserToDNMapping">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      <em>
       Available in MongoDB Enterprise only.
      </em>
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Maps the username provided to
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      for authentication to a LDAP
Distinguished Name (DN). You may need to use
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapUserToDNMapping" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapUserToDNMapping
        </code>
       </span>
      </a>
      to transform a
username into an LDAP DN in the following scenarios:
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        Performing LDAP authentication with simple LDAP binding, where users
authenticate to MongoDB with usernames that are not full LDAP DNs.
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        Using an
        <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/program/mongod/#std-option-mongod.--ldapAuthzQueryTemplate">
         <code class="leafygreen-ui-1l06pbn">
          LDAP authorization query template
         </code>
        </a>
        that requires a DN.
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        Transforming the usernames of clients authenticating to Mongo DB
using different authentication mechanisms, such as x.509 or
kerberos, to a full LDAP DN for authorization.
       </p>
      </li>
     </ul>
     <p class="leafygreen-ui-1kp3ins">
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapUserToDNMapping" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapUserToDNMapping
        </code>
       </span>
      </a>
      expects a quote-enclosed JSON-string representing an ordered array
of documents. Each document contains a regular expression
      <code class="leafygreen-ui-1l06pbn">
       match
      </code>
      and
either a
      <code class="leafygreen-ui-1l06pbn">
       substitution
      </code>
      or
      <code class="leafygreen-ui-1l06pbn">
       ldapQuery
      </code>
      template used for transforming the
incoming username.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Each document in the array has the following form:
     </p>
     <script class="structured_data" type="application/ld+json">
      {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"{\n  match: \"&lt;regex&gt;\"\n  substitution: \"&lt;ldap&gt;\" | ldapQuery: \"&lt;ldap&gt;\"\n}","programmingLanguage":"JavaScript"}
     </script>
     <div class="css-16lmvu9">
      <div class="leafygreen-ui-196mwvg">
       <div class="leafygreen-ui-1b1bvay">
        <pre class="leafygreen-ui-11itue3" tabindex="0"><code class="lg-highlight-hljs-light javascript leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx">{</td></tr><tr class=""><td class="leafygreen-ui-7razhx">  <span class="lg-highlight-attr">match</span>: <span class="lg-highlight-string">"&lt;regex&gt;"</span></td></tr><tr class=""><td class="leafygreen-ui-7razhx">  <span class="lg-highlight-attr">substitution</span>: <span class="lg-highlight-string">"&lt;LDAP DN&gt;"</span> <!-- -->| <span class="lg-highlight-attr">ldapQuery</span>: <span class="lg-highlight-string">"&lt;LDAP Query&gt;"</span></td></tr><tr class=""><td class="leafygreen-ui-7razhx">}</td></tr></tbody></table></code></pre>
        <div class="leafygreen-ui-1bqcprk" data-testid="leafygreen-code-panel">
         <button aria-disabled="false" aria-label="Copy" class="leafygreen-ui-1c6zwke" data-testid="code_copy-button" tabindex="0">
          <div class="leafygreen-ui-xhlipt">
           <svg aria-label="Copy Icon" class="leafygreen-ui-1st74h4" height="16" role="img" viewbox="0 0 16 16" width="16">
            <path clip-rule="evenodd" d="M1 5.71428V10.2857C1 11.2325 1.76751 12 2.71429 12H5.75V7.10957C5.75 6.54414 5.97724 6.00244 6.38065 5.60623L8.67403 3.35381C8.77447 3.25516 8.88376 3.16757 9 3.09182V2.71429C9 1.76751 8.23249 1 7.28571 1H5.8V4.42857C5.8 5.13865 5.22437 5.71428 4.51429 5.71428H1ZM9 4.78571L7.25654 6.49804C7.24689 6.50752 7.23749 6.5172 7.22834 6.52708C7.22208 6.53383 7.21594 6.54068 7.20991 6.54762C7.07504 6.70295 7 6.90234 7 7.10957V7.79762H9H10.0095C10.4829 7.79762 10.8667 7.41386 10.8667 6.94047V4H10.1505C9.92587 4 9.7102 4.0882 9.54992 4.24562L9 4.78571ZM4.86667 1H4.15053C3.92587 1 3.7102 1.0882 3.54992 1.24562L1.25654 3.49804C1.09244 3.65921 1 3.87957 1 4.10957V4.79762H4.00952C4.48291 4.79762 4.86667 4.41386 4.86667 3.94047V1ZM7 12V8.71428H9H10.5143C11.2244 8.71428 11.8 8.13865 11.8 7.42857V4H13.2857C14.2325 4 15 4.76751 15 5.71429V13.2857C15 14.2325 14.2325 15 13.2857 15H8.71429C7.76751 15 7 14.2325 7 13.2857V12Z" fill="currentColor" fill-rule="evenodd">
            </path>
           </svg>
          </div>
         </button>
        </div>
       </div>
      </div>
     </div>
     <div class="leafygreen-ui-skkc39" tabindex="0">
      <table class="leafygreen-ui-hr8lsv">
       <colgroup>
        <col style="width:10%"/>
        <col style="width:70%"/>
        <col style="width:20%"/>
       </colgroup>
       <thead class="leafygreen-ui-a9ho40">
        <tr data-testid="leafygreen-ui-header-row">
         <th class="leafygreen-ui-1trtg6r" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Field
           </div>
          </div>
         </th>
         <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Description
           </div>
          </div>
         </th>
         <th class="leafygreen-ui-13uteka" role="columnheader" scope="col">
          <div class="leafygreen-ui-ui0te9">
           <div>
            Example
           </div>
          </div>
         </th>
        </tr>
       </thead>
       <tbody>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             match
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            An ECMAScript-formatted regular expression (regex) to match against a
provided username. Each parenthesis-enclosed section represents a
regex capture group used by
            <code class="leafygreen-ui-1l06pbn">
             substitution
            </code>
            or
            <code class="leafygreen-ui-1l06pbn">
             ldapQuery
            </code>
            .
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             "(.+)ENGINEERING"
            </code>
            <code class="leafygreen-ui-1l06pbn">
             "(.+)DBA"
            </code>
           </div>
          </div>
         </td>
        </tr>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             substitution
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <p class="leafygreen-ui-1kp3ins">
             An LDAP distinguished name (DN) formatting template that converts the
authentication name matched by the
             <code class="leafygreen-ui-1l06pbn">
              match
             </code>
             regex into a LDAP DN.
Each curly bracket-enclosed numeric value is replaced by the
corresponding
             <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="http://www.regular-expressions.info/refcapture.html" rel="noopener noreferrer">
              <span>
               regex capture group
              </span>
              <svg alt="" aria-hidden="true" class="leafygreen-ui-1ie5kuq" height="16" role="presentation" viewbox="0 0 16 16" width="16">
               <path d="M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z" fill="currentColor">
               </path>
               <path d="M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z" fill="currentColor">
               </path>
              </svg>
             </a>
             extracted
from the authentication username via the
             <code class="leafygreen-ui-1l06pbn">
              match
             </code>
             regex.
            </p>
            <p class="leafygreen-ui-1kp3ins">
             The result of the substitution must be an
             <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://www.ietf.org/rfc/rfc4514.txt" rel="noopener noreferrer">
              <span>
               RFC4514
              </span>
              <svg alt="" aria-hidden="true" class="leafygreen-ui-1ie5kuq" height="16" role="presentation" viewbox="0 0 16 16" width="16">
               <path d="M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z" fill="currentColor">
               </path>
               <path d="M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z" fill="currentColor">
               </path>
              </svg>
             </a>
             escaped string.
            </p>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             "cn={0},ou=engineering,
dc=example,dc=com"
            </code>
           </div>
          </div>
         </td>
        </tr>
        <tr class="">
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             ldapQuery
            </code>
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            A LDAP query formatting template that inserts the authentication
name matched by the
            <code class="leafygreen-ui-1l06pbn">
             match
            </code>
            regex into an LDAP query URI encoded
respecting RFC4515 and RFC4516. Each curly bracket-enclosed numeric
value is replaced by the corresponding
            <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="http://www.regular-expressions.info/refcapture.html" rel="noopener noreferrer">
             <span>
              regex capture group
             </span>
             <svg alt="" aria-hidden="true" class="leafygreen-ui-1ie5kuq" height="16" role="presentation" viewbox="0 0 16 16" width="16">
              <path d="M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z" fill="currentColor">
              </path>
              <path d="M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z" fill="currentColor">
              </path>
             </svg>
            </a>
            extracted
from the authentication username via the
            <code class="leafygreen-ui-1l06pbn">
             match
            </code>
            expression.
            <code class="leafygreen-ui-1l06pbn">
             mongos
            </code>
            executes the query against the LDAP server to retrieve
the LDAP DN for the authenticated user.
            <code class="leafygreen-ui-1l06pbn">
             mongos
            </code>
            requires
exactly one returned result for the transformation to be
successful, or
            <code class="leafygreen-ui-1l06pbn">
             mongos
            </code>
            skips this transformation.
           </div>
          </div>
         </td>
         <td class="leafygreen-ui-1drjk7h">
          <div class="leafygreen-ui-1n4j8xf">
           <div>
            <code class="leafygreen-ui-1l06pbn">
             "ou=engineering,dc=example,
dc=com??one?(user={0})"
            </code>
           </div>
          </div>
         </td>
        </tr>
       </tbody>
      </table>
     </div>
     <div class="leafygreen-ui-15mdk4" role="note">
      <h2 class="leafygreen-ui-6n7b7d">
       Note
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        An explanation of
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://www.ietf.org/rfc/rfc4514.txt" rel="noopener noreferrer">
         <span>
          RFC4514
         </span>
         <svg alt="" aria-hidden="true" class="leafygreen-ui-1ie5kuq" height="16" role="presentation" viewbox="0 0 16 16" width="16">
          <path d="M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z" fill="currentColor">
          </path>
          <path d="M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z" fill="currentColor">
          </path>
         </svg>
        </a>
        ,
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://tools.ietf.org/html/rfc4515" rel="noopener noreferrer">
         <span>
          RFC4515
         </span>
         <svg alt="" aria-hidden="true" class="leafygreen-ui-1ie5kuq" height="16" role="presentation" viewbox="0 0 16 16" width="16">
          <path d="M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z" fill="currentColor">
          </path>
          <path d="M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z" fill="currentColor">
          </path>
         </svg>
        </a>
        ,
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="https://tools.ietf.org/html/rfc4516" rel="noopener noreferrer">
         <span>
          RFC4516
         </span>
         <svg alt="" aria-hidden="true" class="leafygreen-ui-1ie5kuq" height="16" role="presentation" viewbox="0 0 16 16" width="16">
          <path d="M13.823 2.4491C13.8201 2.30008 13.6999 2.17994 13.5509 2.17704L9.5062 2.09836C9.25654 2.09351 9.12821 2.39519 9.30482 2.5718L10.3856 3.65257L7.93433 6.10383C7.87964 6.15852 7.83047 6.21665 7.78683 6.27752L5.99909 8.06525C5.46457 8.59977 5.46457 9.4664 5.99909 10.0009C6.53361 10.5354 7.40023 10.5354 7.93475 10.0009L9.72249 8.21317C9.78336 8.16953 9.84148 8.12037 9.89618 8.06567L12.3474 5.61441L13.4282 6.69518C13.6048 6.87179 13.9065 6.74347 13.9016 6.4938L13.823 2.4491Z" fill="currentColor">
          </path>
          <path d="M7.25 3.12893C7.66421 3.12893 8 3.46472 8 3.87893C8 4.29315 7.66421 4.62893 7.25 4.62893H4C3.72386 4.62893 3.5 4.85279 3.5 5.12893V11.9929C3.5 12.2691 3.72386 12.4929 4 12.4929H10.864C11.1401 12.4929 11.364 12.2691 11.364 11.9929V8.75C11.364 8.33579 11.6998 8 12.114 8C12.5282 8 12.864 8.33579 12.864 8.75V11.9929C12.864 13.0975 11.9686 13.9929 10.864 13.9929H4C2.89543 13.9929 2 13.0975 2 11.9929V5.12893C2 4.02436 2.89543 3.12893 4 3.12893H7.25Z" fill="currentColor">
          </path>
         </svg>
        </a>
        , or LDAP queries is out
of scope for the MongoDB Documentation. Please review the RFC directly or
use your preferred LDAP resource.
       </p>
      </div>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      For each document in the array, you must use either
      <code class="leafygreen-ui-1l06pbn">
       substitution
      </code>
      or
      <code class="leafygreen-ui-1l06pbn">
       ldapQuery
      </code>
      . You
      <em>
       cannot
      </em>
      specify both in the same document.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      When performing authentication or authorization,
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      steps through
each document in the array in the given order, checking the authentication
username against the
      <code class="leafygreen-ui-1l06pbn">
       match
      </code>
      filter.  If a match is found,
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      applies the transformation and uses the output for
authenticating the user.
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      does not check the remaining documents
in the array.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      If the given document does not match the provided authentication
name,
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      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,
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      returns an error.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      also returns an error if one of the transformations cannot be
evaluated due to networking or authentication failures to the LDAP server.
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      rejects the connection request and does not check the remaining
documents in the array.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Starting in MongoDB 5.0,
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapUserToDNMapping" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapUserToDNMapping
        </code>
       </span>
      </a>
      accepts an empty string
      <code class="leafygreen-ui-1l06pbn">
       ""
      </code>
      or empty array
      <code class="leafygreen-ui-1l06pbn">
       [ ]
      </code>
      in place of a
mapping documnent. If providing an empty string or empty array to
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapUserToDNMapping" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapUserToDNMapping
        </code>
       </span>
      </a>
      , MongoDB maps the
authenticated username as the LDAP DN. Previously, providing an
empty mapping document would cause mapping to fail.
     </p>
     <div class="leafygreen-ui-vg7qwp" role="note">
      <h2 class="leafygreen-ui-2xicti">
       Example
      </h2>
      <div class="leafygreen-ui-9mycqc">
       <p class="leafygreen-ui-1kp3ins">
        The following shows two transformation documents. The first
document matches against any string ending in
        <code class="leafygreen-ui-1l06pbn">
         @ENGINEERING
        </code>
        , placing
anything preceeding the suffix into a regex capture group. The
second document matches against any string ending in
        <code class="leafygreen-ui-1l06pbn">
         @DBA
        </code>
        , placing
anything preceeding the suffix into a regex capture group.
       </p>
       <div class="leafygreen-ui-85da11" role="note">
        <h2 class="leafygreen-ui-1ac4g5h">
         Important
        </h2>
        <h3 class="leafygreen-ui-144d5kf">
         <strong>
          You must pass the array to --ldapUserToDNMapping as a string.
         </strong>
        </h3>
        <div class="leafygreen-ui-9mycqc">
        </div>
       </div>
       <script class="structured_data" type="application/ld+json">
        {"@context":"https://schema.org","@type":"SoftwareSourceCode","codeSampleType":"code snippet","text":"\"[\n   {\n      match: \"(.+)@ENGINEERING.EXAMPLE.COM\",\n      substitution: \"cn={0},ou=engineering,dc=example,dc=com\"\n   },\n   {\n      match: \"(.+)@DBA.EXAMPLE.COM\",\n      ldapQuery: \"ou=dba,dc=example,dc=com??one?(user={0})\"\n\n   }\n\n]\""}
       </script>
       <div class="css-16lmvu9">
        <div class="leafygreen-ui-196mwvg">
         <div class="leafygreen-ui-1b1bvay">
          <pre class="leafygreen-ui-11itue3" tabindex="0"><code class="lg-highlight-hljs-light none leafygreen-ui-9ybzas"><table class="leafygreen-ui-1tr4g10"><tbody><tr class=""><td class="leafygreen-ui-7razhx">"[</td></tr><tr class=""><td class="leafygreen-ui-7razhx">   {</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      match: "(.+)@ENGINEERING.EXAMPLE.COM",</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      substitution: "cn={0},ou=engineering,dc=example,dc=com"</td></tr><tr class=""><td class="leafygreen-ui-7razhx">   },</td></tr><tr class=""><td class="leafygreen-ui-7razhx">   {</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      match: "(.+)@DBA.EXAMPLE.COM",</td></tr><tr class=""><td class="leafygreen-ui-7razhx">      ldapQuery: "ou=dba,dc=example,dc=com??one?(user={0})"</td></tr><tr class=""><td class="leafygreen-ui-7razhx"><div class="leafygreen-ui-ihxujy"></div></td></tr><tr class=""><td class="leafygreen-ui-7razhx">   }</td></tr><tr class=""><td class="leafygreen-ui-7razhx"><div class="leafygreen-ui-ihxujy"></div></td></tr><tr class=""><td class="leafygreen-ui-7razhx">]"</td></tr></tbody></table></code></pre>
          <div class="leafygreen-ui-1bqcprk" data-testid="leafygreen-code-panel">
           <button aria-disabled="false" aria-label="Copy" class="leafygreen-ui-1c6zwke" data-testid="code_copy-button" tabindex="0">
            <div class="leafygreen-ui-xhlipt">
             <svg aria-label="Copy Icon" class="leafygreen-ui-1st74h4" height="16" role="img" viewbox="0 0 16 16" width="16">
              <path clip-rule="evenodd" d="M1 5.71428V10.2857C1 11.2325 1.76751 12 2.71429 12H5.75V7.10957C5.75 6.54414 5.97724 6.00244 6.38065 5.60623L8.67403 3.35381C8.77447 3.25516 8.88376 3.16757 9 3.09182V2.71429C9 1.76751 8.23249 1 7.28571 1H5.8V4.42857C5.8 5.13865 5.22437 5.71428 4.51429 5.71428H1ZM9 4.78571L7.25654 6.49804C7.24689 6.50752 7.23749 6.5172 7.22834 6.52708C7.22208 6.53383 7.21594 6.54068 7.20991 6.54762C7.07504 6.70295 7 6.90234 7 7.10957V7.79762H9H10.0095C10.4829 7.79762 10.8667 7.41386 10.8667 6.94047V4H10.1505C9.92587 4 9.7102 4.0882 9.54992 4.24562L9 4.78571ZM4.86667 1H4.15053C3.92587 1 3.7102 1.0882 3.54992 1.24562L1.25654 3.49804C1.09244 3.65921 1 3.87957 1 4.10957V4.79762H4.00952C4.48291 4.79762 4.86667 4.41386 4.86667 3.94047V1ZM7 12V8.71428H9H10.5143C11.2244 8.71428 11.8 8.13865 11.8 7.42857V4H13.2857C14.2325 4 15 4.76751 15 5.71429V13.2857C15 14.2325 14.2325 15 13.2857 15H8.71429C7.76751 15 7 14.2325 7 13.2857V12Z" fill="currentColor" fill-rule="evenodd">
              </path>
             </svg>
            </div>
           </button>
          </div>
         </div>
        </div>
       </div>
       <p class="leafygreen-ui-1kp3ins">
        A user with username
        <code class="leafygreen-ui-1l06pbn">
         alice@ENGINEERING.EXAMPLE.COM
        </code>
        matches the first
document. The regex capture group
        <code class="leafygreen-ui-1l06pbn">
         {0}
        </code>
        corresponds to the string
        <code class="leafygreen-ui-1l06pbn">
         alice
        </code>
        . The resulting output is the DN
        <code class="leafygreen-ui-1l06pbn">
         "cn=alice,ou=engineering,dc=example,dc=com"
        </code>
        .
       </p>
       <p class="leafygreen-ui-1kp3ins">
        A user with username
        <code class="leafygreen-ui-1l06pbn">
         bob@DBA.EXAMPLE.COM
        </code>
        matches the second document.
The regex capture group
        <code class="leafygreen-ui-1l06pbn">
         {0}
        </code>
        corresponds to the string
        <code class="leafygreen-ui-1l06pbn">
         bob
        </code>
        .  The
resulting output is the LDAP query
        <code class="leafygreen-ui-1l06pbn">
         "ou=dba,dc=example,dc=com??one?(user=bob)"
        </code>
        .
        <code class="leafygreen-ui-1l06pbn">
         mongos
        </code>
        executes this
query against the LDAP server, returning the result
        <code class="leafygreen-ui-1l06pbn">
         "cn=bob,ou=dba,dc=example,dc=com"
        </code>
        .
       </p>
      </div>
     </div>
     <p class="leafygreen-ui-1kp3ins">
      If
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ldapUserToDNMapping" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ldapUserToDNMapping
        </code>
       </span>
      </a>
      is unset,
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      applies no transformations to the username
when attempting to authenticate or authorize a user against the LDAP server.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      This setting can be configured on a running
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      using the
      <a class="leafygreen-ui-tqgtui" href="/docs/manual/reference/command/setParameter/#mongodb-dbcommand-dbcmd.setParameter">
       <code class="leafygreen-ui-1l06pbn">
        setParameter
       </code>
      </a>
      database command.
     </p>
    </dd>
   </dl>
  </section>
  <section>
   <h3 class="contains-headerlink leafygreen-ui-15ajumo" weight="medium">
    Additional Options
    <a class="headerlink leafygreen-ui-1kepx47" href="#additional-options" title="Permalink to this heading">
     <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
      <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
      </path>
      <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
      </path>
     </svg>
     <div class="css-1btu0w3 evvkmar0" id="additional-options">
     </div>
    </a>
   </h3>
   <dl class="option">
    <dt>
     <code class="leafygreen-ui-1l06pbn">
      --ipv6
     </code>
     <a class="headerlink leafygreen-ui-1kepx47" href="#std-option-mongos.--ipv6" title="Permalink to this definition">
      <svg aria-label="Link Icon" class="leafygreen-ui-a30zj9" fill="none" height="12" role="img" viewbox="0 0 16 16" width="12" xmlns="http://www.w3.org/2000/svg">
       <path d="M6.039 9.953a3.596 3.596 0 0 1-.327-.38l1.45-1.445a1.553 1.553 0 0 0 2.496.423l2.885-2.87a1.57 1.57 0 0 0 .01-2.213 1.553 1.553 0 0 0-2.203-.01l-.379.377A.995.995 0 0 1 8.56 3.83a1.005 1.005 0 0 1 .006-1.418l.38-.377a3.542 3.542 0 0 1 5.024.023 3.58 3.58 0 0 1-.022 5.047l-2.884 2.871a3.542 3.542 0 0 1-5.025-.022Z" fill="currentColor">
       </path>
       <path d="M9.961 6.047c.12.12.228.248.327.38l-1.45 1.445a1.553 1.553 0 0 0-2.496-.423l-2.885 2.87a1.57 1.57 0 0 0-.01 2.213 1.553 1.553 0 0 0 2.203.01l.379-.377a.995.995 0 0 1 1.411.006 1.005 1.005 0 0 1-.006 1.418l-.38.377a3.542 3.542 0 0 1-5.024-.023 3.58 3.58 0 0 1 .022-5.047l2.884-2.871a3.542 3.542 0 0 1 5.025.022Z" fill="currentColor">
       </path>
      </svg>
      <div class="css-1btu0w3 evvkmar0" id="std-option-mongos.--ipv6">
      </div>
     </a>
    </dt>
    <dd>
     <p class="leafygreen-ui-1kp3ins">
      Enables IPv6 support.
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      disables IPv6 support by default.
     </p>
     <p class="leafygreen-ui-1kp3ins">
      Setting
      <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--ipv6" target="_self">
       <span>
        <code class="leafygreen-ui-1l06pbn">
         --ipv6
        </code>
       </span>
      </a>
      does
      <em>
       not
      </em>
      direct the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      to listen on any
local IPv6 addresses or interfaces. To configure the
      <code class="leafygreen-ui-1l06pbn">
       mongos
      </code>
      to
listen on an IPv6 interface, you must either:
     </p>
     <ul class="leafygreen-ui-rioki0">
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        Configure
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--bind_ip" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --bind_ip
          </code>
         </span>
        </a>
        with one or more IPv6 addresses or
hostnames that resolve to IPv6 addresses,
        <strong>
         or
        </strong>
       </p>
      </li>
      <li class="leafygreen-ui-d7p7b6">
       <p class="leafygreen-ui-1kp3ins">
        Set
        <a class="lg-ui-0001 leafygreen-ui-fgcsv5" href="#std-option-mongos.--bind_ip_all" target="_self">
         <span>
          <code class="leafygreen-ui-1l06pbn">
           --bind_ip_all
          </code>
         </span>
        </a>
        to
        <code class="leafygreen-ui-1l06pbn">
         true
        </code>
        .
       </p>
      </li>
     </ul>
    </dd>
   </dl>
  </section>
 </section>
</section>
