Compass Configuration File Settings
On this page
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.
Syntax
You can configure Compass configuration file settings in either EJSON or YAML format.
EJSON
{ "setting": value, "setting": value, ... }
YAML
setting option: value setting option: value ...
Settings
You can configure the following settings in a configuration file:
Setting | Definition |
---|---|
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 |
Example
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
Learn More
For more information, see Compass Configuration File.