How to Install and Configure Elasticsearch on Ubuntu VPS?

How to Install and Configure Elasticsearch on Ubuntu VPS?

What Is Elasticsearch?

Think of Elasticsearch as your go-to engine when you need to search or analyze massive amounts of data—fast. It’s open-source, built on Apache Lucene, and trusted by developers worldwide for its speed and scalability. Whether you’re tracking app performance, digging through logs, or powering a smart search bar, Elasticsearch makes it easy to handle both structured and unstructured data in real time. From startups to global enterprises, it’s the backbone behind many search-driven applications today.

Step-by-Step Installation Guide on How to Configure ElasticSearch on AccuWeb.Cloud

Getting Elasticsearch up and running on AccuWeb.Cloud is simple, even if you’re new to cloud deployments. Follow this step-by-step guide to install Elasticsearch on a Ubuntu 22.04 VPS:

1. VPS Setup

  • Log in to your AccuWeb.Cloud dashboard.
  • Create a new environment and deploy an Ubuntu 22.04 VPS with at least 2.5GB of RAM under reserved resources. This setup ensures your server has enough memory to run Elasticsearch efficiently, especially for medium to large datasets.

VPS Setup

2. SSH into Your VPS

Once your environment is ready, click Web SSH directly from the dashboard to access your VPS terminal.

# Update package list

sudo apt update

Update package list

# Ensure man1 directory exists

sudo mkdir -p /usr/share/man/man1

Ensure man1 directory exists

# Clean up unused files

sudo apt-get clean
sudo apt-get autoremove

Clean up unused files

# Refresh package list again

sudo apt-get update

Refresh package list again

# Fix broken dependencies

sudo apt-get install -f

Fix broken dependencies

# Install Java 11

sudo apt-get install openjdk-11-jdk -y

Install Java 11

# Add GPG key for Elasticsearch

curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elastic.gpg

Add GPG key for Elasticsearch

# Add Elasticsearch APT repo

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

Add Elasticsearch APT repo

# Confirm GPG key is stored

ls -l /usr/share/keyrings/elastic.gpg

Confirm GPG key is stored

Save $100 in the next
5:00 minutes?

Register Here

# Update to include Elasticsearch packages

sudo apt update

Update to include Elasticsearch packages

# Install Elasticsearch

sudo apt install elasticsearch -y

Install Elasticsearch

# Enable and start service

sudo systemctl enable elasticsearch
sudo systemctl start elasticsearch

Enable and start service

# Check service status

sudo systemctl status elasticsearch

Check service status

# Verify installation

curl -X GET "localhost:9200"

Verify installation

You’re now ready to start indexing your data!

Common Issues and Troubleshooting Tips for Elasticsearch

Running into problems with your Elasticsearch setup? Here are some of the most frequent issues and how to resolve them:

  • Elasticsearch Service Not Starting
    If the service won’t start, first verify that Java is correctly installed. Elasticsearch requires a compatible Java runtime. Also, ensure the service is enabled and running using systemctl status elasticsearch.
  • Port 9200 Blocked
    Elasticsearch uses port 9200 for HTTP communication. If you can’t connect, it’s likely a firewall issue. Check your VPS firewall or cloud security rules to allow inbound traffic on port 9200.
  • No Search Results Returned
    If queries return no results, revisit your index mapping and ensure your documents are properly structured and indexed. Use the _mapping and _search APIs to verify data presence and format.

Why Choose AccuWeb.Cloud for Elastic Search Hosting?

If you want to run Elasticsearch without wrestling with complicated setup or scaling issues, AccuWeb.Cloud has you covered. Our high-performance, cloud-native VPS is built for speed, reliability, and flexibility—perfect for anything from search-heavy apps to real-time analytics dashboards. You get an easy-to-use dashboard, one-click deployment, and pricing that fits your needs. Whether you’re a solo developer or scaling a growing business, AccuWeb.Cloud makes hosting Elasticsearch simple, fast, and stress-free.

Final Thoughts

Elasticsearch is far more than a search engine, it’s a high-performance analytics and querying platform trusted by startups and enterprises alike. Whether you’re powering an eCommerce store with intelligent product search or analyzing gigabytes of log data in real time, Elasticsearch delivers unmatched speed and flexibility.

With AccuWeb.Cloud’s user-friendly dashboard and optimized VPS hosting, getting started with Elasticsearch is quick, even for beginners. You can launch your instance, index data, and visualize insights within minutes. It’s the easiest way to unlock the full potential of Elasticsearch without managing complex infrastructure.