This is documentation for the next version of Alloy. For the latest stable release, go to the latest version.
Run Grafana Alloy in a Docker container
Alloy 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 an Alloy configuration file on your computer, for example:
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:
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 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 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 latest BoringCrypto image is published as
grafana/alloy:boringcrypto
. - A specific version of the BoringCrypto image is published as
grafana/alloy:<VERSION>-boringcrypto
, such asgrafana/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:
docker run \
-v "<CONFIG_FILE_PATH>:C:\Program Files\GrafanaLabs\Alloy\config.alloy" \
-p 12345:12345 \
grafana/alloy:nanoserver-1809 \
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 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 Alloy is running successfully, navigate to http://localhost:12345 and make sure the Alloy UI loads without error.