diff --git a/ansible/roles/apps/templates/settings/loki-stack.yaml b/ansible/roles/apps/templates/settings/loki-stack.yaml
index 2fef13cb58aa0bcde48fbc37241558f6cfdfff99..eb907bb994d0414a66f24dd4334465d12fb03f86 100644
--- a/ansible/roles/apps/templates/settings/loki-stack.yaml
+++ b/ansible/roles/apps/templates/settings/loki-stack.yaml
@@ -10,6 +10,37 @@ loki:
     requests:
       cpu: 200m
       memory: 90Mi
+  config:
+    # https://github.com/grafana/loki/blob/main/cmd/loki/loki-local-config.yaml
+    # https://grafana.com/docs/loki/latest/operations/storage/retention
+    schema_config:
+      configs:
+      - from: 2020-10-24
+        store: boltdb-shipper
+        object_store: filesystem
+        schema: v11
+        index:
+          prefix: index_
+          period: 168h  # 7 days
+    storage_config:
+      boltdb_shipper:
+        active_index_directory: /tmp/loki/boltdb-shipper-active
+        cache_location: /tmp/loki/boltdb-shipper-cache
+        cache_ttl: 24h         # Can be increased for faster performance over longer query periods, uses more disk space
+        shared_store: filesystem
+      filesystem:
+        directory: /tmp/loki/chunks
+    compactor:
+      working_directory: /tmp/loki/boltdb-shipper-compactor
+      shared_store: filesystem
+    limits_config:
+      reject_old_samples: true
+      reject_old_samples_max_age: 168h  # 7 days
+    chunk_store_config:
+      max_look_back_period: 672h # 28 days
+    table_manager:
+      retention_deletes_enabled: true
+      retention_period: 672h  # 28 days
 
 promtail:
   # https://github.com/grafana/helm-charts/blob/main/charts/promtail/values.yaml