Join us at MongoDB.local London on 7 May to unlock new possibilities for your data. Use WEB50 to save 50%.
Register now >
Docs Menu
Docs Home
/

Default MongoDB Port

The following table lists the default TCP ports used by MongoDB:

Default Port
Description

27017

Default port for mongod and mongos. Change this port with port or --port.

27018

Default port for mongod when using the --shardsvr command-line option or clusterRole set to shardsvr in a configuration file.

27019

Default port for mongod when using the --configsvr command-line option or clusterRole set to configsvr in a configuration file.

27020

Default port on which mongocryptd listens for messages. MongoDB Enterprise Server includes mongocryptd, which supports automatic encryption operations.

Back

DDL Operations