How to Setup Kibana and Elasticsearch on Windows
Tags: elasticsearch, kibana, windows, tutorial
Published: 2022-10-08 16:21:42

Hi guys, in this article, I will be showing you how to install, configure and connect Kibana to elasticsearch on Windows. In case you missed it, you can install elasticsearch on windows by following the steps defined in the previous article [here](https://dev.to/airscholar/setting-up-elasticsearch-on-windows-1d2l).

## Downloading Kibana
You can download Kibana from the official website [here](https://www.elastic.co/downloads/kibana). Choose windows from the dropdown and click on the download button.
![Downloading Kibana](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2pq0yiyqelo5nh40kk9l.png)

## Configuring Kibana
Once downloaded, extract kibana and navigate into the bin directory inside kibana-8.4.3 folder then Click on kibana.bat.

![the bin folder](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jgzcyrcwwmizohqy43co.png)
You should see Kibana has not been configured. Click on the URL displayed in your terminal to get started.
![kibana url](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/koim3bsofi7kdy70wvkb.png)

Once you navigate to the URL, you should see something like this
![kibana enrolment](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vlu0zc25xewkofqeflq4.png)
Copy and paste the enrolment token from elasticsearch (you can get it by following the steps [here](https://dev.to/airscholar/setting-up-elasticsearch-on-windows-1d2l)) 

If your enrolment token has expired or you get this error message while configuring with enrolment token

![error configuring with enrolment token](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/emq8ud18yp2q61j8lv9v.png)
Use the command below to create a new token then copy and paste the newly generated token into kibana.

`bin/elasticsearch-create-enrollment-token -s kibana`

---

## Configuring Elasticsearch manually
You can click on Configure Manually

![manual configuration](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8ljiunr3ep023s6vv32d.png)
Check address, enter the username and password, check the trust certificate and click on Configure Elastic to continue.

![Manul configuration with username and password](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l7ww0z7r861zn0af9kyk.png)

> I strongly recommend you paste the enrolment token for smooth configuration.

---
If you made it to this point, well done! You are done with the configuration. 

You will be asked to enter username and password (this is the username and password generated for you while setting up elasticsearch.

![Elasticsearch authentication](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/82tnb8yykdtr3c6eioea.png)

In case you forgot your elasticsearch password use the command below to reset it (you should run this command in elasticsearch bin directory)
`elasticsearch-reset-password -u elastic`

![reset elastic password](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q6crauyxxpoampuli7nq.png)

Copy and paste the new password and login. Voila! You are in! 
![elasticsearch homepage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8fd2udmjh28njapilnql.png)

---
If you made it to this point, you have successfully connected Kibana and Elasticsearch.

If you have any questions, you can drop them in the comments section or visit [elastic forum](https://discuss.elastic.co/) to dicuss with other great minds.

Thanks for reading :).