Install Elasticsearch and Kibana: Complete Setup Guide
Installing Elasticsearch and Kibana
In the previous lesson, you learned how Elasticsearch stores data as documents, organizes them into indices, and creates searchable indexes.
Now it's time to set up Elasticsearch on your computer.
Don't worry if you've never installed a server before. In this lesson, we'll go step by step and explain what each component does, not just how to install it.
By the end of this lesson, you'll be able to:
- Understand the software required to run Elasticsearch.
- Learn what Kibana is and why it's useful.
- Install Elasticsearch.
- Install Kibana.
- Verify that both are running correctly.
- Understand what happens after installation.
Before We Begin
Elasticsearch is not like a regular application that opens a graphical window.
Instead, it runs as a background server that waits for requests from applications or users.
Think of it like a restaurant kitchen.
- Customers don't enter the kitchen.
- They place orders.
- The kitchen prepares the food.
- The food is sent back.
Similarly:
Application
│
▼
Elasticsearch Server
│
▼
Search Results
Elasticsearch waits for search requests and returns the requested data.
What Do You Need?
Before installing Elasticsearch, make sure your computer has:
- A 64-bit operating system
- At least 4 GB RAM (8 GB recommended)
- Internet connection
- Administrator access
Modern versions of Elasticsearch include a compatible Java Runtime, so you typically do not need to install Java separately.
What is Kibana?
If Elasticsearch is the engine, then Kibana is the dashboard.
Kibana is a web-based interface that allows you to:
- View data stored in Elasticsearch.
- Run search queries.
- Create charts and graphs.
- Build dashboards.
- Monitor Elasticsearch.
Without Kibana, you would interact with Elasticsearch mainly through APIs or command-line tools.
Installation Overview
The installation process looks like this:
Download Elasticsearch
│
▼
Install Elasticsearch
│
▼
Start Elasticsearch
│
▼
Download Kibana
│
▼
Install Kibana
│
▼
Connect Kibana to Elasticsearch
│
▼
Open Kibana in Browser
Step 1: Download Elasticsearch
Visit the official Elasticsearch downloads page and choose the version that matches your operating system (Windows, macOS, or Linux).
Always download Elasticsearch from the official Elastic website to ensure you receive the latest stable and secure version.
Step 2: Extract the Files
After downloading:
- Locate the compressed file.
- Extract it to a folder.
- Open the extracted folder.
You'll see several directories such as:
bin/
config/
data/
logs/
modules/
plugins/
Don't worry about these folders yet—you'll learn their purpose later.
Understanding the Main Folders
Folder | Purpose |
| bin | Contains files used to start Elasticsearch. |
| config | Stores configuration settings. |
| data | Stores indexed data. |
| logs | Stores log files for troubleshooting. |
| modules | Contains built-in Elasticsearch modules. |
| plugins | Stores additional plugins you install. |
Step 3: Start Elasticsearch
Go to the bin folder.
Run the Elasticsearch startup file for your operating system.
When Elasticsearch starts successfully, you'll see messages indicating that the server has started.
The first startup may take a little longer because Elasticsearch performs initial setup tasks.
Step 4: Verify Elasticsearch is Running
By default, Elasticsearch runs on:
Open your web browser and visit that address.
If everything is working, you'll receive a JSON response showing information about your Elasticsearch instance.
This confirms that the server is running correctly.
What Does "localhost" Mean?
Many beginners find this confusing.
localhost simply refers to your own computer.
When you visit:
your browser communicates with the Elasticsearch server running on the same machine.
No internet connection is required for this local communication.
Step 5: Download Kibana
Next, download Kibana.
It should generally match the version of Elasticsearch you're using to avoid compatibility issues.
Extract the downloaded files just as you did for Elasticsearch.
Step 6: Start Kibana
Navigate to Kibana's bin folder and run the startup file.
Kibana will connect to your local Elasticsearch instance.
The first startup can take a minute or two.
Step 7: Open Kibana
By default, Kibana runs on:
Open this address in your browser.
If everything is configured correctly, you'll see the Kibana interface.
From here, you can:
- Explore data.
- Run search queries.
- Create dashboards.
- Visualize information.
How Elasticsearch and Kibana Work Together
User
│
▼
Kibana Dashboard
│
▼
Elasticsearch
│
▼
Stored Documents
Kibana sends requests to Elasticsearch.
Elasticsearch processes those requests and returns the results.
Kibana then displays the results in an easy-to-understand format.
Common Installation Issues
Issue 1: Port Already in Use
If another application is using port 9200 or 5601, Elasticsearch or Kibana may fail to start.
Solution: Stop the conflicting application or configure Elasticsearch/Kibana to use a different port.
Issue 2: Firewall Blocking Access
Sometimes your operating system's firewall may prevent access to the local server.
Solution: Allow Elasticsearch and Kibana through the firewall if prompted.
Issue 3: Insufficient Memory
Elasticsearch requires adequate memory to run efficiently.
Solution: Close unnecessary applications or adjust Elasticsearch's memory settings if needed.
Issue 4: Version Mismatch
Using different versions of Elasticsearch and Kibana can lead to connection problems.
Solution: Install matching versions whenever possible.
Why Install Kibana?
Although you can interact with Elasticsearch using APIs, Kibana makes learning much easier because you can:
- See your data visually.
- Write and test queries.
- Create dashboards without writing extensive code.
- Monitor the health of your Elasticsearch instance.
For beginners, Kibana is the easiest way to explore Elasticsearch.










