Deploy a Standalone MongoDB Instance

On this page

You can deploy a standalone MongoDB instance for Ops Manager to manage. Use standalone instances for testing and development. Do not use these deployments for production systems as they lack replication and high availability. For all production deployments use replica sets. To learn about replica sets, see Deploy a Replica Set.


You must provision a server to which to deploy. For testing purposes, you can use your localhost.

Added in Ops Manager 4.0

You can use Kubernetes to deploy MongoDB instances with Ops Manager version 4.0 or later.

To deploy a standalone using a Kubernetes object, you need to meet the prerequisites for, and complete the procedures on, the Install Kubernetes Operator page.



Click Deployment, then the Processes tab.


Choose New Standalone.

  1. Click the Add New dropdown menu.
  2. Select New Standalone.

Configure the standalone MongoDB instance.

In the Process Configuration section, complete the following fields.

Name Type the name for your standalone MongoDB deployment.

Select the MongoDB version for your standalone MongoDB deployment.


If the dropdown menu does not include the MongoDB version you want for your deployment, you must enable it in the Version Manager.

Auth Schema Version Select the schema for storing the user data for your deployment. MongoDB 3.0 uses a different schema for user data than previous versions. For compatibility information, see the Security Changes in the MongoDB 3.0 release notes.
Feature Compatibility (Optional) Select the feature compatibility set. This field appears if your deployment MongoDB version is 3.4 or later.
Hostname Type the FQDN for the server hosting your MongoDB deployment.
Port Type the IANA port number for your MongoDB deployment. The default for MongoDB deployments is 27017.
DB Directory Path Type the system path to the database directory for this deployment. The default is /data/myProcess.
Log File Path Type the system path to the log file setting for this deployment. The default is /data/myProcess/mongodb.log.

Set any Advanced Configuration options for the standalone MongoDB instance.

In the Advanced Options section, add any additional runtime options you want to set for your MongoDB deployment.

To add an option:

  1. Click Add Option.
  2. Select a Startup Option.
  3. Set an acceptable value for that Startup Option.

For descriptions of Advanced Options, see Advanced Options for MongoDB Deployments.


Click Apply.


Click Review & Deploy to review your changes.


Click Confirm & Deploy to deploy your changes.

Otherwise, click Cancel and you can make additional changes.


Copy the following example standalone Kubernetes object.

This is a YAML file that you can modify to meet your desired configuration. The highlighted lines should be changed for your standalone configuration.

kind: MongoDbStandalone
  name: <mystandalone>
  namespace: <metadata.namespace> # Should match metadata.namespace in
                                  # your configmap file.
  version: 3.6.7
  project: <myconfigmap> # Should match in your
                         # configmap file.
  credentials: <mycredentials>
  persistent: true

You will need to change the highlighted settings to match your desired Standalone deployment.


Open your preferred text editor and paste the object specification into a new text file.


Configure the settings highlighted in the preceeding step as follows.

Key Type Description Example string

Label for this Kubernetes standalone object.

See also

metadata.namespace string

Scope of object names. Kubernetes namespace where this MongoDB Kubernetes resource and other objects are created.

Using two different namespaces allows you to delete your standalone or all of the resources in the namespace without affecting your Kubernetes Operator.

See also

spec.project string

Name of the ConfigMap with the Ops Manager connection configuration.

Value must match namespace and name of ConfigMap

This value must match the value you provided for in your Ops Manager project ConfigMap.

If this MongoDB Kubernetes resource is in a different namespace than the project ConfigMap, you should set this value to the namespace and name of the ConfigMap in this format: <namespace>/<myconfigmap>

<myproject> or <namespace>/<myconfigmap>
spec.credentials string

Name of the Kubernetes secret you created as Ops Manager API authentication credentials for the Kubernetes Operator to communicate with Ops Manager.

Value must use namespace and name of Secret

This value must match the value you provided for namespace and name for your Ops Manager Kubernetes Secret.

If this object is in a different namespace than the Secret, you should set this value to the namespace and name of the Secret in this format: <namespace>/<name>

<mycredentials> or <namespace>/<mycredentials>
spec.version string

Version of MongoDB that is installed on this standalone.

The format should be X.Y.Z for the Community edition and X.Y.Z-ent for the Enterprise edition.

To learn more about MongoDB versioning, see MongoDB Version Numbers in the MongoDB Manual.

spec.persistent string


If this value is true, then spec.podSpec.persistence.single is set to its default value of 16G.

To change your Persistent Volume Claims configuration, configure the following collections to meet your deployment requirements:


Your containers must have permissions to write to your Persistent Volume. The Kubernetes Operator sets fsGroup = 2000 in securityContext This makes Kubernetes try to fix write permissions for the Persistent Volume. If redeploying the deployment item does not fix issues with your Persistent Volumes, contact MongoDB support.


If you do not use Persistent Volumes, the Disk Usage and Disk IOPS charts cannot be displayed in either the Processes tab on the Deployment page or in the Metrics page when reviewing the data for this deployment.


Add any additional accepted settings for a Standalone deployment.

You can also add any of the following optional settings to the object specification file for a Standalone deployment:


Save this file with a .yaml file extension.


Start your Standalone deployment.

Invoke the following Kubernetes command to create your standalone:

kubectl apply -f <standalone-conf>.yaml

To troubleshoot your sharded cluster, see: