1---
2title: Local
3weight: 40
4---
5# Install and run Grafana Loki locally
6
7In 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
11The configuration specifies running Loki as a single binary.
12
13## Install
14
151. Navigate to the [release page](https://github.com/grafana/loki/releases/).
162. Scroll down to the Assets section under the version that you want to install.
173. 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.
194. Unzip the package contents into the same directory. This is where the two programs will run.
205. 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    ```
266. 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
39Loki runs and displays Loki logs in your command line and on http://localhost:3100/metrics.
40
41The next step will be running an agent to send logs to Loki.
42To do so with Promtail, refer to [get logs into Loki](../../getting-started/get-logs-into-loki/).
43
44## Release binaries - openSUSE Linux only
45
46Every 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
51The community provides packages of Loki for openSUSE Linux. To install:
52
531. 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`
561. Install the Loki package with `zypper in loki`
571. Enable the Loki and Promtail services:
58  - `systemd start loki && systemd enable loki`
59  - `systemd start promtail && systemd enable promtail`
601. Modify the configuration files as needed: `/etc/loki/promtail.yaml` and
61   `/etc/loki/loki.yaml`.
62