Where Does Grafana Alloy Store Its Config?
Alloy reads config.alloy from a fixed OS path. Linux uses /etc/alloy; the service env file can point it elsewhere.
Last updated
Alloy keeps its entire pipeline definition in one file written in Alloy language: receivers, processors, and exporters for metrics, logs, and traces. Package installs place it at /etc/alloy/config.alloy on Linux, under the Homebrew prefix on macOS, and under Program Files on Windows. Edit it and reload (systemctl reload on Linux) to apply.
Local buffering lives separately at /var/lib/alloy (the --storage.path default), which holds WAL segments for undelivered data. That directory matters for crash recovery but rarely needs backup: telemetry already landed remotely replays from sources. Environment secrets sit in config.env beside the config; guard that file since it holds cloud API keys.
Where Grafana Alloy stores this, by platform
/etc/alloy/config.alloy
Pipeline definition in Alloy language. Reload with systemctl reload alloy after edits. CONFIG_FILE in /etc/default/alloy (Debian) or /etc/sysconfig/alloy (RHEL) overrides this path. WAL buffers at /var/lib/alloy.
%ProgramFiles%\GrafanaLabs\Alloy\config.alloy
Same Alloy language file under Program Files. Service managed through the Windows service wrapper. Keep API keys in the companion env configuration, not in the pipeline file.
Frequently asked questions
how do i migrate grafana alloy to a new machine
Copy config.alloy (plus config.env and extra-args.txt when customized) to the same path on the new host and restart the service. Remote state lives in Prometheus, Loki, or Grafana Cloud, so the file is the complete local backup.
can i move the alloy config file elsewhere
Edit the service env file (/etc/default/alloy on Debian/Ubuntu, /etc/sysconfig/alloy on RHEL/SUSE) and set CONFIG_FILE to the new path, then restart. Component positions and the WAL at /var/lib/alloy follow automatically.
Notice an outdated path? Let us know.