Caution
Grafana Alloy is the new name for our distribution of the OTel collector. Grafana Agent has been deprecated and is in Long-Term Support (LTS) through October 31, 2025. Grafana Agent will reach an End-of-Life (EOL) on November 1, 2025. Read more about why we recommend migrating to Grafana Alloy.
Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
Run Grafana Agent in flow mode in a Docker container
Grafana Agent is available as a Docker container image on the following platforms:
- Linux containers for AMD64 and ARM64.
- Windows containers for AMD64.
Before you begin
Install Docker on your computer.
Create and save a Grafana Agent River configuration file on your computer, for example:
logging { level = "info" format = "logfmt" }
Run a Linux Docker container
To run Grafana Agent in flow mode as a Linux Docker container, run the following command in a terminal window:
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 CONFIG_FILE_PATH
with 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 binary.
Refer to the documentation for 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 won’t be available outside of the Docker container.
Run a Windows Docker container
To run Grafana Agent in flow mode as a Windows Docker container, run the following command in a terminal window:
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 CONFIG_FILE_PATH
with 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 binary.
Refer to the documentation for 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 won’t be available outside of the Docker container.
Verify
To verify that Grafana Agent is running successfully, navigate to http://localhost:12345 and make sure the Grafana Agent UI loads without error.