Analytics cookies only (Google Analytics, PostHog). No ad networks, no cross-site tracking. See our privacy policy.
Self-host Grafana Loki
updated Oct 2026deployed by usprices checked · Jul 2026Install verified on Ubuntu 26.04 · Oct 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →
Grafana's log aggregation system, described by its README as "like Prometheus, but for logs": it indexes only a set of labels for each log stream, not the text of the logs, and stores compressed chunks, which keeps it simpler and cheaper to run than a full-text engine. Queried with LogQL, usually through Grafana. AGPL-3.0 Go; the image's stock config runs it as one process with filesystem storage.
Runs on a VPS from $6/mo (Kamatera 2GB, 2 GB RAM) · prices checked Sep 2026
Our recommendation
Pick Loki when you want your logs searchable next to your metrics without running a full-text search cluster. Because it indexes labels and not log lines, it is cheaper to run than an Elasticsearch-style store, and a query first narrows by labels such as app or host before it scans the text; that makes it a good fit for container and Kubernetes logs and a poor fit for ad-hoc full-text search over everything. It is AGPL-3.0, from Grafana Labs. Our snippet is the image's own stock config in a one-container Compose file with the image pinned to a release tag. We did not find an upstream RAM minimum, so our 512 MB floor is an estimate. Loki is storage and a query API: the catalog's Grafana is the screen you read it through and Prometheus is its metrics sibling, while SigNoz and OpenObserve bundle logs, metrics and traces in one application.
What you need
Any VPS with at least 512 MB of RAM
A domain you control — most self-hosted setups need HTTPS in front of them
Loki's stock configuration and README flag these before you point real logs at it:
non-negotiableLoki collects nothing itself. An agent (Grafana Alloy, an OpenTelemetry collector or a Docker logging driver) pushes logs to its HTTP API on port 3100, and Grafana queries it as a data source. Opening /ready is the health check we use; the root path is not a web page.
non-negotiableThe stock config has auth_enabled: false, so there is no login and no tenant separation, and port 3100 carries both pushing and querying. Do not publish it to the internet; put it on a private network or behind a reverse proxy that authenticates.
non-negotiableThe image's config keeps its data under /loki (chunks and rules), which our loki_data volume holds; the directory belongs to the container's non-root user (uid 10001), so a bind mount needs a matching chown. The config sets no retention rule, so the data grows until you enable the compactor's retention or delete it. Unless you add analytics: reporting_enabled: false, Loki also sends anonymous usage statistics to Grafana Labs, as the config file's own comment explains.
non-negotiableThe stock config is for trying Loki out as a single process with local disk; the project's docs describe the scalable deployment modes that use object storage for anything larger.