Files
serverAppConfigs/docs/Infrastructure/Loki.md
T
Frank e3eb5334cb feat: initialize serverAppConfigs with podman stacks for Dankserver and Dankclaw
- Dankserver stack: RomM, Copyparty, Calibre-Web, node-exporter
- Dankclaw stack: Gluetun VPN (SearXNG tunnel), SearXNG+Valkey, ComfyUI
  (CPU backend), OpenWebUI, Hermes, Gitea+Postgres (migrated), Caddy
  reverse proxy, Grafana+Prometheus+Loki+Alloy observability
- Caddyfiles with .local hostname convention and basicauth homepage
- bind-mount storage policy, no named volumes
- deploy.sh mirroring vllmScripts git workflow (push -> pull -> restart -> health)
- docs/ Obsidian vault: per-service docs from frank-default-small research
  subagents (promtail EOL -> Alloy; gitea SECRET_KEY preservation; ComfyUI --cpu)
- bats test suite at 6 seams — 22 tests green
2026-08-13 20:19:41 -07:00

1.6 KiB

Loki

Loki is the log aggregation backend of the observability stack. It stores and queries container and system logs, and it feeds the log panels in Grafana. It replaces the need for a full ELK stack.

Host: Dankclaw — Docs: https://grafana.com/docs/loki/latest

Facts (from research)

Item Value
Image grafana/loki:latest
Port 3100 (host) → 3100 (container)
Mode single-binary (all components in one process)
Storage filesystem (bind mount)
Auth auth_enabled: false (single-tenant homelab)
Schema v13 / TSDB

Configuration

Config lives at shared/loki/loki-config.yaml. Key settings:

  • schema_config v13 with store: tsdb and filesystem object store.
  • compactor with retention_enabled: true so logs do not grow without bound.
  • replication_factor: 1 for a single instance.

Volumes

Container path Host path (convention)
/loki /opt/loki/data
/etc/loki/loki-config.yaml shared/loki/loki-config.yaml (bind mount)

Healthcheck

Loki responds on /ready with 200.

Log Shipping

The Alloy agent on each host ships container and journal logs to Loki. Grafana queries Loki through the datasource in Observability.

Gotchas

  • Filesystem storage grows; enable compactor retention.
  • Loki and Promtail/Alloy must agree on the push URL: http://loki:3100/loki/api/v1/push.
  • For multi-host shipping, Loki's HTTP listener binds 0.0.0.0.

See Also