How to Install Elasticsearch on a VPS
Elasticsearch is a distributed search and analytics engine that enables fast full-text search and log analysis on your Breeze.
Installation
Import the GPG key and add the repository:
curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo gpg --dearmor -o /usr/share/keyrings/elastic.gpg
echo "deb [signed-by=/usr/share/keyrings/elastic.gpg] https://artifacts.elastic.co/packages/8.x/apt stable main" | sudo tee /etc/apt/sources.list.d/elastic-8.x.list
sudo apt update && sudo apt install elasticsearch -y
Configuration
Edit /etc/elasticsearch/elasticsearch.yml:
cluster.name: breeze-search
node.name: node-1
network.host: 127.0.0.1
http.port: 9200
discovery.type: single-node
xpack.security.enabled: true
Memory Settings
Set JVM heap to half your available RAM (max 31GB) in /etc/elasticsearch/jvm.options.d/heap.options:
-Xms2g
-Xmx2g
Start and Verify
sudo systemctl enable --now elasticsearch
curl -k -u elastic:yourpassword https://localhost:9200
Basic Index Operations
# Create an index
curl -X PUT "localhost:9200/logs" -H 'Content-Type: application/json' -d '{"settings":{"number_of_replicas":0}}'
# Index a document
curl -X POST "localhost:9200/logs/_doc" -H 'Content-Type: application/json' -d '{"message":"Hello from Breeze","@timestamp":"2026-01-01T00:00:00Z"}'
Elasticsearch gives your Breeze powerful full-text search and analytics capabilities.