DevOps12 min read•Updated November 2026

VPS Hosting for Loki and Promtail

Quick answer

Grafana Loki is a log aggregation system that indexes only labels and stores compressed log lines in chunks, which makes it much cheaper to run than full-text search engines. On a VPS, run Loki in monolithic mode with local filesystem storage (or S3-compatible object storage for larger volumes), enable retention through the compactor, and ship logs with an agent: Promtail was the traditional choice, but it is deprecated in favour of Grafana Alloy, so new setups should use Alloy. Keep labels few and bounded, query with LogQL in Grafana, add alert rules through the ruler, and keep Loki's port private or behind authentication.

Loki was designed to be "like Prometheus, but for logs": the same label model, tight integration with Grafana, and low operating cost. If you already use Prometheus and Grafana for metrics, Loki lets you jump from a spike on a graph to the logs from the same service and time in one click. For small and medium teams, a single VPS can run Loki comfortably.

How Loki Works

Each log stream is identified by a set of labels, such as {job="nginx", host="web1", env="prod"}. Loki indexes those labels only; the log text is compressed into chunks. Queries first select streams by labels, then filter log lines with text or regular expressions. Searches are fast when labels narrow the data, and slower for broad text searches across everything.

Deployment Modes

ModeDescriptionUse
MonolithicAll components in one processSingle VPS, small to medium volumes
Simple scalableRead, write and backend targets scaled separatelyLarger volumes, several servers
MicroservicesEach component separatelyVery large installations, usually on Kubernetes

Start with monolithic mode on one VPS; it is the simplest to operate.

Storage

Loki stores an index (the TSDB index format in current versions) and chunks. For a single server, local filesystem storage on NVMe works well. For larger volumes, longer retention or future scaling, use S3-compatible object storage, which is cheap and durable. Set the schema configuration carefully from the start, since changing it later requires adding new schema periods.

Retention

Retention is handled by the compactor. Enable retention in the compactor configuration and set a retention period globally or per tenant or stream. Without it, logs are kept indefinitely and storage grows forever. Monitor disk use on local storage and alert well before it fills.

Shipping Logs: Promtail and Alloy

Promtail was Loki's original agent for tailing files and the systemd journal. Grafana has deprecated Promtail in favour of Grafana Alloy, a collector that handles logs, metrics and traces and includes a conversion tool for Promtail configurations. For new setups, use Alloy; for existing Promtail installations, plan a migration. Other agents such as the OpenTelemetry Collector, Fluent Bit and Vector can also send to Loki (see our OpenTelemetry guide).

Label Design

  • Use a small set of bounded labels: environment, service, host, log type.
  • Never use high-cardinality values (user IDs, request IDs, IP addresses, full URLs) as labels; keep them in the log line and filter at query time.
  • Prefer structured logs (JSON or logfmt) so LogQL can parse fields when querying.
  • Too many streams hurts performance and can hit limits; check stream counts per tenant.

Querying with LogQL

LogQL selects streams with labels and then filters and parses lines: for example, {service="api"} |= "error" | json | status >= 500. Metric queries such as rates of error lines over time can power dashboards and alerts. In Grafana, link metrics panels to logs so investigations move from "what" to "why" quickly.

Alerting

Loki's ruler evaluates LogQL alert rules and sends alerts to Alertmanager, the same way Prometheus does (see our Grafana and Prometheus guide). Alert on patterns such as spikes in error lines, authentication failures or specific critical messages. Grafana-managed alerts can also query Loki.

Security

  • Loki's HTTP port (3100) has no authentication in single-tenant mode; keep it on a private network or behind a reverse proxy with authentication.
  • Use TLS between agents and Loki across untrusted networks.
  • Avoid sending secrets or personal data in logs, or drop and mask them in the agent.
  • Restrict Grafana access to log data sources by team where needed.

Monitoring Loki

Loki exposes Prometheus metrics: ingestion rate, rejected samples, request latency, compactor runs and storage operations. Alert on ingestion errors and rate-limit rejections, which mean logs are being dropped.

Sizing

Log volumeSuggested plan
Up to several GB per day, monolithic mode2 vCores / 8 GB
Tens of GB per day or heavy queries4 vCores / 16 GB with object storage
Larger volumesSimple scalable mode across several servers

Query load often matters more than ingestion: broad searches over long time ranges use the most CPU and memory.

Loki or ELK?

Loki is cheaper and simpler, especially alongside Grafana. Elasticsearch indexes full text and suits heavy search and analytics on log content (see our ELK guide). Many teams choose Loki for operational logs and keep full-text search for specific use cases.

Example: A SaaS Team

A SaaS team runs Loki in monolithic mode on a 2 vCore / 8 GB VPS with chunks in object storage and 30-day retention via the compactor. Grafana Alloy on each application server ships JSON logs from the journal and Nginx with labels for service, env and host. Grafana dashboards link API error-rate panels to the matching logs, and a LogQL rule alerts when payment errors exceed a threshold.

Common Mistakes

  • High-cardinality labels such as user or request IDs.
  • Retention not enabled in the compactor.
  • Port 3100 exposed without authentication.
  • Starting new deployments on deprecated Promtail.
  • Expecting full-text search speed across all logs without label filters.

In Short

Run Loki in monolithic mode on a VPS with local or object storage, enable compactor retention, ship logs with Grafana Alloy, keep labels bounded, query with LogQL in Grafana, alert through the ruler and keep the endpoint private.

SkyRainCloud Plans for This Workload

Loki is lighter than full-text log stores because it indexes only labels. 2 vCores / 8 GB handles several GB of logs per day in monolithic mode; 4 vCores / 16 GB suits heavier volumes and queries.

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
VPS 1 — AMD28 GB DDR4 ECC40 GB NVMe SSD1 Gbps, unmetered₹649/monthWebsites, small APIs, bots, staging and VPN serversOrder
VPS 2 — AMD416 GB DDR4 ECC80 GB NVMe SSD1 Gbps, unmetered₹1,299/monthWooCommerce, Node.js/Python backends, Docker Compose stacks, CI runnersOrder
VPS 3 — AMD832 GB DDR4 ECC150 GB NVMe SSD1 Gbps, unmetered₹2,499/monthProduction databases, high-traffic sites, multi-container appsOrder
VPS 4 — AMD1664 GB DDR4 ECC250 GB NVMe SSD1 Gbps, unmetered₹4,899/monthLarge 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
VPS 1 — Intel28 GB DDR4 ECC40 GB NVMe SSD1 Gbps, unmetered₹649/monthBusiness websites, small apps, scheduled jobs and botsOrder
VPS 2 — Intel416 GB DDR4 ECC80 GB NVMe SSD1 Gbps, unmetered₹1,169/monthBusiness software, mid-size databases, several sites on one serverCheck stock
VPS 3 — Intel832 GB DDR4 ECC150 GB NVMe SSD1 Gbps, unmetered₹2,249/monthERP/CRM stacks, heavier databases, multiple production appsCheck stock
VPS 4 — Intel1664 GB DDR4 ECC250 GB NVMe SSD1 Gbps, unmetered₹4,299/monthHigh-memory workloads and consolidated production serversCheck 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.

Frequently Asked Questions

What is Grafana Loki?
A log aggregation system that indexes only labels and stores compressed log lines, making it cheaper than full-text log stores.
Is Promtail still recommended?
No. Promtail is deprecated in favour of Grafana Alloy; new setups should use Alloy.
Which port does Loki use?
3100 for its HTTP API by default; keep it private or behind authentication.
Where does Loki store logs?
On the local filesystem for small setups, or S3-compatible object storage for larger or longer retention.
How do I set log retention in Loki?
Enable retention in the compactor and set retention periods globally or per stream.
Which labels should I use?
A few bounded labels such as environment, service, host and log type; never IDs or IPs.
What is LogQL?
Loki's query language: select streams by labels, then filter and parse log lines.
Can Loki send alerts?
Yes. Its ruler evaluates LogQL rules and sends alerts to Alertmanager.
Loki or Elasticsearch?
Loki for cheaper label-based logging with Grafana; Elasticsearch for fast full-text search and analytics.
Which plan suits Loki?
2 vCores / 8 GB for several GB per day; 4 vCores / 16 GB with object storage for heavier use.
Instant UPI • ₹649/mo
Fast KVM Cloud Provisioning