MongoDB at a glance
MongoDB stores documents in BSON format (a typed binary JSON) inside collections, with no rigid schema. It's a common choice for workloads where the data model evolves quickly, for native sharding and for replication.
The server daemon is mongod. The modern administration shell is mongosh
(the old mongo shell, removed since version 6, should no longer be
used). The default listening port is 27017.
Landmarks
- Server:
mongod, configured by amongod.conffile (YAML format). - Data: a dedicated
dbPathdirectory — its location depends on the platform and the package manager (see each page). - Backup / restore:
mongodumpandmongorestore, provided by themongodb-database-toolspackage.
Security
By default, mongod starts without authentication and only listens on
127.0.0.1. The default bind is therefore localhost: the risk comes from
deliberate exposure. Never expose port 27017 without having enabled
security.authorization: enabled and restricted net.bindIp — many MongoDB
instances exposed without authentication have been compromised at scale.
Choose your platform above for the exact commands.