# Elasticsearch 7.17.x on Windows

Elasticsearch is a distributed, RESTful search and analytics engine designed for scalability, real-time performance, and high availability. It is widely used for log analysis, full-text search, and data indexing.\
This article provides step-by-step instructions for installing and configuring Elasticsearch 7.17.x on a Windows system.

## Prerequisites

Before proceeding with the installation, ensure the following requirements are met:

* **Operating System:** Windows 10 or later (64-bit)
* **Administrative Access:** Required for installation and service configuration
* **Java Development Kit (JDK):** Java 17 installed and configured
* **Environment Variable:** `JAVA_HOME` set to the Java installation path\
  **Reference:** Follow the \[[Java Installation Guide on Windows](https://docs.ovaledge.com/deployment-and-maintenance/installation/java-17.x-on-windows-machine)] for setup instructions.

## Installation Steps

### Download Elasticsearch

Download Elasticsearch 7.17.x from the official OvalEdge repository:

```
https://ovaledge.s3.us-west-1.amazonaws.com/scripts/packages/elasticsearch-7.17.26-windows-x86_64.zip
```

Extract the contents to a preferred location, for example:

```
C:\elasticsearch-7.17.x
```

<figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2Fw8WGRjs2eQ9VCEHAFZRw%2Fimage.png?alt=media&#x26;token=e863e522-44b5-4224-a65f-0138c5f79ce5" alt=""><figcaption></figcaption></figure>

### Install Elasticsearch as a Windows Service

1. Open **Command Prompt** as Administrator.
2. Navigate to the Elasticsearch `bin` directory:<br>

   ```cmd
   cd C:\elasticsearch-7.17.x\bin
   ```

   <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2F0N5Ak8j43CbZnAq7J6z7%2Fimage.png?alt=media&#x26;token=a368bd83-b2b2-409a-9e8f-b4b5cb9caa9c" alt=""><figcaption></figcaption></figure>
3. Run the service installation command:<br>

   ```cmd
   elasticsearch-service.bat install
   ```

   <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FxS8th5yRw0b8buOxWW2k%2Fimage.png?alt=media&#x26;token=791f9675-d463-485b-b583-98728b8f966d" alt=""><figcaption></figcaption></figure>

### Configure JVM Heap Settings

1. Navigate to the configuration directory:<br>

   ```
   C:\elasticsearch-7.17.x\config
   ```

   <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2F74YjH4jWmMLImzDP0cnS%2Fimage.png?alt=media&#x26;token=761f2172-5e57-4772-8c35-416a08e33911" alt=""><figcaption></figcaption></figure>
2. Open **jvm.options** in a text editor (e.g., Notepad++).
3. Uncomment and update the following values based on available memory:<br>

   ```
   -Xms4g
   -Xmx4g
   ```

   <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2F3OI3gqw8Lm5RlZB6j5UE%2Fimage.png?alt=media&#x26;token=b2192b04-bbfc-40f5-87d6-fd06ae4f2c35" alt=""><figcaption></figcaption></figure>

> **Recommendation:** Allocate 50% of available system RAM (maximum 32 GB).

### Configure Elasticsearch Settings

1. Open **elasticsearch.yml** located in the same `config` folder.
2. Add or update the following properties:<br>

   ```yaml
   cluster.name: ovaledge
   network.host: 0.0.0.0
   transport.host: localhost
   transport.tcp.port: 9300
   http.port: 9200
   xpack.security.enabled: true
   ```

   <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FyBv2j3F7myVQwTFvdRHj%2Fimage.png?alt=media&#x26;token=18ca8c38-c956-4fab-9a0d-b389b0c2563f" alt=""><figcaption></figcaption></figure>

   <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FWH8VoxOGE6RgfuGGUHcX%2Fimage.png?alt=media&#x26;token=16a63416-b0b0-4320-9e10-e5d1cdef6f4b" alt=""><figcaption></figcaption></figure>
3. Save and close the file.

### Start the Elasticsearch Service

1. Open the **Windows Services Manager** (`Win + R → services.msc`).
2. Locate the **Elasticsearch** service.<br>

   <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FOnMUfGSoxWYh4cPon2Tp%2Fimage.png?alt=media&#x26;token=8cb67f44-cc59-4283-a262-db6acd3e1597" alt=""><figcaption></figcaption></figure>
3. Right-click and select **Start**.

### Set Password for the Elastic User

1. Navigate to the Elasticsearch `bin` folder.<br>

   <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FQ2IXgpXGwnknHj60T0vj%2Fimage.png?alt=media&#x26;token=e1103625-54e7-4f9c-ad26-4a2e9610a69f" alt=""><figcaption></figcaption></figure>
2. Open **Command Prompt** in that directory and run:<br>

   ```cmd
   elasticsearch-reset-password interactive
   ```

   <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FqoCCpmEbV96Nhae5xzHr%2Fimage.png?alt=media&#x26;token=97a9e052-ca54-4fa7-8f27-0de2c8d09d4e" alt=""><figcaption></figcaption></figure>
3. When prompted, press **y** to continue.<br>

   <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FBlz9OvxRhREHeTF6SU7c%2Fimage.png?alt=media&#x26;token=2e848225-c31c-487d-89a5-d6bf540182d6" alt=""><figcaption></figcaption></figure>
4. Set a password for the `elastic` user.<br>

   <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2F5jDQwFZ7es7i9BFBxsr4%2Fimage.png?alt=media&#x26;token=6b60ad8f-1965-4b21-82a7-2232d76759b8" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**Note:** The utility may require multiple confirmations (\~12 times).
{% endhint %}

### Verify Installation

1. Open a web browser and navigate to:

   ```
   http://localhost:9200
   ```
2. When prompted, enter credentials:
   * **Username:** elastic
   * **Password:** (as configured in the previous step)<br>

     <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FJHJmt4fy2p87ikaSC7oR%2Fimage.png?alt=media&#x26;token=be1e0fbe-a569-4ec5-9778-ad4f1e3fc049" alt=""><figcaption></figcaption></figure>
3. A successful installation returns a JSON response with cluster metadata.<br>

   <figure><img src="https://1813356899-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FhTnkoJQml0pok9awFDhx%2Fuploads%2FGu93AqFutvjvxmtDTsS8%2Fimage.png?alt=media&#x26;token=a52cc396-146c-4dd5-bc4b-60cb553d4376" alt=""><figcaption></figcaption></figure>

***

Copyright © 2025, OvalEdge LLC, Peachtree Corners, GA, USA.
