# ElasticSearch Generated on 16 Jan 2024 from [the ElasticSearch catalog page](https://marketplace.digitalocean.com/apps/elasticsearch) ElasticSearch Droplet 1-Click allows you to create a fully configured and ready-to-use instance of ElasticSearch in a matter of a minute. If you’re looking to deploy ELK (Elastic, Logstash & Kibana) check out the [DigitalOcean ELK Blueprint](https://marketplace.digitalocean.com/apps/elk-blueprint/). Blueprints are Terraform based deployments that allow you to spin up multiple resources at once on DigitalOcean. ## Software Included | Package | Version | License | |---|---|---| | ElasticSearch | Latest | [ELv2](https://www.elastic.co/licensing/elastic-license) | ## Creating an App using the Control Panel Click the **Deploy to DigitalOcean** button to create a Droplet based on this 1-Click App. If you aren’t logged in, this link will prompt you to log in with your DigitalOcean account. [![Deploy to DO](https://www.deploytodo.com/do-btn-blue.svg)](https://cloud.digitalocean.com/droplets/new?image=elasticsearch) ## Creating an App using the API In addition to creating a Droplet from the ElasticSearch 1-Click App using the control panel, you can also use the [DigitalOcean API](https://docs.digitalocean.com/reference/api). As an example, to create a 4GB ElasticSearch Droplet in the SFO2 region, you can use the following `curl` command. You need to either save your [API access token](https://docs.digitalocean.com/reference/api/create-personal-access-token/index.html.md) to an environment variable or substitute it in the command below. ```shell curl -X POST -H 'Content-Type: application/json' \ -H 'Authorization: Bearer '$TOKEN'' -d \ '{"name":"choose_a_name","region":"sfo2","size":"s-2vcpu-4gb","image":"elasticsearch"}' \ "https://api.digitalocean.com/v2/droplets" ``` ## Getting Started After Deploying ElasticSearch On your first [SSH login to the droplet](https://docs.digitalocean.com/products/droplets/how-to/connect-with-ssh/index.html.md) or launch of the Droplet console of your ElasticSearch Droplet 1-Click, you will be greeted by the ElasticSearch Droplet 1-Click Message-Of-The-Day (MOTD). MOTD includes useful information such as credentials for the `elastic` superuser, and credentials for the `kibana` and the `logstash` users as well as Kibana enrollment token. If the MOTD is inaccessible, you can always retrieve credentials by reading the `digitalocean_passwords` file: ``` $ cat /root/.digitalocean_passwords ``` After you have created ElasticSearch Droplet 1-Click, give it a few minutes to start all the services. To test your ElasticSearch Droplet 1-Click, use the `ping` command provided at the bottom of the MOTD: ![motd ping command](https://do-not-delete-droplet-assets.nyc3.digitaloceanspaces.com/Screenshot%202023-09-19%20at%2013.29.43.png) If, after using the `ping` command, you see a JSON response with a tagline *“You Know, for Search”*, your ElasticSearch is operational and ready to accept payloads: ![ping command success](https://do-not-delete-droplet-assets.nyc3.digitaloceanspaces.com/Screenshot%202023-09-19%20at%2013.34.31.png) ## Getting started with ElasticSearch If it is your first time with ElasticSearch, we recommend the official ElasticSearch [How to](https://www.elastic.co/guide/en/elasticsearch/reference/current/how-to.html) guide to getting started with basic configuration. Keep in mind that ElasticSearch Droplet comes with XPACK security enabled and XPACK HTTP/TRANSPORT encryption enabled. By default it ships self-signed SSL certificate, which is enough for development and testing. If you wish to properly secure your ElasticSearch 1-Click with a CA certificate, follow [this](https://www.elastic.co/blog/configuring-ssl-tls-and-https-to-secure-elasticsearch-kibana-beats-and-logstash) guide. ## Droplet Summary - UFW firewall allows only SSH (port 22, rate limited), and 9200 (ElasticSearch) access. - XPACK security enabled. Random passwords are generated for `elastic`, `kibana`, and `logstash_system` users An enrollment token is generated for easy Kibana setup. - Generated passwords can be found in /root/.digitalocean\_password. - ElasticSearch is installed as an APT package - To check the status of the ElasticSearch, use: ``` $ systemctl status elasticsearch.service ``` - ElasticSearch is listening to `0.0.0.0` by default.