What is the Elastic Stack?

The Elastic Stack (formerly known as ELK Stack) is a powerful suite of open-source tools used for searching, analyzing, visualizing, and managing data in real time. It consists of:

  • Elasticsearch – A distributed search and analytics engine
  • Logstash – A data processing pipeline that ingests, transforms, and sends data
  • Kibana – A visualization interface for exploring and analyzing data
  • Beats – Lightweight agents that ship data from servers to Logstash or Elasticsearch

Running the Elastic Stack on Ubuntu 24.04 provides a robust and scalable foundation for log management, observability, infrastructure monitoring, threat detection, and search-driven applications.


Key Components

1. Elasticsearch

A distributed RESTful engine that stores and indexes data. It’s the core of the stack, used for search and analytics across large volumes of structured or unstructured data.

2. Logstash

A flexible pipeline tool that collects data from various sources, applies filters and transformations, and forwards it to Elasticsearch or other destinations.

3. Kibana

A web-based dashboard interface for visualizing data in Elasticsearch. Used to create interactive charts, dashboards, and search queries.

4. Beats

Lightweight agents designed to send specific types of data (e.g., logs, metrics, file integrity) to Logstash or Elasticsearch. Examples:

  • Filebeat (logs)
  • Metricbeat (system and application metrics)
  • Packetbeat (network data)
  • Auditbeat (security and audit logs)

Use Cases

  • Centralized log management (Syslog, Apache logs, Nginx logs, system logs)
  • Application performance monitoring
  • Security event monitoring (SIEM)
  • Infrastructure and system metrics collection
  • Real-time alerting and data visualization
  • Business intelligence dashboards
  • Search functionality in websites or applications

Why Use Elastic Stack on Ubuntu 24.04?

Ubuntu 24.04 is a long-term support (LTS) release ideal for deploying Elastic Stack components due to:

  • Stable kernel and updated system libraries
  • Long support cycle through 2029
  • Official support from Elastic for Ubuntu via APT repositories
  • Improved performance with systemd, cgroups v2, and secure defaults
  • Full compatibility with Docker, containers, and orchestration tools like Kubernetes

System Requirements (General Guide)

ComponentRecommended Minimum
OSUbuntu 24.04 LTS (64-bit)
CPU2–4 cores for Elasticsearch nodes
RAM4 GB+ (8 GB recommended for Elasticsearch)
Disk SpaceSSD strongly recommended, 20 GB+ minimum
Java RuntimeBundled with Elasticsearch 8 (uses its own)
NetworkPorts 9200 (HTTP), 9300 (cluster), others as needed

Benefits of Using the Elastic Stack

  • Real-time data analysis with scalable ingestion pipelines
  • Open-source and extensible with commercial options available
  • Built-in security features (authentication, role-based access, TLS)
  • Pre-built dashboards and visualizations
  • RESTful APIs for easy integration with applications and services
  • Multi-tenancy and clustering support for large-scale deployments

Elastic Stack vs Other Observability Tools

FeatureElastic StackPrometheus + GrafanaSplunk
Data StorageElasticsearchTSDB (Prometheus)Proprietary index
VisualizationKibanaGrafanaSplunk Dashboard
Logs and MetricsYesMetrics only (logs via Loki)Yes
Open SourceYes (basic features)YesNo (paid)
ScalabilityHighHighHigh (enterprise only)
Use CaseLogs + metrics + searchMetrics and alertsEnterprise SIEM/logs

Security and Best Practices

  • Enable TLS encryption for all communications between nodes
  • Use role-based access control (RBAC) with built-in or external authentication (LDAP, SAML, OIDC)
  • Keep the Elastic Stack components updated
  • Restrict access to Kibana dashboards using authentication
  • Monitor resource usage and configure index lifecycle management (ILM) to control disk space
  • Set up alerting using Watcher or ElastAlert for critical conditions

Elastic Stack on Ubuntu 24.04 offers a modern, scalable, and highly flexible platform for collecting, analyzing, and visualizing structured and unstructured data in real time. Whether you’re managing logs, monitoring system health, or powering search features in your application, the Elastic Stack provides the tools you need, and Ubuntu 24.04 ensures a secure and reliable environment for running it.

This stack is especially valuable for DevOps teams, system administrators, security professionals, and developers who need full visibility and insight across applications and infrastructure.


Step 1: Deploy a New Server on Shape.Host

To start, set up a clean Ubuntu 24.04 server on Shape.Host:

Visit https://shape.host and log in.

Click on “Create”, then choose “Instance”.

Shape.host Resources dashboard with Create > Instance highlighted.

Pick a server location near you or your users.

Shape.host instance form with the data center location selector highlighted.

Set the OS to Ubuntu 24.04 (64-bit).

Select a plan with at least 2 CPUs, 4 GB RAM, and 40 GB SSD.

Shape.host instance form with the operating system image selector highlighted.

Click “Create Instance”.

Shape.host instance form with the Create Instance button highlighted.

After deployment, copy the IP address from the Resources tab.

Shape.host Resources dashboard with the server IP address highlighted.

Step 2: Connect to Your Server

From Linux/macOS:

ssh root@your_server_ip

From Windows, use PuTTY to connect via SSH.


Step 3: Prepare the System

Update the system’s package list:

apt update
Terminal showing APT package management commands and output.

Install HTTPS support for APT:

apt install apt-transport-https
Terminal showing APT package management commands and output.

Install Java (required by Elasticsearch and Logstash):

apt install openjdk-11-jdk
Terminal showing APT package management commands and output.

Check the installed Java version:

java -version
Terminal showing java commands or output during Prepare the System.

Step 4: Set the JAVA_HOME Environment Variable

Open the environment config:

nano /etc/environment

Add the following line at the bottom:

JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64"
Terminal showing the GNU nano editor and configuration text.

Then reload the file:

source /etc/environment
echo $JAVA_HOME
Terminal showing nano commands or output during Set the JAVA_HOME Environment Variable.

Step 5: Add Elastic Repository and Key

Download and add the GPG key:

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elasticsearch-keyring.gpg

Add the Elastic APT repository:

echo "deb [signed-by=/usr/share/keyrings/elasticsearch-keyring.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list

Update packages again:

apt-get update
Terminal showing APT package management commands and output.

Step 6: Install and Configure Elasticsearch

Install Elasticsearch:

apt-get install elasticsearch
Terminal showing systemd service management commands or output.

Start the service:

systemctl start elasticsearch
systemctl enable elasticsearch
systemctl status elasticsearch
Terminal showing systemd service management commands or output.

Configure it to accept connections:

nano /etc/elasticsearch/elasticsearch.yml

Uncomment and modify these lines:

network.host: 0.0.0.0
discovery.seed_hosts: []
Terminal showing application configuration settings.

For a basic setup (not recommended for production), disable security features.

Terminal showing application configuration settings.

Restart Elasticsearch:

systemctl restart elasticsearch

Verify it’s running:

curl -X GET "localhost:9200"
Terminal showing systemd service management commands or output.

Step 7: Install Logstash

apt-get install logstash
systemctl start logstash
systemctl enable logstash
systemctl status logstash
Terminal showing APT package management commands and output.
Terminal showing systemd service management commands or output.

Step 8: Install and Configure Kibana

apt-get install kibana
systemctl start kibana
systemctl enable kibana
systemctl status kibana
Terminal showing APT package management commands and output.
Terminal showing the interactive process monitor.

Edit the Kibana config:

nano /etc/kibana/kibana.yml

Uncomment and adjust these lines:

server.port: 5601
server.host: "0.0.0.0"
elasticsearch.hosts: ["http://localhost:9200"]
Terminal showing hostname configuration or system identification details.

Restart Kibana:

systemctl restart kibana
Terminal showing systemd service management commands or output.

Now go to your browser and open:

http://your-server-ip:5601
Elastic welcome page with setup options.

Step 9: Install and Configure Filebeat

Install Filebeat:

apt-get install filebeat
Terminal showing APT package management commands and output.

Edit Filebeat config:

nano /etc/filebeat/filebeat.yml

Comment out the default Elasticsearch output:

# output.elasticsearch:
#   hosts: ["localhost:9200"]

Then enable Logstash output:

output.logstash:
  hosts: ["localhost:5044"]
Terminal showing application configuration settings.

Enable system log module:

filebeat modules enable system

Run initial setup:

filebeat setup --index-management -E output.logstash.enabled=false -E 'output.elasticsearch.hosts=["0.0.0.0:9200"]'
Terminal showing application configuration settings.

Start and enable Filebeat:

systemctl start filebeat
systemctl enable filebeat

Step 10: View Elasticsearch Indices

Check that logs are being sent to Elasticsearch:

curl -XGET "localhost:9200/_cat/indices?v"
Terminal showing systemd service management commands or output.

You now have a complete ELK Stack (Elasticsearch, Logstash, Kibana, Filebeat) running on Ubuntu 24.04.


Why Shape.Host is perfect for running Elastic Stack:

  • High-performance Cloud SSD VPS servers
  • Fast provisioning with Ubuntu 24.04
  • Global data centers for low latency
  • Flexible plans to scale with your data needs

Launch your Elastic-ready server now at Shape.Host