This is documentation for the next version of Loki. For the latest stable release, go to the latest version.

Open source


In order to log events with Grafana Loki, download and install both Promtail and Loki.

  • Loki is the logging engine.
  • Promtail sends logs to Loki.

The configuration specifies running Loki as a single binary.

Install using APT or RPM package manager

  1. Add Granafa’s Advanced Package Tool APT or RPM Package Manager RPM package repository following the linked instructions.
  2. Install Loki and Promtail
    1. Using dnf
      dnf update
      dnf install loki promtail
    2. Using apt-get
      apt-get update
      apt-get install loki promtail

Install manually

  1. Navigate to the release page.

  2. Scroll down to the Assets section under the version that you want to install.

  3. Download the Loki and Promtail .zip files that correspond to your system. Do not download LogCLI or Loki Canary at this time. LogCLI allows you to run Loki queries in a command line interface. Loki Canary is a tool to audit Loki performance.

  4. Unzip the package contents into the same directory. This is where the two programs will run.

  5. In the command line, change directory (cd on most systems) to the directory with Loki and Promtail. Copy and paste the commands below into your command line to download generic configuration files. Use the corresponding Git refs that match your downloaded Loki version to get the correct configuration file. For example, if you are using Loki version 2.9.2, you need to use the URL to download the configuration file that corresponds to the Loki version you aim to run.

  6. Enter the following command to start Loki:


    .\loki-windows-amd64.exe --config.file=loki-local-config.yaml


    ./loki-linux-amd64 -config.file=loki-local-config.yaml

Loki runs and displays Loki logs in your command line and on http://localhost:3100/metrics.

The next step will be running an agent to send logs to Loki. To do so with Promtail, refer to the Promtail configuration.

Release binaries - openSUSE Linux only

Every release includes binaries for Loki which can be found on the Releases page.

Community openSUSE Linux packages

The community provides packages of Loki for openSUSE Linux. To install:

  1. Add the repository to your system. For example, if you are using Leap 15.1, run sudo zypper ar ; sudo zypper ref
  2. Install the Loki package with zypper in loki
  3. Enable the Loki and Promtail services:
    • systemd start loki && systemd enable loki
    • systemd start promtail && systemd enable promtail
  4. Modify the configuration files as needed: /etc/loki/promtail.yaml and /etc/loki/loki.yaml.