How to set up MongoDB with Self-managed X.509 Authentication

I created a managed MongoDB while following this:

After creating the DB, I tried changing to auth method to X.509 Authentication and couldn’t find where or how to do it. (In MongoDB Atlas it’s under “security”).

I was wondering if there was a way for me to use a certificate instead of user and password for the authentication?

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Rajkishore J
DigitalOcean Employee
DigitalOcean Employee badge
May 31, 2023


Starting from May 25, 2022, the provisioning of the new MongoDB cluster will include trusted certificates. This means that when setting up new clusters, users will no longer need to download a CA cert for connection and so only use user and password for authentication.

Rest assured, the connections on these new clusters will remain secure, but the additional step of dealing with the CA certificate will no longer be necessary. Please note that existing clusters created prior to this rollout will still require the CA cert for connectivity.

Regards, Rajkishore J

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up