How to install compass while MongoDB server is a 3 nodes primary/secondary cluster on Ununtu?

Dear MongoDB compass experts,

I am new to MongoDB, and just installed MongoDB server is a 3-server primary/secondary cluster on Ununtu servers. I want to install compass so that I could administrate the MongoDB on my laptop (which runs Windows 10). In other words, the MongoDB cluster is on Ubuntu on remote machines, but I want to use compass on my laptop which run Windows.
I have the following questions:

  1. Where should I install compass? On my laptop (windows10), or on the Ubuntu host ?
  2. Since the MongoDB server is a primary/secondary cluster (1 primary + 2 secondary, each has different hostname and IP address). As you know, sometimes if the primary is down, one of the secondary will become the primary, hence how to let compass know the situation and hence always connect to the right server ? Or compass could automatically detect this?

I appreciate your kind help!

Use a connection string(paste when you connect, and then make it a ‘favourite’.



The connection string is made up of ‘seed’ nodes that the client(compass) will connect to and connection options. The host is interrogated and the full list of replicaset hosts are returned.

For small replicasets the seed hosts are all the member. In a larger replicaset you could just select a host from each faliure domain.

The full description of the uri format is:

Thanks for the detailed explanation.

Another question, where should I install compass? On laptop (which I prefer for easy interaction with compass) or on Linux (where MongoDB server are installed) ?

This is a tool I would install on my workstation or an appropriate machine used for administering the DB’s/Environment.

In compass, I met the following error when I pasted the connection string of the 3-replica repliset server

“An error occurred while loading navigation: command hostInfo requires authentication”

The string is:

Did I miss anything here? Also, in the connection string where could I put the uid/pwd credential ?

I appreciate your kind help !

There is a lot to take in on the page but it is there:



1 Like