I followed the guide here:
TL;DR
You have to allow the connection through the linux firewall (ufw) and then bind local ip for mongo server. You would use the digital ocean console to do this. It is pretty straight forward. Just take it step by step.