# MongoDB Replica set

**URL:** <https://forum.genieacs.com/t/mongodb-replica-set/819>\
**Category:** Uncategorized\
**Created:** [June 3, 2020, 4:05pm UTC](https://forum.genieacs.com/t/mongodb-replica-set/819 "2020-06-03T16:05:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ahamdaoui](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@ahamdaoui](https://forum.genieacs.com/u/ahamdaoui)\
**Post date:** [June 3, 2020, 4:05pm UTC](https://forum.genieacs.com/t/mongodb-replica-set/819/1 "2020-06-03T16:05:49Z")

</div>

Hello,  
Has anyone ever tried to connect genieacs to a mongodb replica set?

> mongodb://mongodb0.example.com:27017,[mongodb1.example.com:27017](http://mongodb1.example.com:27017),[mongodb2.example.com:27017/?replicaSet=myRepl](http://mongodb2.example.com:27017/?replicaSet=myRepl)

Thanks,  
Abdelhamid

---

<div class="post-metadata">

**Author:** ![picharras](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/picharras/32/346_2.png) [@picharras](https://forum.genieacs.com/u/picharras)\
**Post date:** [December 1, 2020, 1:33am UTC](https://forum.genieacs.com/t/mongodb-replica-set/819/2 "2020-12-01T01:33:11Z")

</div>

Hi @ahamdaoui were you able to complete the connection using replica set? Greetings

---

<div class="post-metadata">

**Author:** ![ahamdaoui](https://avatars.discourse-cdn.com/v4/letter/a/e9bcb4/32.png) [@ahamdaoui](https://forum.genieacs.com/u/ahamdaoui)\
**Post date:** [December 7, 2020, 10:53am UTC](https://forum.genieacs.com/t/mongodb-replica-set/819/3 "2020-12-07T10:53:01Z")

</div>

Hello @picharras, No. Genieacs does not support the replica set URI format (I also tested version 1.2.3).

---

<div class="post-metadata">

**Author:** ![jvkassi](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/jvkassi/32/355_2.png) [@jvkassi](https://forum.genieacs.com/u/jvkassi)\
**Post date:** [December 7, 2020, 1:26pm UTC](https://forum.genieacs.com/t/mongodb-replica-set/819/4 "2020-12-07T13:26:28Z")

</div>

Hello @zaidka can you please help ? We need to support replicatset URI format to add more secondary read only nodes. We also need password authentication for mongodb

**mongodb://username:password@IPs/?replicaSet=xxx&readPreference=secondary**

---

<div class="post-metadata">

**Author:** ![zaidka](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/zaidka/32/9_2.png) [@zaidka](https://forum.genieacs.com/u/zaidka)\
**Post date:** [December 9, 2020, 2:05am UTC](https://forum.genieacs.com/t/mongodb-replica-set/819/5 "2020-12-09T02:05:12Z")

</div>

@jvkassi you should be able to do that using MongoDB’s connection string. Any issues in particular you’re facing?

---

<div class="post-metadata">

**Author:** ![jvkassi](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/jvkassi/32/355_2.png) [@jvkassi](https://forum.genieacs.com/u/jvkassi)\
**Post date:** [December 10, 2020, 7:19am UTC](https://forum.genieacs.com/t/mongodb-replica-set/819/6 "2020-12-10T07:19:10Z")

</div>

My bad, i used MONGODB\_CONNECTION\_URL instead of GENIEACS\_MONGODB\_CONNECTION\_URL
