It’s hard to give a thorough answer without knowing how you want to access your Elasticsearch instance on the other end, but generally there is nothing preventing you from doing so. In your Elasticsearch configuration, you will need to adjust the value of the
network.bind_host setting. On Ubuntu, you can find the configuration file at
substituting your Droplet’s IP address for
It’s important to note that Elasticsearch does not have any built-in access controls. Making your cluster externally accessible also makes it accessible publicly unless you take further steps. I’d strongly recommend using a firewall to limit access to all but a known set of IP addresses. You can also set up basic authentication by using an Nginx proxyin front of Elasticsearch.
Learn how to setup a firewall with UFW on an Ubuntu / Debian cloud server.