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 Loki and Promtail

Run Grafana Loki on a VPS for cost-efficient centralised logging: how Loki indexes labels, monolithic mode, storage on disk or object storage, retention with the compactor, shipping logs with Promtail or its successor Grafana Alloy, label design, LogQL queries, alerting, security and sizing.

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.

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

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.

Was this article helpful?

Your feedback helps us continuously improve ServoMix guides.

Share this article

Know someone who may find this guide useful?

Run Grafana Loki on a VPS: Log Shipping with Promtail or Alloy | ServoMix