Skip to content

Add support for MongoDB Replica Set Cluster #504

Closed
Portabase/agent
#107

Description

@douchet-pa

Hi,

It would be nice to have a support for a MongoDB cluster in replica set mode.

Thanks,

Activity

  1. RambokDev commented on Sep 16, 2026

    @RambokDev
    Collaborator

    Hi @douchet-pa,

    Thanks for that. Is it not working when using MongoDB SRV?

    Do you have any information about MongoDB Replica Set clusters, such as documentation or a more detailed use case?

    Thanks for your help.

    Regards,

  2. adrien-dubois commented on Sep 17, 2026

    @adrien-dubois

    I have problem with that too. Developers are making micro services with all Mongo DB, all on premise, and all are with Replica Set, but not necessary with multiple replicas, most part are standalone, but they use it because of certain things accessible just in RS.
    And the problem is to connect to a Mongo DB in RS, even one node, I have to pass ?directConnection=true in my Connection String, otherwise, impossible to connect to the DB.

    Here is a full CS that I need: mongodb://username:password@mongodb:27017?directConnection=true

    Without it, Portabase will not connect to my DB. I tried to cheat on the Database name by putting the query behind the name like this my_database?directConnection=true but it's not working too 😅
    So most of my databases cannot be connected with Portabase at this point.

    Do you think there is a way to put a query in the connection strings?

    Merci,
    Cdt, Adrien

  3. douchet-pa commented on Sep 17, 2026

    @douchet-pa
    Author

    Hi,

    Here's the typical connection string for a replica set :
    mongodb://myDatabaseUser:D1fficultP%40ssw0rd@mongodb0.example.internal:27017,mongodb1.example.internal:27017,mongodb2.example.internal:27017/myDB?replicaSet=myRepl&authSource=admin

  4. linked a pull request that will close this issuefix: mongodb options #505on Sep 17, 2026
  5. linked a pull request that will close this issuefix: mongodb-options #107on Sep 17, 2026
  6. self-assigned this
    on Sep 17, 2026
  7. adrien-dubois commented on Sep 17, 2026

    @adrien-dubois

    @RambokDev wow you're too reactive 😍
    Thanks a lot, I'm waiting for the agent release, and I'll try connecting my DB with that new version

  8. RambokDev commented on Sep 17, 2026

    @RambokDev
    Collaborator

    We added some options to MongoDB in order to extend engine support. Feel free to test them with your use cases and provide feedback.

    https://portabase.io/docs/agent/db/mongodb

    Feel free to ask us to reopen this thread if you need anything else.

    Regards

  9. adrien-dubois commented on Sep 17, 2026

    @adrien-dubois

    Great !! All works great now.
    Big thanks, that was really fast.

    I'm keep going on tests on my development env, but it seems really great. That's the tool I needed.

    Cordialement, Adrien

  10. douchet-pa commented on Sep 17, 2026

    @douchet-pa
    Author

    Thanks for the update.
    I can test it on my side because I create the agent from the cli and the cli is not updated yet.

    Is there a way to "force" the new version for the agent ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions