How to replicate and sync MongoDB localhost to a remote server using replica set
Please use rs.add("host:port") command to add new node to replica set. 

The main problem is that you can NOT mix localhost and IP addresses. If one member is on localhost, every member must be on localhost

You can of course use procedure:

var cfg=rs.conf()
cfg.members
&lt;copy that to text editor and make changes&gt;
cfg.members=&lt;paste here edited members section&gt;
rs.reconfig(cfg)