Install Elasticsearch, Kibana and APM Server - Development Environment

This step is required for both Environment Watch and Data Grid Audit
How to Unblock Downloaded Files
If you download a .zip or other file from the internet, Windows may block the file and prevent it from running correctly. To unblock a file:
Right-click the downloaded file and select Properties.
In the General tab, check the box for Unblock at the bottom (if present).
Click Apply and then OK.

Step 1: Download and Install Elasticsearch 8.17.3 on one server
Download Elasticsearch 8.17.3
- Visit Elastic’s official download page.
- Download the 8.17.3 Windows .zip version.
- Before extracting, see How to Unblock Downloaded Files.
- Extract the files to
C:\elastic
Install and Configure Elasticsearch 8.17.3
Open an elevated PowerShell and run the following command to start Elasticsearch and perform the auto installation steps:
CopyC:\elastic\elasticsearch-8.17.3\bin\elasticsearch.batWhen starting Elasticsearch for the first time, security features are enabled and configured by default:
- Authentication and authorization are enabled, and a password is generated for the elastic built-in superuser.
- Certificates and keys for TLS are generated for the transport and HTTP layer, and TLS is enabled and configured with these keys and certificates.
- An enrollment token is generated for Kibana, which is valid for 30 minutes.
Save the token for future reference. Once the enrollment token is displayed, you need to stop Elasticsearch so you can proceed with the next steps. To do this, return to the PowerShell window where Elasticsearch is running and press
Ctrl+Con your keyboard. This will safely terminate the process. The enrollment token will look similar to:CopyEnrollment token for Kibana:
eyJ2ZXIiOiI4LjE3LjMiLCJ...<rest_of_token>To stop Elasticsearch after you have copied the enrollment token, click inside the PowerShell window and press
CtrlandCat the same time. This will end the running process.Open an elevated PowerShell and run the following command to install Elasticsearch as a Windows service:
CopyC:\elastic\elasticsearch-8.17.3\bin\elasticsearch-service.bat installThe output will look similar to:
CopyInstalling service : "elasticsearch-service-x64"
Using JAVA_HOME (64-bit): C:\Program Files\Java\jdk-17
The service 'elasticsearch-service-x64' has been installed.
Run Elasticsearch as a Windows Service
- Open an elevated PowerShell and run the following command to start the Elasticsearch service:
CopyThe output will look similar to:
C:\elastic\elasticsearch-8.17.3\bin\elasticsearch-service.bat startCopyStarting service : "elasticsearch-service-x64"
The service 'elasticsearch-service-x64' has been started.
- Open an elevated PowerShell and run the following command to start the Elasticsearch service:
Enable Stack Monitoring
- Navigate to the Elasticsearch configuration folder (e.g.,
C:\elastic\elasticsearch-8.17.3\config) and open the elasticsearch.yml file. - Add the following line to enable Stack Monitoring:
Copy
xpack.monitoring.collection.enabled: true - Save the changes and restart the Elasticsearch service by opening an elevated PowerShell and running the following command:
Copy
Restart-Service -Name "elasticsearch-service-x64"
- Navigate to the Elasticsearch configuration folder (e.g.,
Reset the Elastic (Admin) User Password
The following command resets the password for the
elasticuser, which is the default superuser (admin) account in Elasticsearch. This account is required for logging in to Kibana and for performing administrative tasks such as managing users, roles, and system settings.Navigate to ElasticSearch's bin folder(
C:\elastic\elasticsearch-8.17.3\bin)Open an elevated PowerShell and run the following command:
Copy.\elasticsearch-reset-password -u elasticWhen prompted, press 'Y' to confirm and reset the password

When you run this command, a new password will be generated and displayed in the console output.
The password is shown only once and cannot be retrieved later. Immediately record and securely store the password according to your organization’s credential management and security policies. You will need this password for future authentication to Elasticsearch and Kibana.
Install the 'mapper-size' plugin
- Open an elevated PowerShell and run the following command to install the 'mapper-size' plugin:
Copy
C:\elastic\elasticsearch-8.17.3\bin\elasticsearch-plugin install mapper-size - To verify the 'mapper-size' plugin is installed, run:
Copy
C:\elastic\elasticsearch-8.17.3\bin\elasticsearch-plugin list - Restart the Elasticsearch Service. To restart the Elasticsearch service, run the following in an elevated PowerShell session:
CopyThe output will look similar to:
Restart-Service -Name "elasticsearch-service-x64"CopyWARNING: Waiting for service 'Elasticsearch 8.17.3 (elasticsearch-service-x64) (elasticsearch-service-x64)' to stop...
- Open an elevated PowerShell and run the following command to install the 'mapper-size' plugin:
Verify Elasticsearch Server
To verify Elasticsearch is running, open an elevated Command Prompt and run the following command (replace
<username>,<password>, and<hostname_or_ip>with your actual values):Copycurl -u <username>:<password> -k https://<hostname_or_ip>:9200The response should show basic cluster information in JSON format if the server is running and accessible.
Sample JSON response
Copy{
"name" : "emttest",
"cluster_name" : "elasticsearch",
"cluster_uuid" : "q5VtYDCQT2iNHU9dOdqomw",
"version" : {
"number" : "8.17.3",
"build_flavor" : "default",
"build_type" : "zip",
"build_hash" : "a091390de485bd4b127884f7e565c0cad59b10d2",
"build_date" : "2025-02-28T10:07:26.089129809Z",
"build_snapshot" : false,
"lucene_version" : "9.12.0",
"minimum_wire_compatibility_version" : "7.17.0",
"minimum_index_compatibility_version" : "7.0.0"
},
"tagline" : "You Know, for Search"
}
Step 2: Install and Configure Kibana
Download Kibana 8.17.3
- Download and extract the 8.17.3 Windows .zip version of Kibana from Elastic’s official Kibana download page.
- Before extracting, see How to Unblock Downloaded Files.
Start Kibana from the command line
- Navigate to Kibana's
binfolder (e.g.,C:\elastic\kibana\bin). - Open an elevated PowerShell and run the following command:
Copy
C:\Kibana\kibana-8.17.3\bin\kibana.bat - If successful, you should see output indicating that the Kibana server has started and is listening on port 5601. Look for lines similar to:
Copy
[INFO][server][http] http server running at http://localhost:5601
...
kibana has not been configured
Go to https://localhost:5601/?code=xyz to get started
- Navigate to Kibana's
Enroll Kibana
In your terminal, click the generated link to open Kibana in your browser.
In your browser, paste the enrollment token that was generated in the terminal when you started Elasticsearch, then click the Configure Elastic button to connect your Kibana instance with Elasticsearch. See where the enrollment token is generated.
If the token has expired, generate a new one by running the following command in the Elasticsearch's bin folder (e.g.,
C:\elastic\elasticsearch-8.17.3\bin).CopyC:\elastic\elasticsearch-8.17.3\bin\elasticsearch-create-enrollment-token --scope kibanaSample output
eyJ2ZXIiOiI4LjE0LjAiLCJhZHIiOlsiMTAuMC4yLjI6OTIwMCJdLCJmZ3IiOiI4ZGE1MWZkYTExZmM1ZDAwNDBhZWZlNTJlNmRiYzQ5ZTM2NmYxYTkyOGIwY2NiMzExOGY0MWFjZTczODNkZDliIiwia2V5IjoiOGFfc1BKZ0Jra09qNlh6dngycS06bG5sWkNEMnpSbFNiZjZZclpRSHF6dyJ9Log in to Kibana as the
elasticuser with the password that was generated when you started Elasticsearch.See the screenshot below for the login screen:

Generate Kibana encryption keys
Skipping the steps below will cause the Relativity Server CLI to fail.
Open an elevated PowerShell and run the following command:
CopyC:\Kibana\kibana-8.17.3\bin\kibana-encryption-keys generateIf successful, you will see output showing the generated encryption keys. For example:
Sample output
Copyxpack.encryptedSavedObjects.encryptionKey: "<randomly-generated-key-1>"
xpack.reporting.encryptionKey: "<randomly-generated-key-2>"
xpack.security.encryptionKey: "<randomly-generated-key-3>"Copy the generated encryption keys and paste them at the end of your
kibana.ymlfile (e.g.,C:\Kibana\kibana-8.17.3\config\kibana.yml). The configuration should look similar to:Sample kibana.yml configuration
Copyxpack.encryptedSavedObjects.encryptionKey: "<randomly-generated-key-1>"
xpack.reporting.encryptionKey: "<randomly-generated-key-2>"
xpack.security.encryptionKey: "<randomly-generated-key-3>"Restart the Kibana service, by opening an elevated PowerShell and run the following command:
CopyC:\Kibana\kibana-8.17.3\bin\kibana.batTo verify success, check the terminal output for lines indicating that Kibana has started successfully. You can also refer to the screenshots below:

After Kibana has restarted, open a browser and go to
http://<hostname_or_ip>:5601.Log in using the
elasticusername and the password you generated earlier. This verifies that Kibana is running and your credentials are working.
For more details, refer to the official documentation: https://www.elastic.co/guide/en/kibana/current/kibana-encryption-keys.html
Create Kibana Windows Service
Running Kibana as a Windows Service is Optional Environment Watch does NOT require Kibana to run as a Windows service, nor does it require the use of NSSM. NSSM is a commonly used open-source tool to help run applications as services, but it is not mandatory. You can run Kibana manually from the command line if you prefer, and this will work perfectly for development and most production scenarios. Only use NSSM if you want Kibana to start automatically as a service on Windows. If you do not wish to use NSSM, simply run
kibana.batmanually.CopyC:\Kibana\kibana-8.17.3\bin\kibana.batDownload the latest NSSM executable from https://nssm.cc/download and place it in the C drive (e.g.,
C:\nssm-2.24).Kibana does not install as a Windows service by default. We recommend using NSSM — a commonly used open-source tool—to run Kibana as a Windows service.
Open an elevated PowerShell and run the following command:
CopyC:\nssm-2.24\win64\nssm.exe install kibanaThis will open a popup to create a Windows service for Kibana.
In the Application tab, enter the path to
kibana.batand its folder as shown below:
Editing Kibana Service Properties: If you accidentally install the Kibana service before completing your configuration (for example, by pressing Return too early in the NSSM dialog), you can easily edit the service properties afterward. This allows you to update the application path, log file settings, or other options without reinstalling the service. To edit the service properties, open an elevated PowerShell and run the following command:
C:\nssm-2.24\win64\nssm.exe edit kibanaIn the I/O tab, enter the full path of a log file where the service logs will be stored. For example, create a folder in the Kibana directory (e.g.,
C:\Kibana\kibana-8.17.3\service_logs) and a blank log file (e.g.,C:\Kibana\kibana-8.17.3\service_logs\kibana_service.log).Copy the full log file path into the stdout and stderr sections:

In the File rotation tab, check all boxes and enter
10485760bytes so a new log file is generated for every 10 MB of logs:
Click the Install service button to create the Windows service for Kibana.
Go to the Services app in Windows, search for the
kibanaservice, right click, and start the service.Right click on the service and open Properties to change the startup type to Automatic, so Kibana runs automatically on system startup.
Verify that Kibana is running by opening it in your browser.
It is normal for Kibana to take 1-5 minutes to become accessible after starting the service, depending on your system. Please be patient while it starts up.
Verify Kibana Server
Open a browser and go to
http://<hostname_or_ip>:5601.Log in using the
elasticcredential to verify successful access.

Step 3: Install and Configure APM Server
Prerequisites to setup APM Server
- Elastic and Kibana should be configured and services should be up and running.
Download APM Server 8.17.3
- Visit Elastic’s APM Server page.
- Download and extract the 8.17.3 Windows .zip file.
- Before extracting, see How to Unblock Downloaded Files.
- Extract the files to
C:\.
Configure APM Server (
C:\apm-server-8.17.3-windows-x86_64\apm-server.yml)An API key is required for configuring both APM and Beats. To create an API key:
Log in to Kibana (
http://<hostname_or_ip>:5601) using theelasticcredential.Use the global search at the top of Kibana to search for "API keys" and select it from the results.
Click the Create API key button.
Enter a name for your API key (for example, specify if it will be used for Beats or APM).
Click the Privileges dropdown and select Beats to automatically apply the recommended permissions for Beats.
Click Create API key.
Copy and securely save the generated
idandapi_keyvalues.
Copy and save
idandapi_keyvalues immediately and store them securely according to your organization’s credential management and security policies.
Navigate to the apm-server folder (e.g.,
C:\apm-server-8.17.3-windows-x86_64) and open theapm-server.ymlfile using a text editor.Update the
apm-server.ymlfile to match the following sample configuration. Replace the placeholder values (<apm-server-hostname_or_ip>,<elasticsearch-hostname_or_ip>,<id>,<api-key>) as needed for your environment. Below is a sample configuration:Copyapm-server:
host: "<apm-server-hostname_or_ip>:8200"
output.elasticsearch:
hosts: ["<elasticsearch-hostname_or_ip>:9200"]
protocol: "https"
api_key: "<id>:<api-key>"
ssl.enabled: true
ssl.verification_mode: none
instrumentation:
enabled: true
environment: production
hosts:
- "http://<apm-server-hostname_or_ip>:8200"
Execute required scripts to install APM Server as a Windows service
Open an elevated PowerShell.
Run the following command to install the APM Server as a Windows service:
CopyPowerShell.exe -ExecutionPolicy UnRestricted -File C:\apm-server-8.17.3-windows-x86_64\install-service.ps1The output will look similar to:
CopyInstalling service apm-server...
Service "apm-server" has been successfully installed.
Start the APM Server service
Open an elevated PowerShell and run the following command:
CopyStart-Service -Name "apm-server"Once the instrumentation is set, you can verify it in Kibana as shown below:

Verify APM Server
Open an elevated Command Prompt and run the following command (replace
<hostname_or_ip>with your actual value):Copycurl -k http://<hostname_or_ip>:8200The response should indicate
publish_readyistrueand will look similar to:Copy{
"build_date": "2025-02-27T18:17:35Z",
"build_sha": "f6b917b725e1a22af433e5b52c5c6f0ff9164adf",
"publish_ready": true,
"version": "8.17.3"
}
Step 4: Additional Setup and Verification
Add Elastic APM Integration Package
Skipping the steps below will cause the Relativity Server CLI to fail.
Login to Kibana and select the Elastic APM under Integration, or in the search bar type "Elastic APM" and select it under Integration.

In the top right, select the Add Elastic APM button.

Add an Integration name and for server configuration. Update apm hostname and apm url.
Ex: Host: <hostname_or_ip>:8200
URL: http://<hostname_or_ip>:8200Click on Save and Continue.

Select Add Elastic Agent later button as Agent is not required for the initial setups.

Verify APM Data View
Before proceeding with EW CLI, check if the APM Data View is created in Kibana:
Open a browser and go to http://<hostname_or_ip>:5601
Log in using elastic credentials
Navigate to Discover, or type
Discoverin the search bar.Confirm the APM Data View is present:

Verify Cluster Health
Open an elevated Command Prompt and run the following command (replace
username,password, andhostname_or_ipwith your actual values):Copycurl -u <username>:<password> -k https://<hostname_or_ip>:9200/_cat/healthYou should see a response similar to:
Copy1690219200 10:00:00 elasticsearch green 1 1 0 0 0 0 0 0 - 100.0%The word
greenin the response means the cluster is healthy. The wordyellowin the response means the cluster is partially healthy. If you seered, investigate further.