MongoDB Documentation, Release 3.0.4 Step 2: Connect a mongo shell to a replica set member. For example, to connect to a mongod running on localhost on the default port of 27017 , simply issue: mongo Step 3: Initiate the replica set. Use rs.initiate() on the replica set member: rs.initiate() MongoDB initiates a set that consists of the current member and that uses the default replica set configuration. Step 4: Verify the initial replica set configuration. Use rs.conf() to display the replica set configuration object (page 652): rs.conf() The replica set configuration object resembles the following: Step 5: Add the remaining members to the replica set. Add the remaining members with the rs.add() method. The following example adds two members: rs.add("mongodb1.example.net") rs.add("mongodb2.example.net") When complete, you have a fully functional replica set. The new replica set will elect a primary . Step 6: Check the status of the replica set. Use the rs.status() operation: rs.status() Deploy Replica Set and Configure Authentication and Authorization (page 353) This procedure describes deploying a replica set in a development or test environment. For a production deployment, refer to the Deploy a Replica Set (page 603) tutorial. This tutorial describes how to create a three-member replica set from three existing mongod instances running with access control (page 324) disabled. To deploy a replica set with enabled access control (page 324), see Deploy Replica Set and Configure Authentication and Authorization (page 353). If you wish to deploy a replica set from a single MongoDB instance, see Convert 605 9.3. Replica Set Tutorials Deploy a Replica Set for Testing and Development See also: { "_id" : "rs0", "version" : 1, "members" : [ { "_id" : 1, "host" : "mongodb0.example.net:27017" } ] }