MongoDB Documentation, Release 3.0.4 195 5.1. Administration Concepts $^{48}$http://docs.mongodb.org/v2.4/reference/configuration-options $^{49}$http://docs.mongodb.org/v2.4/reference/configuration-options This creates a config server running on the private IP address 10.8.0.12 on port 27001 . Make sure that there are no port conflicts, and that your config server is accessible from all of your mongos and mongod instances. To set up shards, configure two or more mongod instance using your base configuration (page 193), with the shardsvr value for the sharding.clusterRole setting: Or, if using the older configuration file format$^{49}$: To set up one or three “config server” instances as normal (page 193) mongod instances, and then add the following configuration option: Sharding Configuration Sharding requires a number of mongod instances with different configurations. The con- fig servers store the cluster’s metadata, while the cluster distributes data among one or more shard servers. Note: Config servers are not replica sets . Setting keyFile enables authentication and specifies a key file for the replica set member use to when authenticating to each other. The content of the key file is arbitrary, but must be the same on all members of the replica set and mongos instances that connect to the set. The keyfile must be less than one kilobyte in size and may only contain characters in the base64 set and the file must not have group or “world” permissions on UNIX systems. See also: The Replica Set Security (page 323) section for information on configuring authentication with replica sets. The Replication (page 559) document for more information on replication in MongoDB and replica set configuration in general. Use descriptive names for sets. Once configured, use the mongo shell to add hosts to the replica set. See also: To enable authentication for the replica set , add the following keyFile option: Or, if using the older configuration file format$^{48}$: Replica set reconfiguration . In YAML format security: In YAML format keyFile: /srv/mongodb/keyfile keyFile = /srv/mongodb/keyfile port = 27001 bind_ip = 10.8.0.12 configsvr = true port: 27001 bindIp: 10.8.0.12 net: clusterRole: configsvr sharding: