Where Does Promtail Store Config?
Promtail reads config.yml in etc promtail and tracks offsets in positions.yaml. Logs ship to Loki server.
Last updated
Promtail config is YAML passed with -config.file. Debian packages default to /etc/promtail/config.yml. That file holds server ports, Loki client URL, positions path, and scrape jobs.
Positions record how far Promtail read into each file. Defaults are /var/log/positions.yaml or /var/lib/promtail/positions.yaml depending on packaging. Docker setups mount the config file and keep positions on a volume. Keep Loki URLs and scrape paths in the same backup, since positions alone cannot rebuild a lost config.
Where Promtail stores this, by platform
/etc/promtail/config.yml
Scrape jobs and Loki client URL. Mount read only in Docker. Validate YAML after edits since one indent error stops startup.
/var/lib/promtail/positions.yaml
Read offsets for tailed files. Keep on persistent storage. Deleting it causes reshipping from scratch.
Frequently asked questions
where is the promtail config file
Packages use /etc/promtail/config.yml and pass it with -config.file. Check the positions block for the offsets file path. Restart promtail after edits and watch the log for scrape errors.
can i delete promtail positions file
Delete positions.yaml while Promtail is stopped to force a fresh tail. Running Promtail recreates it. Expect duplicate log shipping for files already sent to Loki.
Notice an outdated path? Let us know.