Installing Loki Locally

Release Binaries

Every Loki release includesprebuilt binaries:

  1. # download a binary (modify app, os, and arch as needed)
  2. # Installs v0.3.0. Go to the releases page for the latest version
  3. $ curl -fSL -o "/usr/local/bin/loki.gz" "https://github.com/grafana/loki/releases/download/v0.3.0/loki_linux_amd64.gz"
  4. $ gunzip "/usr/local/bin/loki.gz"
  5. # make sure it is executable
  6. $ chmod a+x "/usr/local/bin/loki"

Manual Build

Prerequisites

  • Go 1.11 or later
  • Make
  • Docker (for updating protobuf files and yacc files)

Building

Clone Loki to $GOPATH/src/github.com/grafana/loki:

  1. $ git clone https://github.com/grafana/loki $GOPATH/src/github.com/grafana/loki

Then change into that directory and run make loki:

  1. $ cd $GOPATH/src/github.com/grafana/loki
  2. $ make loki
  3. # A file at ./cmd/loki/loki will be created and is the
  4. # final built binary.