System Collections


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, specifically for replication purposes.


System collections include these collections stored in the admin database:


New in version 2.6.

The admin.system.roles collection stores custom roles that administrators create and assign to users to provide access to specific resources.


Changed in version 2.6.

The admin.system.users collection stores the user’s authentication credentials as well as any roles assigned to the user. Users may define authorization roles in the admin.system.roles collection.


New in version 2.6.

Stores the schema version of the user credential documents.

System collections also include these collections stored directly in each database:


Deprecated since version 3.0: Access this data using listCollections.

The <database>.system.namespaces collection contains information about all of the database’s collections.


Deprecated since version 3.0: Access this data using listIndexes.

The <database>.system.indexes collection lists all the indexes in the database.


The <database>.system.profile collection stores database profiling information. For information on profiling, see Database Profiling.


The <database>.system.js collection holds special JavaScript code for use in server side JavaScript. See Store a JavaScript Function on the Server for more information.

Was this page helpful?

Yes No

Thank you for your feedback!

We're sorry! You can Report a Problem to help us improve this page.