Docs Menu
Docs Home
/
MongoDB Compass
/

Configuration File Settings

On this page

  • Configuration File Location
  • Syntax
  • Settings
  • Example
  • Learn More

You can use a configuration file to customize MongoDB Compass settings at startup. You cannot override any settings that have been set with a configuration file on the Compass interface.

  • For macOS and Linux, the configuration file is located at /etc/mongodb-compass.conf.

  • For Windows, the configuration file is located at <path\to\compass>\..\mongodb-compass.cfg.

You can configure Compass configuration file settings in either EJSON or YAML format.

{
"setting": value,
"setting": value,
...
}
setting option: value
setting option: value
...
Setting
Definition
autoUpdates
Allow Compass to periodically check for new updates.
Allow Compass to use generative AI for natural language querying. This feature requires an Atlas login and a deployed Atlas cluster.

Enable Chrome DevTools in Compass.

To learn more, see Toggle Chrome DevTools.

enableMaps
Allow Compass to make requests to third-party mapping services.

Enable or disable the embedded MongoDB Shell on Compass.

To learn more, see Disable the Embedded MongoDB Shell.

Assign connection option values for when you connect to your MongoDB deployment through Compass. These connection options cannot be overridden by connections from the Compass interface or a command line connection string.

ignoreAdditionalCommandLineFlags
Allow or disallow additional command-line option flags.
installURLHandlers

Register Compass as a handler for mongodb:// and mongodb+srv:// URLs.

If Install Compass as URL Protocol Handler is enabled, you can open Compass by navigating to a mongodb:// or mongodb+srv:// URL in your internet browser.

Available on macOS and Windows.

maxTimeMS
Specify an upper time limit for all Compass database operations.
Prevent MongoDB Compass from performing outgoing network operations other than those to the database.

Sets all connection strings as read-only. Passwords in connection strings display as *****.

If protectConnectionStrings is enabled, Compass disables the Edit connection string option and hides the Edit connection string toggle.

protectConnectionStringsForNewConnections

Sets connection strings for new connections as read-only by default. Passwords in new connection strings display as *****.

If protectConnctionStringsForNewConnections is enabled, Compass disables the Edit connection string option but doesn't prevent users from manually enabling the option with the Edit connection string toggle.

Prevent users from performing write operations to your MongoDB deployment through Compass.

To learn more, see Restrict Write Operations to MongoDB.

Show or hide the Kerberos password field on the Compass connection form.

To learn more, see Display the Kerberos Password Field.

theme
Specify the MongoDB Compass UI theme. The supported themes are DARK, LIGHT, and OS_THEME.
trackUsageStatistics
Allow Compass to send anonymous usage statistics.

Note

To view all available Compass configuration options, run the following command in the folder containing your MongoDB Compass executable:

<path-to-Compass-executable> --help

To view a sample Compass configuration file, run the following command:

<path-to-Compass-executable> --show-example-config

If you do not already have a configuration file, run the following command to create a configuration file that uses the sample configuration settings:

<path-to-Compass-executable> --show-example-config > /etc/mongodb-compass.conf
← Command Line Options