NEWUse coupon code SMX20 to get 20% OFF your first billing cycle on any game server or VPS!Explore Store

VPS HOSTING

VPS Hosting for ELK Stack

Run the ELK stack (Elasticsearch, Logstash, Kibana) or OpenSearch on a VPS for centralised logging: licensing, memory and heap sizing, system settings, single node versus cluster, shipping logs with Beats or Elastic Agent, index lifecycle and retention, security, backups with snapshots and sizing.

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

ComponentRoleDefault port
ElasticsearchStores and indexes logs; search engine9200 (HTTP), 9300 (cluster)
KibanaUI for search, dashboards and alerting5601
LogstashOptional heavy processing pipelines5044 (Beats input, commonly)
Filebeat / Elastic AgentShip logs from serversClient 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_count to 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 volumeSuggested plan
Trial or a few GB per day, short retention4 vCores / 16 GB
Tens of GB per day, 2–4 weeks retention8 vCores / 32 GB with large NVMe
Higher volumes or resilienceThree-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.

ServoMix 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.

PlanvCoresRAMStorageNetworkPriceGood forBuy
SMX vPro XS (AMD EPYC)28 GB DDR4 ECC40 GB NVMe SSD1 Gbps, unmetered₹420/moWebsites, small APIs, bots, staging and VPN serversOrder
SMX vPro S (AMD EPYC)416 GB DDR4 ECC80 GB NVMe SSD1 Gbps, unmetered₹560/moWooCommerce, Node.js/Python backends, Docker Compose stacks, CI runnersOrder
SMX vPro M (AMD EPYC)832 GB DDR4 ECC150 GB NVMe SSD1 Gbps, unmetered₹840/moProduction databases, high-traffic sites, multi-container appsOrder
SMX vPro L (AMD EPYC)1664 GB DDR4 ECC250 GB NVMe SSD1 Gbps, unmetered₹1,120/moLarge production workloads, SaaS platforms, analytics, in-memory cachesOrder

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.

PlanvCoresRAMStorageNetworkPriceGood forBuy
SMX vCore XS (Intel Xeon)28 GB DDR4 ECC40 GB NVMe SSD1 Gbps, unmetered₹270/moBusiness websites, small apps, scheduled jobs and botsOrder
SMX vCore S (Intel Xeon)416 GB DDR4 ECC80 GB NVMe SSD1 Gbps, unmetered₹1,169/monthBusiness software, mid-size databases, several sites on one serverCheck stock
SMX vCore M (Intel Xeon)832 GB DDR4 ECC150 GB NVMe SSD1 Gbps, unmetered₹2,249/monthERP/CRM stacks, heavier databases, multiple production appsCheck stock
SMX vCore L (Intel Xeon)1664 GB DDR4 ECC250 GB NVMe SSD1 Gbps, unmetered₹4,248/monthHigh-memory workloads and consolidated production serversCheck stock

Prices are monthly in INR as listed on the ServoMix store (verified 2026-11-14). Stock and final pricing are shown on the product page at checkout.

Frequently Asked Questions

What is the ELK stack?
Elasticsearch, Logstash and Kibana, used together for centralised log storage, processing, search and visualisation.
Is Elasticsearch free?
It is available under Elastic's licences, including an AGPL option, with many features free; OpenSearch is an Apache 2.0 fork.
How much heap should Elasticsearch have?
About half of RAM, staying below roughly 31 GB, leaving the rest for the filesystem cache.
Do I need Logstash?
Not always. Filebeat or Elastic Agent with ingest pipelines handles most parsing; use Logstash for complex pipelines.
How do I control log retention?
With index lifecycle management to roll over and delete indices after the retention period.
How do I back up Elasticsearch?
With snapshots to a repository such as S3-compatible storage, scheduled by snapshot lifecycle management.
Should Elasticsearch be exposed to the internet?
No. Keep port 9200 private and security enabled.
How much storage do I need?
Daily log volume times retention times index overhead, plus replicas and headroom.
ELK or Loki?
ELK for fast full-text search and analytics; Loki for cheaper label-based logging with Grafana.
Which plan suits the ELK stack?
4 vCores / 16 GB for trials; 8 vCores / 32 GB with large NVMe for tens of GB per day.

Frequently Asked Questions

What is the ELK stack?

Elasticsearch, Logstash and Kibana, used together for centralised log storage, processing, search and visualisation.

Is Elasticsearch free?

It is available under Elastic's licences, including an AGPL option, with many features free; OpenSearch is an Apache 2.0 fork.

How much heap should Elasticsearch have?

About half of RAM, staying below roughly 31 GB, leaving the rest for the filesystem cache.

Do I need Logstash?

Not always. Filebeat or Elastic Agent with ingest pipelines handles most parsing; use Logstash for complex pipelines.

How do I control log retention?

With index lifecycle management to roll over and delete indices after the retention period.

How do I back up Elasticsearch?

With snapshots to a repository such as S3-compatible storage, scheduled by snapshot lifecycle management.

Should Elasticsearch be exposed to the internet?

No. Keep port 9200 private and security enabled.

How much storage do I need?

Daily log volume times retention times index overhead, plus replicas and headroom.

ELK or Loki?

ELK for fast full-text search and analytics; Loki for cheaper label-based logging with Grafana.

Which plan suits the ELK stack?

4 vCores / 16 GB for trials; 8 vCores / 32 GB with large NVMe for tens of GB per day.

Was this article helpful?

Your feedback helps us continuously improve ServoMix guides.

Share this article

Know someone who may find this guide useful?

Run the ELK Stack on a VPS: Elasticsearch, Logstash and Kibana | ServoMix