Grafana Loki Configuration Builder

Generate a Loki config file for log aggregation deployment

Free Grafana Loki configuration builder that generates a loki.yaml with server, ingester, schema, storage (filesystem or S3), limits, compactor and ruler sections — ready for a single-binary or microservices log aggregation deployment.

What is the difference between the filesystem and S3 backends?

Filesystem stores chunks and the index on local disk, which is fine for a single node or development. S3 (or any S3-compatible store like MinIO or GCS via the s3 API) is the production choice because it is durable and lets you scale read and write paths independently.

A Grafana Loki configuration builder that produces a complete loki.yaml covering the sections a real deployment needs: server, common/ring, schema_config, storage_config (filesystem or S3), limits_config, compactor, and ruler. Loki is a horizontally-scalable log aggregation system that indexes only labels — not full log text — so it pairs naturally with Prometheus and Grafana.

How it works

Loki’s config is organised by component. server sets the HTTP and gRPC ports. common ties together the ring (instance addressing and replication) and the default storage path. schema_config declares how data is laid out over time — current Loki uses the tsdb index store with the v13 schema and a 24h index period; schema entries are append-only and keyed by a from date so old data keeps its old layout. storage_config then points the chosen store at a location: a local directory for filesystem, or a bucketnames/region/endpoint for aws/S3-compatible object storage.

limits_config caps per-tenant ingestion (ingestion_rate_mb, ingestion_burst_size_mb) and sets retention_period. Retention only actually deletes data when the compactor runs with retention_enabled: true, so the builder always pairs the two. The ruler evaluates alerting and recording rules over logs.

Storage example

A production S3 schema entry plus storage block looks like this:

schema_config:
  configs:
    - from: 2024-01-01
      store: tsdb
      object_store: aws
      schema: v13
      index:
        prefix: index_
        period: 24h

Notes

Schema changes are forward-only — append a new entry with a future from date instead of editing the existing one, or Loki will fail to read older chunks. Keep S3 credentials out of the file (use IAM roles or env injection), and run the compactor as a singleton so retention is enforced exactly once.