---
title: "Run Grafana Alloy in a Docker container | Grafana Cloud documentation"
description: "Learn how to install Grafana Alloy on Docker"
---

# Run Grafana Alloy in a Docker container

Alloy is available as a Docker container image on the following platforms:

- [Linux containers](#run-a-linux-docker-container) for AMD64 and ARM64.
- macOS for AMD64 (Intel) and ARM64 (Apple Silicon) using [Docker Desktop](https://www.docker.com/products/docker-desktop/).
- [Windows containers](#run-a-windows-docker-container) for AMD64.

> Note
> 
> On macOS, Docker Desktop manages a Linux virtual machine transparently, so the Linux container commands work without modification.

## Before you begin

- Install [Docker](https://docker.io) or [Docker Desktop](https://www.docker.com/products/docker-desktop/) on your computer.
- Create and save an Alloy configuration file on your computer, for example:
  
  Alloy ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy
  
  ```alloy
  logging {
    level  = "info"
    format = "logfmt"
  }
  ```

## Run a Linux Docker container

To run Alloy as a Linux Docker container, run the following command in a terminal window:

shell ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```shell
docker run \
  -v <CONFIG_FILE_PATH>:/etc/alloy/config.alloy \
  -p 12345:12345 \
  grafana/alloy:latest \
    run --server.http.listen-addr=0.0.0.0:12345 --storage.path=/var/lib/alloy/data \
    /etc/alloy/config.alloy
```

Replace the following:

- *`<CONFIG_FILE_PATH>`* : The path of the configuration file on your host system.

You can modify the last line to change the arguments passed to the Alloy binary. Refer to the documentation for [run](/docs/grafana-cloud/send-data/alloy/reference/cli/run) for more information about the options available to the `run` command.

> Note
> 
> Make sure you pass `--server.http.listen-addr=0.0.0.0:12345` as an argument as shown in the example. If you don’t pass this argument, the [debugging UI](/docs/grafana-cloud/send-data/alloy/troubleshoot/debug/#alloy-ui) won’t be available outside of the Docker container.

### BoringCrypto images

> Note
> 
> BoringCrypto support is in *Public preview* and is only available on AMD64 and ARM64 platforms.

BoringCrypto images are published with every release starting with version 1.1:

- The current BoringCrypto image is published as `grafana/alloy:boringcrypto`.
- A specific version of the BoringCrypto image is published as `grafana/alloy:<VERSION>-boringcrypto`, such as `grafana/alloy:v1.1.0-boringcrypto`.

## Run a Windows Docker container

To run Alloy as a Windows Docker container, run the following command in a terminal window:

shell ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```shell
docker run \
  -v "<CONFIG_FILE_PATH>:C:\Program Files\GrafanaLabs\Alloy\config.alloy" \
  -p 12345:12345 \
  grafana/alloy:windowsservercore-ltsc2022 \
    run --server.http.listen-addr=0.0.0.0:12345 "--storage.path=C:\ProgramData\GrafanaLabs\Alloy\data" \
    "C:\Program Files\GrafanaLabs\Alloy\config.alloy"
```

Replace the following:

- *`<CONFIG_FILE_PATH>`* : The path of the configuration file on your host system.

You can modify the last line to change the arguments passed to the Alloy binary. Refer to the documentation for [run](/docs/grafana-cloud/send-data/alloy/reference/cli/run) for more information about the options available to the `run` command.

> Note
> 
> Make sure you pass `--server.http.listen-addr=0.0.0.0:12345` as an argument as shown in the example above. If you don’t pass this argument, the [debugging UI](/docs/grafana-cloud/send-data/alloy/troubleshoot/debug/#alloy-ui) won’t be available outside of the Docker container.

## Verify

To verify that Alloy is running successfully, navigate to [http://localhost:12345](http://localhost:12345) and make sure the Alloy [UI](/docs/grafana-cloud/send-data/alloy/troubleshoot/debug) loads without error.
