Skip to content

Instantly share code, notes, and snippets.

@JayWood
Created September 23, 2023 03:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JayWood/8b3292f31f494187bcb57e93b50d8ae1 to your computer and use it in GitHub Desktop.
Save JayWood/8b3292f31f494187bcb57e93b50d8ae1 to your computer and use it in GitHub Desktop.
# mongod.conf
# Where and how to store data.
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true
# Basic settings
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log
# Network interfaces
net:
port: 27017
bindIp: 127.0.0.1 # List of IP addresses that MongoDB will listen on.
# Security
security:
authorization: enabled # Enable user authentication.
# Operation Profiling
operationProfiling:
mode: "off"
# Replication
replication:
replSetName: "rs0" # Optional: Set a replica set name if needed.
# Sharding
sharding:
clusterRole: "configsvr"
# Enterprise-Only Options
# (These options require MongoDB Enterprise edition)
#enterprise:
# ldap:
# servers: "ldap.example.com"
# bind:
# method: "simple"
# simple:
# username: "cn=admin,dc=example,dc=com"
# password: "password"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment