---
title: Charmhub | Deploy MongoDB using Charmhub - The Open Operator Collection
description: Deploy the latest version of MongoDB on any cloud.
url: https://charmhub.io/mongodb/configurations
---

# MongoDB

[Canonical](https://charmhub.io/publisher/data-platform "View all packages from Canonical")

* [Canonical](https://charmhub.io/publisher/data-platform "View all packages from Canonical")
* [Databases](https://charmhub.io/?filter=databases)

Platform:

24.04

22.04

6/stable 265

```
juju deploy mongodb --channel 6/stable
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

* [auto-delete](https://charmhub.io/mongodb/configurations#auto-delete)
* [ldap-query-template](https://charmhub.io/mongodb/configurations#ldap-query-template)
* [ldap-user-to-dn-mapping](https://charmhub.io/mongodb/configurations#ldap-user-to-dn-mapping)
* [role](https://charmhub.io/mongodb/configurations#role)

[Learn about configurations >](https://juju.is/docs/juju/configuration#heading--application-configuration)

* auto-delete | boolean

  When a relation is removed, auto-delete ensures that any relevant databases
  associated with the relation are also removed
* ldap-query-template | string

  A RFC4516 formatted LDAP query URL template, which is used for authorization. It must contain either `{USER}` representing the authenticated user, or `{PROVIDED_USER}` representing the supplied username (before authentication or LDAP transformation). `{PROVIDED_USER}` should be used only if no ldapUserToDNMapping is provided. If this configuration is not provided, a default string will be computed based on the base\_dn returned by the GLAuth k8s charm. Example: dc=example,dc=com??sub?(&(objectClass=groupOfNames)(member={USER}))
* ldap-user-to-dn-mapping | string

  A quote-enclosed JSON-string representing an ordered array of documents. Each document contains a regular expression match and either a substitution or ldapQuery template used for transforming the incoming username. Since the list is ordered, this order can be used to provide fine-grained tuning for building the right DN or the right ldapQuery for the user.
  Example: [{
  match : "([^@]+)@([^@\.]+)\.example\.com",
  substitution: "CN={0},CN=Users,DC={1},DC=example,DC=com"
  }]
* role | string

  Default: replication

  role config option exists to deploy the charmed-mongodb application as a shard,
  config-server, or as a replica set.
