Skip to content

mongodb.conf

Calin Crisan edited this page Nov 24, 2020 · 5 revisions

File Location And Role

The file lives at /data/etc/mongodb.conf. It can be provisioned using /boot/mongodb.conf and uses /etc/mongodb.conf as a default. The file is not present by default and should be created by the user, if mongodb is needed.

If the file is present, the mongod daemon will be started to run the Mongo DB server on your system.

Note that mongodb package is not enabled by default in thingOS. You'll need to enable it in your configurations to have this functionality.

File Format

The configuration file uses the YAML format.

Example

systemLog:
  destination: file
  logAppend: true
  path: /var/log/mongodb.log

storage:
  dbPath: /var/lib/mongodb
  journal:
    enabled: true

processManagement:
  pidFilePath: /var/run/mongodb.pid
  timeZoneInfo: /usr/share/zoneinfo

net:
  port: 27017
  bindIp: 127.0.0.1
Clone this wiki locally