Skip to content

mongodb.conf

Calin Crisan edited this page Feb 2, 2019 · 5 revisions

File Location And Role

The file lives at /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 start 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

Here are some details on the file format.

Example

bind 127.0.0.1
protected-mode yes
port 6379
tcp-backlog 16
timeout 0
tcp-keepalive 300

maxmemory 128M
maxmemory-policy noeviction

daemonize yes
supervised no

pidfile /var/run/redis.pid
loglevel notice
logfile /var/log/redis.log

databases 2
save 10 2
stop-writes-on-bgsave-error yes
rdbcompression yes
dir /var/lib/redis/
dbfilename dump.rdb

appendonly no
appendfilename appendonly.aof
appendfsync everysec
no-appendfsync-on-rewrite no
auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb
aof-load-truncated yes
Clone this wiki locally