How to connect to mongodb cluster using ssl ca

I have mongodb database cluster in scalegrid, but I can’t connect to it with just like this :

MONGO_URL=mongodb:// meteor run

I tried to use simple mongo connection in terminal

mongo mongodb://

and stil cant connect with same error :
SSL peer certificate validation failed: self signed certificate

and I tried to make it like this :

mongo mongodb:// --ssl --sslCAFile ./.crt

and it works!!!

the problem now, i cant add --ssl --sslCAFile ./.crt in MONGO_URL like this, because it makes error :

MONGO_URL=mongodb:// --ssl --sslCAFile ./.crt meteor run

how to add ssl cert to mongo url?

new update I tried :

MONGO_URL=mongodb://,ssl_ca_certs=./.crt meteor run

and got error :

MongoNetworkError: failed to connect to server [] on first connect [MongoNetworkError: connection 0 to closed

I’ve just had the same problem and I’ve found the solution in the Meteor API docs (
which I found from this stackoverflow reply

I finally had to add my public IP (whether the one on your dev machine if connecting to the remote db, or your hosting provider’s) to the list of CIDR IPs (under Firewall Rules).

Hope this helps