On this page
Default MongoDB Port
The following table lists the default TCP ports used by MongoDB:
| Default Port | Description | 
| 27017 | The default port for mongodandmongosinstances. You can change this port withportor--port. | 
| 27018 | The default port for mongodwhen running with--shardsvrcommand-line option or theshardsvrvalue for theclusterRolesetting in a configuration file. | 
| 27019 | The default port for mongodwhen running with--configsvrcommand-line option or theconfigsvrvalue for theclusterRolesetting in a configuration file. |