RousselTMLEARNING

Article · Alloy: From Discovery to Expertise

Installation

4. Installation #

Deployment on Linux, Docker, and Kubernetes.

Which method to choose? #

EnvironmentMethodFor
Linux serversdeb or rpm packagesystemd service, updates through the package manager
Workstation, CI, prototypeDockerQuick trial without touching the system
KubernetesHelm chartDaemonSet or cluster (see the dedicated chapter)
No privilegesGitHub binaryOne-off trial

With Docker #

docker run --name alloy \
  -v "$PWD/config.alloy:/etc/alloy/config.alloy" \
  -p 12345:12345 \
  grafana/alloy:v1.21.3 \
  run --server.http.listen-addr=0.0.0.0:12345 \
      --storage.path=/var/lib/alloy/data \
      /etc/alloy/config.alloy
The UI does not respond? By default, Alloy listens on 127.0.0.1:12345, so only inside the container. Hence the --server.http.listen-addr=0.0.0.0:12345 option. Outside a container, keep the default, or protect this port: the UI exposes the configuration.

On Debian or Ubuntu #

sudo mkdir -p /etc/apt/keyrings
sudo wget -O /etc/apt/keyrings/grafana.asc https://apt.grafana.com/gpg-full.key
echo "deb [signed-by=/etc/apt/keyrings/grafana.asc] https://apt.grafana.com stable main" \
  | sudo tee /etc/apt/sources.list.d/grafana.list
sudo apt-get update
sudo apt-get install alloy

sudo systemctl enable --now alloy
sudo systemctl status alloy
sudo journalctl -u alloy -f

The configuration lives in /etc/alloy/config.alloy. Service options are in /etc/default/alloy (/etc/sysconfig/alloy on RHEL): CUSTOM_ARGS takes the listen address, for example.

On Kubernetes #

helm repo add grafana https://grafana.github.io/helm-charts
helm repo update
helm install alloy grafana/alloy -n monitoring --create-namespace -f values.yaml

Deployment and its modes are covered in the Deploying at scale chapter.

Checking the installation #

alloy --version
alloy validate config.alloy
curl http://localhost:12345/-/ready     # Alloy is ready.
curl http://localhost:12345/-/healthy   # All Alloy components are healthy.
curl -X POST http://localhost:12345/-/reload   # config reloaded
CheckExpected response
/-/readyAlloy is ready.
/-/healthyAll Alloy components are healthy.
http://localhost:12345UI and component graph
Best practice: pin a precise image tag (grafana/alloy:v1.21.3), and run alloy validate in your CI before each deployment.

📄 Grafana Alloy: Introduction and Architecture →

My progress

  • ⏱ Estimated time : ≈ 4 min

Sign in to track your progress and take notes. Sign in

⭐ Rate this lesson

4.0 initial rating from the teaching team

Sign in to rate this lesson →

💬 Recent discussions about this course

Ask a question about this lesson →See all discussions about this course

Course Glossary

Grafana Alloy

An open-source, vendor-neutral telemetry collector designed to replace Grafana Agent, fully compatible with OpenTelemetry (OTel).

Recommended Articles

Grafana Alloy: Understanding and exploiting the User Interface (UI)

Discover how to enable, secure, and use Grafana Alloy's built-in web interface to visualize your ...

Grafana Alloy: collecting and transforming telemetry

Learn how to use Grafana Alloy to collect, transform and route logs, metrics and traces. Discover...

The LGTM stack (Loki, Grafana, Tempo, Mimir): architecture and setup

Grafana Labs' LGTM stack: Loki for logs, Grafana for visualization, Tempo for traces, Mimir for m...

Grafana Faro: architecture and installation

Install Grafana Faro: the web SDK (npm or CDN), Alloy's faro.receiver, sending to Loki and Tempo,...

OpenTelemetry Collector, Grafana Alloy and Bindplane: comparing three approaches to telemetry pipelines

Detailed comparison of three ways to manage telemetry pipelines: the OpenTelemetry Collector in Y...

Grafana Cloud: getting started with the managed platform (Mimir, Loki, Tempo, Alloy)

Discover Grafana Cloud: creating a stack, the free tier, sending metrics, logs and traces with Al...

Installing Grafana Loki (Docker Compose, binary and Helm)

Install and validate Grafana Loki: minimal configuration, Docker Compose with Grafana and Alloy, ...

Grafana Alloy: Advanced Deployment and Clustering

Learn how to manage large-scale Grafana Alloy deployments. Configure Clustering mode for high ava...

Grafana Alloy vs Grafana Agent vs Promtail: which one to choose?

Discover how telemetry collectors have evolved in the Grafana ecosystem. A detailed comparison of...

Support us

♥ SUPPORT US

Support RousselTM Learning

Courses, articles, labs and certificates stay free with no intrusive ads. A voluntary contribution, of any amount you choose, pays for hosting, lab environments and new content.

Contribute with PayPal Any amount · card or PayPal accountLearn more
QR code PayPal
Or scan this QR code with your phone

Thank you, every contribution counts!