Docs Menu

Docs HomeMongoDB Compass

Compass Configuration File Settings

On this page

  • Syntax
  • Settings
  • Example
  • Learn More

You can configure MongoDB Compass using a configuration file. The configuration file configures settings at startup. Settings configured using the configuration file cannot be modified on the Compass interface. For more detailed guidance on how to configure a setting, see the task page for the specific setting.

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

"setting": value,
"setting": value,
setting option: value
setting option: value

You can configure the following settings in a configuration file:


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.

Configure MongoDB Compass to not perform outgoing network operations other than those to the database.

Hide credentials in your connection string. Passwords in connection strings are displayed as *****

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, you can create a configuration file that uses the sample configuration settings:

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

For more information, see Compass Configuration File.

←  Compass Configuration FileHide Credentials in Your Connection String →
Share Feedback
© 2023 MongoDB, Inc.


  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2023 MongoDB, Inc.