When logs are scattered across servers, finding the cause of an incident means SSH sessions and grep. Centralised logging collects them in one searchable place with dashboards and alerts. The ELK stack is the classic open-source-rooted choice: Elasticsearch stores and searches, Logstash or ingest pipelines parse, and Kibana visualises. It is powerful and fast to search, and also resource-hungry, so sizing matters.
Licensing and OpenSearch
Elasticsearch and Kibana are available under Elastic's licences, which have changed over the years and now include an AGPL option alongside Elastic License 2.0 and SSPL; many features are free in the default distribution. OpenSearch is a fork maintained under the Apache 2.0 licence with OpenSearch Dashboards instead of Kibana. Both work for self-hosted logging; check current licence terms for your use.
Components
| Component | Role | Default port |
|---|---|---|
| Elasticsearch | Stores and indexes logs; search engine | 9200 (HTTP), 9300 (cluster) |
| Kibana | UI for search, dashboards and alerting | 5601 |
| Logstash | Optional heavy processing pipelines | 5044 (Beats input, commonly) |
| Filebeat / Elastic Agent | Ship logs from servers | Client side |
Memory and Heap
Elasticsearch runs on the JVM and also relies on the operating system's filesystem cache. A common rule is to set the heap to about half of RAM and no more than about 31 GB, so the JVM can use compressed object pointers; recent versions size the heap automatically based on available memory. Disable swap or lock memory, and do not run other heavy services on the same server.
System Settings
- Set
vm.max_map_countto at least the value required by your version (262144 is the documented value). - Raise file descriptor limits for the Elasticsearch user.
- Use local NVMe storage; network storage often causes poor performance.
- For a single server, configure single-node discovery.
Shipping and Parsing Logs
Install Filebeat or Elastic Agent on each server to read log files and the systemd journal, with modules for Nginx, system logs, databases and more that include parsing and dashboards. Parse custom logs with ingest pipelines in Elasticsearch, or use Logstash when you need complex transformations or many inputs. Prefer structured JSON logs from your applications, which need little parsing. The OpenTelemetry Collector can also ship logs (see our OpenTelemetry guide).
Index Lifecycle and Retention
Logs are time-series data. Use data streams and index lifecycle management (ILM) to roll over indices by size or age and delete them after your retention period, for example 14 or 30 days. Keep shard counts low: on a single node, one primary shard per daily or rolled-over index is usually enough, and avoid thousands of tiny shards, which waste heap.
Estimating Storage
Storage is roughly daily log volume × retention days × index overhead, plus replicas in a cluster and headroom. Index overhead varies with mappings; test with real logs. Keep disk usage under the high watermark (Elasticsearch stops allocating shards to nodes above it and can block writes when disks are nearly full), and alert on disk early.
Security
- Recent Elasticsearch versions enable security by default with TLS and authentication; keep it on.
- Never expose port 9200 to the internet; many data leaks came from open Elasticsearch servers.
- Put Kibana behind HTTPS with strong authentication or SSO, and use roles to limit access to sensitive indices.
- Use API keys with minimal privileges for shippers.
- Avoid logging secrets and personal data, or mask them in pipelines.
Backups with Snapshots
Register a snapshot repository on S3-compatible storage and schedule snapshots with snapshot lifecycle management. Snapshots are incremental and are the supported way to back up Elasticsearch; copying data directories is not. Test restoring an index.
Single Node or Cluster
A single node is fine for modest volumes where losing recent logs during an outage is acceptable. For resilience, run three nodes so the cluster keeps a quorum, with replicas for each index. Clusters need low-latency private networking between nodes.
Sizing
| Log volume | Suggested plan |
|---|---|
| Trial or a few GB per day, short retention | 4 vCores / 16 GB |
| Tens of GB per day, 2–4 weeks retention | 8 vCores / 32 GB with large NVMe |
| Higher volumes or resilience | Three-node cluster or dedicated servers |
ELK or Loki?
Elasticsearch indexes log content, so full-text search is fast and flexible, at the cost of memory and disk. Grafana Loki indexes only labels and stores compressed logs, which is much cheaper but slower for broad text searches (see our Loki guide). Choose ELK for heavy search and analytics on logs; choose Loki for cost-efficient logging alongside Grafana.
Example: An E-Commerce Platform
An e-commerce company ships Nginx, application and database logs with Filebeat from six servers to a single Elasticsearch node on an 8 vCore / 32 GB VPS with large NVMe. Ingest pipelines parse JSON application logs, ILM keeps 21 days, daily snapshots go to object storage, and Kibana alerts the team when checkout errors spike.
Common Mistakes
- Exposing port 9200 publicly.
- Giving the heap all RAM, starving the filesystem cache.
- Thousands of small shards.
- No ILM, so disks fill and writes are blocked.
- Copying data directories instead of using snapshots.
In Short
Run Elasticsearch with the right heap and system settings on NVMe, ship logs with Filebeat or Elastic Agent, manage retention with ILM, keep security on, snapshot to object storage and size for volume times retention.
SkyRainCloud Plans for This Workload
Elasticsearch is memory- and disk-hungry. A single node for modest log volumes needs about 8 vCores / 32 GB with plenty of NVMe; small trials can start at 4 vCores / 16 GB.
AMD EPYC 7C13 VPS
Dedicated KVM vCores on AMD EPYC 7C13 (up to 3.70 GHz) with DDR4 ECC memory, NVMe SSD and an unmetered 1 Gbps port.
| Plan | vCores | RAM | Storage | Network | Price | Good for | Buy |
|---|---|---|---|---|---|---|---|
| VPS 1 — AMD | 2 | 8 GB DDR4 ECC | 40 GB NVMe SSD | 1 Gbps, unmetered | ₹649/month | Websites, small APIs, bots, staging and VPN servers | Order |
| VPS 2 — AMD | 4 | 16 GB DDR4 ECC | 80 GB NVMe SSD | 1 Gbps, unmetered | ₹1,299/month | WooCommerce, Node.js/Python backends, Docker Compose stacks, CI runners | Order |
| VPS 3 — AMD | 8 | 32 GB DDR4 ECC | 150 GB NVMe SSD | 1 Gbps, unmetered | ₹2,499/month | Production databases, high-traffic sites, multi-container apps | Order |
| VPS 4 — AMD | 16 | 64 GB DDR4 ECC | 250 GB NVMe SSD | 1 Gbps, unmetered | ₹4,899/month | Large production workloads, SaaS platforms, analytics, in-memory caches | Order |
Intel Xeon Platinum 8269CY VPS
KVM VPS on Intel Xeon Platinum 8269CY (up to 3.80 GHz Turbo) with DDR4 ECC memory, NVMe SSD, full root access and an unmetered 1 Gbps port.
| Plan | vCores | RAM | Storage | Network | Price | Good for | Buy |
|---|---|---|---|---|---|---|---|
| VPS 1 — Intel | 2 | 8 GB DDR4 ECC | 40 GB NVMe SSD | 1 Gbps, unmetered | ₹649/month | Business websites, small apps, scheduled jobs and bots | Order |
| VPS 2 — Intel | 4 | 16 GB DDR4 ECC | 80 GB NVMe SSD | 1 Gbps, unmetered | ₹1,169/month | Business software, mid-size databases, several sites on one server | Check stock |
| VPS 3 — Intel | 8 | 32 GB DDR4 ECC | 150 GB NVMe SSD | 1 Gbps, unmetered | ₹2,249/month | ERP/CRM stacks, heavier databases, multiple production apps | Check stock |
| VPS 4 — Intel | 16 | 64 GB DDR4 ECC | 250 GB NVMe SSD | 1 Gbps, unmetered | ₹4,299/month | High-memory workloads and consolidated production servers | Check stock |
Prices are monthly in INR as listed on the SkyRainCloud store (verified 2026-11-14). Stock and final pricing are shown on the product page at checkout.