# Install loki with Homebrew, apk, apt, Nix, pacman, zypper

Horizontally-scalable, highly-available log aggregation system. Version 3.7.3 via Homebrew; verified 2026-06-26.

## Install

```sh
sudo av install brew:loki
```

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install loki
```

  Evidence: local Homebrew formula metadata

### Linux

- apk (92%):

```sh
sudo apk add loki
```

  Evidence: Alpine Linux edge package indexes: loki from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz

- Debian apt (92%):

```sh
sudo apt install loki
```

  Evidence: Debian stable package indexes: loki from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#loki
```

  Evidence: nixpkgs package indexes: pkgs/by-name/lo/loki/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S loki
```

  Evidence: Arch Linux sync databases: loki from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- zypper (92%):

```sh
sudo zypper install logcli
```

  Evidence: openSUSE Tumbleweed package metadata: logcli from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst

## Package facts

- **Package key:** brew:loki
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/loki>
- **Version:** 3.7.3
- **Source summary:** Horizontally-scalable, highly-available log aggregation system
- **Homepage:** <https://grafana.com/oss/loki>
- **Repository:** <https://github.com/grafana/loki>
- **Upstream docs:** <https://grafana.com/docs/loki/latest>
- **License:** AGPL-3.0-only
- **Source archive:** <https://github.com/grafana/loki/archive/refs/tags/v3.7.3.tar.gz>
- **Last updated:** 2026-06-26T00:47:42Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- loki (cli)
- loki (alias)

## Build dependencies

- go

## Install behavior

- Post-install hook: not defined
- Service: declared
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 3.7.3
- Package-manager updated: 2026-06-26
- Local data: ok
- Upstream repository: https://github.com/grafana/loki
- Upstream latest detected: v3.7.3 (current)
## Project history and usage

Grafana Loki is a horizontally scalable, highly available, multi-tenant log aggregation system inspired by Prometheus. Its core design indexes labels rather than full log contents, aiming to make log storage cheaper and easier to operate.

### Project history

Grafana Labs started Loki in 2018 and announced it at KubeCon Seattle. The official repository was created in April 2018 and describes the project as 'like Prometheus, but for logs.'

Loki was designed around labels, compressed unstructured logs, and integration with Grafana. The README explains that a Loki-based stack includes the Loki service, Grafana for querying and visualization, and a log collection agent; current docs identify Grafana Alloy as the forward-looking agent while Promtail is considered feature complete.

Grafana announced the general availability of Loki 1.0 in November 2019. By the 3.x series, Loki had grown into one of Grafana Labs' major OSS projects, with active documentation for single-binary, simple scalable, and microservices deployment modes.

### Adoption history

Loki's adoption followed cloud-native observability patterns: Prometheus users already had label conventions, Grafana dashboards, and a need to correlate metrics and logs without paying the storage cost of full-text log indexing.

Grafana's official OSS pages and yearly open-source recap describe Loki as a major Grafana Labs project, and the repository shows broad adoption with tens of thousands of stars, thousands of forks, active releases, and an `ADOPTERS.md` process for organizations using Loki.

The supplied package facts show package-manager availability through Homebrew, Alpine, Debian, Ubuntu, Arch, Nix, and openSUSE-related packaging, with `logcli` also packaged separately in some ecosystems.

### How it is used

Loki is usually launched with a YAML configuration file, commonly called `loki.yaml`, passed through `-config.file`. The official README's source build example runs `./cmd/loki/loki -config.file=./cmd/loki/loki-local-config.yaml`, and the docs show Docker examples using `/etc/loki/local-config.yaml`.

Operators send logs to Loki with agents such as Grafana Alloy, then query them from Grafana using LogQL. Loki's distinction is that labels are indexed, while log lines remain compressed payloads.

### Why package nerds care

For package nerds, Loki is the observability-era package that made 'logs as Prometheus-shaped data' a concrete binary and config file. It is large enough to need Helm charts, Docker images, agents, and CLI companions, but still keeps a recognizable single-service local mode for packaging and testing.

### Timeline

- 2018: Loki project starts at Grafana Labs and is announced at KubeCon Seattle.
- 2019: Grafana Labs announces Loki 1.0 general availability.
- 2022: Grafana Labs describes Loki as its second most popular OSS project behind Grafana.
- 2026: Loki 3.7.x releases are active in the official GitHub repository.

### Related projects

- Loki is designed to pair with Grafana for visualization and with Prometheus-style labels for correlation with metrics.
- Promtail was the original log collection agent in many Loki deployments, while Grafana Alloy is now the recommended forward-looking collector in the README.

### Sources

- <https://api.github.com/repos/grafana/loki>
- <https://github.com/grafana/loki#readme>
- <https://grafana.com/blog/grafana-labs-open-source-projects-2022/>
- <https://grafana.com/docs/loki/latest/>
- <https://grafana.com/docs/loki/latest/configure/>
- <https://grafana.com/oss/loki/>
- <https://grafana.com/press/2019/11/20/grafana-labs-announces-ga-release-of-loki-like-prometheus-but-for-logs/>
- source_facts.package-manager


## Security Notes

formula declares a Homebrew service.

- **Geiger risk:** orange / medium
- formula declares a Homebrew service


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: ./config.yaml, ./config/config.yaml, loki.yaml
## Source Database Details

- **Source Database:** Homebrew formula API
- **Tap:** homebrew/core
- **Full Name:** loki
- **Version Scheme:** 0
- **Revision:** 0
- **Head Version:** HEAD
- **Bottle Stable Root URL:** <https://ghcr.io/v2/homebrew/core>
- **Deprecated:** no
- **Disabled:** no
- **Keg Only:** no
- **URL Keys:** head, stable

## Other Package-Manager Records

- Debian apt - loki - 2.4.7.4-12: normalized package name match | Debian stable package indexes: loki from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | MCMC linkage analysis on general pedigrees
- Debian apt - loki-doc - 2.4.7.4-12: normalized package name match | Debian stable package indexes: loki-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | MCMC linkage analysis on general pedigrees (PS manual)
- Nix - loki: normalized package name match | nixpkgs package indexes: pkgs/by-name/lo/loki/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- Ubuntu apt - loki - 2.4.7.4-10: normalized package name match | Ubuntu 24.04 LTS package indexes: loki from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | MCMC linkage analysis on general pedigrees
- Ubuntu apt - loki-doc - 2.4.7.4-10: normalized package name match | Ubuntu 24.04 LTS package indexes: loki-doc from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | MCMC linkage analysis on general pedigrees (PS manual)
- apk - loki - 3.7.2-r0: normalized package name match | Alpine Linux edge package indexes: loki from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Like Prometheus, but for logs | https://github.com/grafana/loki
- apk - loki-canary - 3.7.2-r0: normalized package name match | Alpine Linux edge package indexes: loki-canary from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Loki auditing program | https://github.com/grafana/loki
- apk - loki-logcli - 3.7.2-r0: normalized package name match | Alpine Linux edge package indexes: loki-logcli from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Loki log client | https://github.com/grafana/loki
- apk - loki-lokitool - 3.7.2-r0: normalized package name match | Alpine Linux edge package indexes: loki-lokitool from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Tool for interracting with Loki rules | https://github.com/grafana/loki
- apk - loki-openrc - 3.7.2-r0: normalized package name match | Alpine Linux edge package indexes: loki-openrc from https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz | Like Prometheus, but for logs (OpenRC init scripts) | https://github.com/grafana/loki
- pacman - loki - 3.6.6-1: normalized package name match | Arch Linux sync databases: loki from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | like Prometheus, but for logs | https://github.com/grafana/loki
- zypper - logcli - 3.7.2-1.1: normalized package name match | openSUSE Tumbleweed package metadata: logcli from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | LogCLI tool | https://grafana.com/loki
- zypper - loki - 3.7.2-1.1: normalized package name match | openSUSE Tumbleweed package metadata: loki from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | Loki: like Prometheus, but for logs | https://grafana.com/loki
- zypper - lokitool - 3.7.2-1.1: normalized package name match | openSUSE Tumbleweed package metadata: lokitool from https://download.opensuse.org/tumbleweed/repo/oss/repodata/be8d3611d25469107f32075a1697e69ec57a2b850b42348a658cc671ad5ec2b50760d02c3e59524d50da9a11d5be799bdaffba2e166e8ca8858512e3c0bd665d-primary.xml.zst | A command-line tool to manage Loki | https://grafana.com/loki


## Related links

- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Text processing packages](https://www.automicvault.com/pkg/text-processing-tools/) - Matched text, document, or structured-data processing metadata.
- [Networking and protocol packages](https://www.automicvault.com/pkg/networking-protocol-tools/) - Matched network, protocol, or remote-service metadata.
- [go](https://www.automicvault.com/pkg/brew/go/) - Build dependency declared by Homebrew.
- [logcli](https://www.automicvault.com/pkg/brew/logcli/) - Shares the same upstream source repository.
- [flume](https://www.automicvault.com/pkg/brew/flume/) - Shares av.db curated category or tags: cli, data, log-aggregation, logs.
- [filebeat](https://www.automicvault.com/pkg/brew/filebeat/) - Shares av.db curated category or tags: cli, data, logs, observability.
- [fluent-bit](https://www.automicvault.com/pkg/brew/fluent-bit/) - Shares av.db curated category or tags: cli, data, logs, observability.
- [victorialogs](https://www.automicvault.com/pkg/brew/victorialogs/) - Shares av.db curated category or tags: cli, data, logs, observability.
- [cortex](https://www.automicvault.com/pkg/brew/cortex/) - Shares av.db curated category or tags: cli, data, observability.
- [logstash](https://www.automicvault.com/pkg/brew/logstash/) - Shares av.db curated category or tags: cli, data, logs.
- [telegraf](https://www.automicvault.com/pkg/brew/telegraf/) - Shares av.db curated category or tags: cli, data, observability.
- [adios2](https://www.automicvault.com/pkg/brew/adios2/) - Shares av.db curated category or tags: cli, data.
- [loki](https://www.automicvault.com/pkg/npm/loki/) - Same normalized package name in another local ecosystem.

## Combined YAML source

View the package source record on GitHub. [combined/loki.yml](https://github.com/automic-vault/db/blob/main/combined/loki.yml)


## Sources

- Nucleus package database
- Geiger risk classifier
- package-page enrichment
- curated configuration and credential file locations
- curated package history
- package version freshness
- av.db category and tag curation
- package relationship graph
- external package-manager database matches
- cross-ecosystem install command graph
