Menu
Grafana Cloud

Install Grafana Alloy on Linux

You can install Alloy as a systemd service on Linux.

Before you begin

Some Debian-based cloud Virtual Machines don’t have GPG installed by default. To install GPG in your Linux Virtual Machine, run the following command in a terminal window.

shell
sudo apt install gpg

Install

To install Alloy on Linux, run the following commands in a terminal window.

  1. Import the GPG key and add the Grafana package repository.

    Debian-Ubuntu
    sudo mkdir -p /etc/apt/keyrings/
    wget -q -O - https://apt.grafana.com/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/grafana.gpg > /dev/null
    echo "deb [signed-by=/etc/apt/keyrings/grafana.gpg] https://apt.grafana.com stable main" | sudo tee /etc/apt/sources.list.d/grafana.list
    RHEL-Fedora
    wget -q -O gpg.key https://rpm.grafana.com/gpg.key
    sudo rpm --import gpg.key
    echo -e '[grafana]\nname=grafana\nbaseurl=https://rpm.grafana.com\nrepo_gpgcheck=1\nenabled=1\ngpgcheck=1\ngpgkey=https://rpm.grafana.com/gpg.key\nsslverify=1\nsslcacert=/etc/pki/tls/certs/ca-bundle.crt' | sudo tee /etc/yum.repos.d/grafana.repo
    SUSE-openSUSE
    wget -q -O gpg.key https://rpm.grafana.com/gpg.key
    sudo rpm --import gpg.key
    sudo zypper addrepo https://rpm.grafana.com grafana
  2. Update the repositories.

    Debian-Ubuntu
    sudo apt-get update
    RHEL-Fedora
    yum update
    SUSE-openSUSE
    sudo zypper update
  3. Install Alloy.

    Debian-Ubuntu
    sudo apt-get install alloy
    RHEL-Fedora
    sudo dnf install alloy
    SUSE-openSUSE
    sudo zypper install alloy

Uninstall

To uninstall Alloy on Linux, run the following commands in a terminal window.

  1. Stop the systemd service for Alloy.

    All-distros
    sudo systemctl stop alloy
  2. Uninstall Alloy.

    Debian-Ubuntu
    sudo apt-get remove alloy
    RHEL-Fedora
    sudo dnf remove alloy
    SUSE-openSUSE
    sudo zypper remove alloy
  3. Optional: Remove the Grafana repository.

    Debian-Ubuntu
    sudo rm -i /etc/apt/sources.list.d/grafana.list
    RHEL-Fedora
    sudo rm -i /etc/yum.repos.d/rpm.grafana.repo
    SUSE-openSUSE
    sudo zypper removerepo grafana

Next steps