github.com/yankunsam/loki/v2@v2.6.3-0.20220817130409-389df5235c27/docs/sources/installation/local.md (about)

     1  ---
     2  title: Local
     3  weight: 40
     4  ---
     5  # Install and run Grafana Loki locally
     6  
     7  In order to log events with Grafana Loki, download and install both Promtail and Loki.
     8  - Loki is the logging engine.
     9  - Promtail sends logs to Loki.
    10  
    11  The configuration specifies running Loki as a single binary.
    12  
    13  ## Install
    14  
    15  1. Navigate to the [release page](https://github.com/grafana/loki/releases/).
    16  2. Scroll down to the Assets section under the version that you want to install.
    17  3. Download the Loki and Promtail .zip files that correspond to your system.
    18     **Note:** Do not download LogCLI or Loki Canary at this time. [LogCLI](../../getting-started/logcli/) allows you to run Loki queries in a command line interface. [Loki Canary](../../operations/loki-canary/) is a tool to audit Loki performance.
    19  4. Unzip the package contents into the same directory. This is where the two programs will run.
    20  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:
    21  
    22      ```
    23      wget https://raw.githubusercontent.com/grafana/loki/master/cmd/loki/loki-local-config.yaml
    24      wget https://raw.githubusercontent.com/grafana/loki/main/clients/cmd/promtail/promtail-local-config.yaml
    25      ```
    26  6. Enter the following command to start Loki:
    27  
    28      **Windows**
    29  
    30      ```
    31      .\loki-windows-amd64.exe --config.file=loki-local-config.yaml
    32      ```
    33  
    34      **Linux**
    35      ```
    36      ./loki-linux-amd64 -config.file=loki-local-config.yaml
    37      ```
    38  
    39  Loki runs and displays Loki logs in your command line and on http://localhost:3100/metrics.
    40  
    41  The next step will be running an agent to send logs to Loki.
    42  To do so with Promtail, refer to [get logs into Loki](../../getting-started/get-logs-into-loki/).
    43  
    44  ## Release binaries - openSUSE Linux only
    45  
    46  Every release includes binaries for Loki which can be found on the
    47  [Releases page](https://github.com/grafana/loki/releases).
    48  
    49  ## Community openSUSE Linux packages
    50  
    51  The community provides packages of Loki for openSUSE Linux. To install:
    52  
    53  1. Add the repository `https://download.opensuse.org/repositories/security:/logging/`
    54     to your system. For example, if you are using Leap 15.1, run
    55     `sudo zypper ar https://download.opensuse.org/repositories/security:/logging/openSUSE_Leap_15.1/security:logging.repo ; sudo zypper ref`
    56  1. Install the Loki package with `zypper in loki`
    57  1. Enable the Loki and Promtail services:
    58    - `systemd start loki && systemd enable loki`
    59    - `systemd start promtail && systemd enable promtail`
    60  1. Modify the configuration files as needed: `/etc/loki/promtail.yaml` and
    61     `/etc/loki/loki.yaml`.