This to setup you own environment. 1. On server A, B, and C, make sure you install version 4 from https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ made for apt-get. 2. If you have problems, apt-get remove mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools apt-get purge mongodb-org-mongos mongodb-org-server mongodb-org-shell mongodb-org-tools sudo apt-get install -y mongodb-org 3. Server A, B, C to /etc/mongodb.conf add the two lines replication: replSetName: r1 4. To all servers, sudo service mongod stop sudo service mongod start 5. Make sure they not part of anby repicat set, on each server. mongo --eval "rs.status()" 6. First server start mongo rs.initiate() rs.status() # You should see your first server is the only member of the set. rs.add('') rs.status() # 2 memebers should not exist. rs.add('') rs.status() # 3 memebers should not exist.