Question

Having issues setting up MongoDB SSL/TLS

Posted September 27, 2020 151 views
MongoDB

I wanted to try and link my droplet IP to say Cloudflare, ex mongo.example.com and use port 80 or 2095 on Cloudflare. I want to use Cloudflare STRICT but while setting up the SSL cert and keys I ended up getting lost and overflowed with different instructions. I haven’t been able to find any guide or example.
A simple guide or link to a guide or if this is even possible would be nice as I’ve spent way more time on this then I should and want it to be done.

I was able to connect using the IP but not through Cloudflare, even just as a DNS.

I have tried setting my BindIP to a domain, however, this just errors and won’t let mongo start.

Current net config

net:
  tls:
    mode: allowTLS
    certificateKeyFile: /etc/ssl/mongodb.pem
  port: 2095
  • I have removed bindIP and it is there in the actual config.
Submit an answer

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