Synopsis
MongoDB stores system information in collections that use the
<database>.system.* namespace, which MongoDB reserves for
internal use. Do not create collections that begin with system.
MongoDB also stores some additional instance-local metadata in the
local database local.replset.*
namespace, specifically for replication purposes and in the config
database for sessions information.
MongoDB Atlas and other MongoDB cloud services store essential operational
data in dedicated databases that use the prefix __mdb_internal_*.
Do not access or modify databases with this prefix.
We recommend that you ignore these namespaces in administrative tools. For more
information on these cloud-specific databases, see Internal Databases.
Collections
System collections include these collections stored in the admin database:
admin.system.rolesThe
admin.system.rolescollection stores custom roles that administrators create and assign to users to provide access to specific resources.
admin.system.usersThe
admin.system.userscollection stores the user's authentication credentials as well as any roles assigned to the user. Users may define authorization roles in theadmin.system.rolescollection.
admin.system.versionThe
admin.system.versioncollection stores metadata to support internal operations. Do not modify this collection unless specifically instructed to in this documentation or by a MongoDB support engineer.
System collections include these collections stored in the config
database:
config.system.indexBuildsThe
indexBuildscollection stores information related to in-progress index builds.
config.system.preimagesStores previous versions of modified documents from collections with the changeStreamPreAndPostImages option enabled. The
config.system.preimagescollection is automatically purged when the pre-images expire. For details, seechangeStreamOptions.preAndPostImages.expireAfterSeconds.
Database-Specific Collections
System collections also include these collections stored directly in each database:
<database>.system.profileThe
<database>.system.profilecollection stores database profiling information. For information on profiling, see Database Profiler.
<database>.system.jsThe
<database>.system.jscollection stores special JavaScript code for use in server side JavaScript. See Store a JavaScript Function on the Server for more information.
<database>.system.viewsThe
<database>.system.viewscollection contains information about each view in the database.Starting in MongoDB 5.0, for featureCompatibilityVersion set to
"5.0"or greater, users can no longer write directly to the<database>.system.viewscollection.