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

# Run Grafana Agent Flow in a Docker container

Grafana Agent Flow is available as a Docker container image on the following platforms:

- [Linux containers](#run-a-linux-docker-container) for AMD64 and ARM64.
- [Windows containers](#run-a-windows-docker-container) for AMD64.

## Before you begin

- Install [Docker](https://docker.io) on your computer.
- Create and save a Grafana Agent Flow River 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 Grafana Agent Flow 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 \
  -e AGENT_MODE=flow \
  -v <CONFIG_FILE_PATH>:/etc/agent/config.river \
  -p 12345:12345 \
  grafana/agent:latest \
    run --server.http.listen-addr=0.0.0.0:12345 /etc/agent/config.river
```

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 Grafana Agent Flow binary. Refer to the documentation for [run](/docs/agent/v0.43/flow/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/agent/v0.43/flow/tasks/debug/#grafana-agent-flow-ui) won’t be available outside of the Docker container.

## Run a Windows Docker container

To run Grafana Agent Flow 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 \
  -e AGENT_MODE=flow \
  -v <CONFIG_FILE_PATH>:C:\etc\grafana-agent\config.river \
  -p 12345:12345 \
  grafana/agent:latest-windows \
    run --server.http.listen-addr=0.0.0.0:12345 C:\etc\grafana-agent\config.river
```

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 Grafana Agent Flow binary. Refer to the documentation for [run](/docs/agent/v0.43/flow/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/agent/v0.43/flow/tasks/debug/#grafana-agent-flow-ui) won’t be available outside of the Docker container.

## Verify

To verify that Grafana Agent Flow is running successfully, navigate to [http://localhost:12345](http://localhost:12345) and make sure the Grafana Agent Flow [UI](/docs/agent/v0.43/flow/tasks/debug/#grafana-agent-flow-ui) loads without error.
