From looking at the configuration, MongoDB is much like MySQL/MariaDB in that it uses a variable to control the bind IP. The default configuration seems to use
bind_ip = 127.0.0.1, which means that it’ll only accept connections locally – remote connections won’t work.
So the option there would be to either comment it out, or bind it to the IP of your Droplet. You’d do this by placing a
# before that line to comment it out, or by changing
127.0.0.1 to that of your Droplet Public IPv4 IP address.
You’d then need to restart MongoDB.
I would, however, keep in mind – much like other database software – it’s not a good idea to openly accept all connections. If you do need to connect remotely, you need to make sure you’ve setup a working firewall (i.e.
ufw on ubuntu) and that you have some sort of rule in place to limit who can connect.