I have a Express.js application running on DO Apps Platform. I want to attach a Managed Mongo DB component to it but the DATABASE_URL is not connecting with the App.

I am getting this error

App starting error:  MongooseServerSelectionError: self signed certificate in certificate chain

I know the reason behind this. Because i am not specifying the crt file. But i don’t know how to add the crt file in the production. If i just include it in the source files wouldn’t it be a security concern?

Is there any better way to attach mongoDB component to a DO Apps?

Note: I am using Node.js and Mongoose

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.

Here’s a workaround.

ALERT: Not recommended and secured for production. Makes MITM attacks possible. Do so at your own risk.

In your NodeJS component on App Platform, add this as an environment variable


There are safer workarounds to the above though, but for quickly prototyping, the above is fine