Elastic and Kibana Install (Windows)

This guide walks through the steps to set up a single node Elasticsearch cluster and an instance of Kibana. It should take around 2 hours to complete the Elastic and Kibana install.

If you are setting up a production environment, you will want to set up an Elasticsearch cluster. More information on this can be found on the ElasticSearch website.

The Elastic token needed to configure Kibana is only valid for 30 minutes. Once Elastic has been extracted you have 30 minutes to Install and Configure Kibana. 
It is not a long process but it's important you have that time to complete these steps.

Prerequisites


Folder Structure Set Up

A specific folder structure is needed for the installation of Elasticsearch and Kibana. You can create this structure using a PowerShell query or manually.

PowerShell

mkdir C:\Apps;
mkdir C:\InsightEngine;
mkdir C:\Downloads;
mkdir C:\Utils
Manual

In your chosen file location create 4 folders.


Download Software

Start-BitsTransfer -Source "https://nssm.cc/release/nssm-2.24.zip" -destination "C:\Downloads";
Start-BitsTransfer -Source "https://github.com/notepad-plus-plus/notepad-plus-plus/releases/download/v8.4.9/npp.8.4.9.Installer.x64.exe" -destination "C:\Downloads";
Start-BitsTransfer -Source "https://www.7-zip.org/a/7z2201-x64.exe" -destination "C:\Downloads";
Start-BitsTransfer -Source "https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.17.3-windows-x86_64.zip" -destination "C:\Downloads";
Start-BitsTransfer -Source "https://artifacts.elastic.co/downloads/kibana/kibana-8.17.3-windows-x86_64.zip" -destination "C:\Downloads"


Extract Software

The Elastic, Kibana, nssm and InsightEngine zip files need to be extracted.

PowerShell

Expand-Archive -Force C:\Downloads\elasticsearch-8.17.3-windows-x86_64.zip C:\Apps;
Expand-Archive -Force C:\Downloads\Kibana-8.17.3-windows-x86_64.zip C:\Apps;
Expand-Archive -Force C:\Downloads\nssm-2.24.zip C:\Utils;
Expand-Archive -Force C:\Downloads\insightengine-win.2025.5.7.zip C:\InsightEngine
Manual

ElasticSearch -

Kibana -

nssm -

Insight Engine -


Elastic Configuration

$Filename = "C:\Apps\elasticsearch-8.17.3\config\elasticsearch.yml";
((Get-Content -path $Filename -Raw) -replace '#cluster.name: my-application','cluster.name: ') | Set-Content -Path $Filename;
((Get-Content -path $Filename -Raw) -replace '#node.name:','node.name:') | Set-Content -Path $Filename;
((Get-Content -path $Filename -Raw) -replace '#path.data: /path/to/data','path.data: C:\Apps\Data') | Set-Content -Path $Filename;
((Get-Content -path $Filename  -Raw) -replace '#path.logs: /path/to/logs','path.logs: C:\tmp\logs') | Set-Content -Path $Filename;
((Get-Content -path $Filename -Raw) -replace '#network.host: 192.168.0.1','network.host: 0.0.0.0') | Set-Content -Path $Filename;
((Get-Content -path $Filename -Raw) -replace '#discovery.seed_hosts:','discovery.seed_hosts:') | Set-Content -Path $Filename;
((Get-Content -path $Filename -Raw) -replace 'host1','0.0.0.0') | Set-Content -Path $Filename;
((Get-Content -path $Filename -Raw) -replace ', "host2"','') | Set-Content -Path $Filename;
((Get-Content -path $Filename -Raw) -replace '#cluster.initial_master_nodes:','cluster.initial_master_nodes:') | Set-Content -Path $Filename;
((Get-Content -path $Filename -Raw) -replace ', "node-2"]',']')  | Set-Content -Path $Filename

Install Elastic

PowerShell Hint

Your PowerShell will continue to auto scroll down as the process remains running. If you select and highlight a section of the prompt window the auto scroll will stop. This will make it easier to find your password and token.

Elastic needs to be installed as a service and this can be done with a PowerShell script.

cd C:\Apps\elasticsearch-8.17.3;
.\bin\elasticsearch.bat 
  • Do not close the PowerShell when this script has finished.

Do not close this PowerShell yet.


Install Kibana

cd C:\Apps\kibana-8.17.3\bin;
.\kibana.bat

Do not close this PowerShell yet.


Update Elastic License


Create Elastic Certificate

cd C:\Apps\elasticsearch-8.17.3\bin;
.\elasticsearch-certutil ca
./elasticsearch-certutil cert -ca C:\Apps\elasticsearch-8.17.3\elastic-stack-ca.p12;

Copy Certificates

You need to create a new certs folder and copy the certs to that folder.

mkdir C:\Apps\certs;

copy-item C:\Apps\elasticsearch-8.17.3\*.p12 -Destination C:\Apps\certs

move C:\Apps\elasticsearch-8.17.3\*.p12 C:\Apps\elasticsearch-8.17.3\config\certs

Secure Connection Configuration

This updates a number of configurations need to add Xpack security. This improves the security between Kibana and Elastic.

$Filename="C:\Apps\elasticsearch-8.17.3\config\elasticsearch.yml";

((Get-Content -path $Filename -Raw) -replace 'http.p12','elastic-certificates.p12') | Set-Content -Path $Filename

((Get-Content -path $Filename -Raw) -replace 'transport.p12','elastic-certificates.p12') | Set-Content -Path $Filename;

((Get-Content -path $Filename -Raw) -replace '#action.destructive_requires_name: false','action.destructive_requires_name: true') | Set-Content -Path $Filename;

(Get-Content -path $Filename) | ? {$_.trim() -ne "" } | set-content $Filename

Elastic Keystore Setup

The certificate password is used in a number of places and needs to be updated to match the certificate password you just set.

cd C:\Apps\elasticsearch-8.17.3\bin;
.\elasticsearch-keystore add xpack.security.transport.ssl.keystore.secure_password
.\elasticsearch-keystore add xpack.security.transport.ssl.truststore.secure_password
.\elasticsearch-keystore add xpack.security.http.ssl.keystore.secure_password
.\elasticsearch-keystore add xpack.security.http.ssl.truststore.secure_password

Kibana SSL Configuration

$Filename="C:\Apps\Kibana-8.17.3\config\kibana.yml";

((Get-Content -path $Filename -Raw) -replace '#elasticsearch.ssl.verificationMode: full','elasticsearch.ssl.verificationMode: none') | Set-Content -Path $Filename

Install Elastic Service

C:\Apps\elasticsearch-8.17.3\bin\elasticsearch-service.bat install
C:\Apps\elasticsearch-8.17.3\bin\elasticsearch-service.bat start

Install Kibana Service

C:\Utils\nssm-2.24\win64\nssm.exe install insightenginekibana
C:\Utils\nssm-2.24\win64\nssm.exe start "insightenginekibana"

Last updated