The MongoDB configuration file is an American Standard Code for Information Interchange (ASCII) text file using the YAML Ain't Markup Language (YAML) style of formatting, with the following features:
- Key-value pairs are specified as follows:
key : value
- Section headings are followed by a colon and a line feed, as follows:
heading:
- Key-value pairs that are subsets of a section are indented by two spaces, as follows:
heading:
key1: value1
key2: value2
- Comments can be added by starting the line with a # symbol, as follows:
# This is a comment
IMPORTANT: YAML does not support tabs. Be sure to use spaces when indenting.
We will now examine some of the more important configuration options.