LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

mongod

MongoDB database server daemon

TLDR

Start MongoDB server
$ mongod
copy
Specify data directory
$ mongod --dbpath [/data/db]
copy
Specify port
$ mongod --port [27017]
copy
Bind to all interfaces
$ mongod --bind_ip_all
copy
Enable authentication
$ mongod --auth
copy
Use config file
$ mongod --config [/etc/mongod.conf]
copy
Run as replica set
$ mongod --replSet [rs0]
copy
Run as a daemon with logging
$ mongod --fork --logpath [/var/log/mongod.log]
copy

SYNOPSIS

mongod [options]

DESCRIPTION

mongod is the MongoDB database server daemon. It handles data requests, manages data storage, and performs background management operations.The tool is the core database process. Supports replication, sharding, and authentication. Uses the WiredTiger storage engine by default.

PARAMETERS

-f, --config FILE

Configuration file path.
--dbpath PATH
Database directory path (default: /data/db).
--port PORT
Listening port number (default: 27017).
--bind_ip IP
Comma-separated list of IP addresses to bind.
--bind_ip_all
Bind to all IP addresses.
--auth
Enable authentication.
--replSet NAME
Replica set name.
--logpath FILE
Path for the log file. Required when using --fork.
--fork
Run the server as a background daemon.
--keyFile FILE
Path to shared key file for replica set/sharded cluster authentication. Implies --auth.
--wiredTigerCacheSizeGB SIZE
Maximum size of the WiredTiger internal cache in GB.
--help
Display help information.

CAVEATS

Requires proper storage configuration. Resource intensive. Needs careful security setup. When using --fork, --logpath must also be specified.

HISTORY

mongod is the MongoDB server process, the core component of MongoDB since its initial release in 2009.

SEE ALSO

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid