Kibana Installation Guide for Windows
I previously wrote an installation guide for a single-node Elasticsearch on Windows (Elasticsearch Installation Guide for Windows). After spending 2–3 days researching, I finally managed to set up the Kibana environment as well. I wanted to write down these notes while they were still fresh in my mind, although I got stuck on SSL for a while and it took me two weeks to finally finish this post.
Download and Installation
- Go to the official website to download the Windows version of Kibana.
- URL: https://www.elastic.co/downloads/kibana.
- Download the Windows .zip file.
Directory Structure Explanation
- bin: Directory for executable files.
- config: Directory for configuration files.
- node: Contains the Node.js runtime environment; Kibana uses Node.js as its runtime.
- node_modules: Stores the Node.js packages required by Kibana.
- packages: Core libraries and dependency packages.
- plugins: Directory for plugins.
- src: Kibana source code.
- x-pack: Paid features of the Elastic Stack.
- .i18nrc.json: Internationalization (i18n) configuration file for language localization.
YAML Configuration File (config/kibana.yml)
Network Settings
# Network settings
network.host: 0.0.0.0 # localhost is for local access only, 0.0.0.0 allows all connections. If you only want specific network interfaces to accept connections, you can specify a concrete IP address.
http.port: 5601 # Default is 5601; only set this if you need to use a different port.Elasticsearch Settings
Kibana connects to Elasticsearch using the
kibana_systemaccount. I was stuck here for a while because I kept trying to connect using the credentials I manually created in Elasticsearch, which caused Kibana to fail to start.When setting up Elasticsearch, three system accounts are generated:
elastic,kibana_system, andlogstash_system, along with their corresponding random passwords. If, like me, you didn't notice or save the random passwords during service setup, you can reset them by running the following command in the Elasticsearch bin folder. The password will be displayed on the console.bashelasticsearch-reset-password -u kibana_systemWhen I previously created the SSL certificates for Elasticsearch, the
elasticsearch-ssl-http.zipcontained akibanafolder. I placed that folder under the Kibanabindirectory.yaml# Set the URL of the Elasticsearch node to connect to. Use an IP or Domain here, not localhost. elasticsearch.hosts: ["https://127.0.0.1:9200"] # Username and password for connecting to Elasticsearch elasticsearch.username: "kibana_system" elasticsearch.password: "pass" # If ELK has SSL enabled, place the previously generated certificates under the Kibana directory elasticsearch.ssl.certificateAuthorities: [ "certs/kibana/elasticsearch-ca.pem" ]
Language Settings
# Supported languages are the following: English (default) "en", Chinese "zh-CN", Japanese "ja-JP", French "fr-FR".
i18n.locale: "zh-CN"Configuring SSL Certificates
I took a shortcut here and simply copied the http.p12 file from Elasticsearch to the Kibana directory.
server.ssl.enabled: true
server.ssl.keystore.path: "certs/elasticsearch/http.p12"Just like with Elasticsearch, you can store sensitive information in the keystore.
Run the following command in the
binfolder to create a keystore:bashkibana-keystore createIf created successfully, you will see the following message:
bashCreated Kibana keystore in D:\ELK\kibana-8.17.1\config\kibana.keystoreAdd the SSL certificate password to the keystore:
bashkibana-keystore add server.ssl.keystore.passwordWhen you see the following message, enter the password for
http.p12:bashEnter value for server.ssl.keystore.password:
Starting the Service
Manual Startup
Open Command Prompt with administrator privileges.
Switch to the
bindirectory:bashcd D:\ELK\kibana-8.17.1\binExecute:
bashkibana.batWait for the startup to complete, then open your browser to test: http://localhost:5601 or https://localhost:5601.
Note: During the first execution, after the CMD shows the message below, it will continue to load other information. If it doesn't appear, there might be an error. You can check the Kibana or Elasticsearch logs to see if there is an issue with Kibana or if the connection to Elasticsearch failed. It is normal for the CMD to stay at this line once started:
Native global console methods have been overridden in production environment.Logging into Kibana
To log into Kibana, use the
elasticaccount. This is the default superuser account for Elasticsearch and has full permissions.If you forget the password, you can reset it by running the following command in the Elasticsearch
binfolder:bashelasticsearch-reset-password -u elasticUsing the
elasticaccount, you can create other user accounts in the Kibana Management interface:- Find Stack Management -> Security -> Users in the left menu.
- Click the Create user button to create a new user.
- Set the username, password, and appropriate role permissions.
Registering as a Windows Service
I looked into this, but unlike Elasticsearch, Kibana does not have a built-in .bat file to assist with Windows service installation. I see people online using NSSM, but I am not familiar with that tool, so I won't write about it for now. I will write a separate note once I have researched it.
Change Log
- 2025-03-18 Initial version created.
