Docs Menu

Docs HomeMongoDB Compass

Compass Command Line Options

The following page provides an overview on how to set command line options for MongoDB Compass. For more detailed guidance on how to set a specific command line option, see the task page for the specific option.

You can start MongoDB Compass and set configuration options from the command line. When you use the command line to set configuration options, the options are set at startup. Settings configured using command line options cannot be modified on the Compass interface.

The name and location of the Compass executable varies by operating system.

The executable is called mongodb-compass. The installer installs it in the /usr/bin directory.

The executable is called MongoDBCompass.exe. The installer installs it in a folder you pick during the installation process.

The executable is called MongoDB Compass. The installer installs it under the Applications folder:

/Applications/MongoDB\ Compass.app/Contents/MacOS/MongoDB\ Compass

Use the following syntax to start MongoDB Compass and set a configuration option:

<path-to-Compass-executable> --<option>

You can set these options when using the command line.

These options can only be set on the command line. These options cannot be set in the Settings panel.

--exportConnections

Export favorite connections.

--file <file>

Specify a file containing a list of connections. These connections are automatically available once MongoDB Compass starts.

--help

Show MongoDB Compass options.

--importConnections

Import favorite connections.

--passphrase

Specify a passphrase to encrypt the exported favorite connections output file.

Specify a passphrase to decrypt the imported favorite connections file.

--version

Show MongoDB Compass version.

These options can be set on the command line or in the Settings panel. Setting an option on the command line overrides the value in the Settings panel.

--autoUpdates

Enable automatic updates. Use --no-autoUpdates to disable automatic updates.

--enableFeedbackPanel

Enable the feedback panel. Use --no-enableFeedbackPanel to disable automatic updates.

--enableMaps

Allow MongoDB Compass to make requests to a 3rd party mapping service. Use --no-enableMaps to disable mapping requests.

--networkTraffic

Configure MongoDB Compass to only allow outgoing network operations to connect to the database.

--protectConnectionStrings

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

--theme

Specify the MongoDB Compass UI theme. The supported themes are DARK, LIGHT, and OS_THEME.

--trackErrors

Enable sending crash reports. Use --no-trackErrors to disable sending crash reports.

--trackUsageStatistics

Enable sending usage statistics. Use --no-trackUsageStatistics to disable sending usage statistics.

←  Compass Configuration File SettingsImport and Export Data →
Share Feedback
© 2023 MongoDB, Inc.

About

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