Default ports for mongoDB : mongod and mongos instances

The defaults ports for mongoDB and mongos instances

by cybersal

The following table lists all the default ports for MongoDB  according to the instance running:

Default Port
Description
27017
The default port for mongod and mongos instances. You can change this port with port or --port.
27018
The default port for mongod when running with --shardsvr command-line option or the shardsvr value for the clusterRole setting in a configuration file.
27019
The default port for mongod when running with --configsvr command-line option or the configsvr value for the clusterRole setting in a configuration file.
27020
The default port from which mongocryptd listens for messages. mongocryptd is installed with MongoDB Enterprise Server (version 4.2 and later) and supports automatic encryption operations.

Related Articles

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More

Privacy & Cookies Policy