LocalAI/core/services
LocalAI [bot] d200401e86
feat: Add --data-path CLI flag for persistent data separation (#8888)
feat: add --data-path CLI flag for persistent data separation

- Add LOCALAI_DATA_PATH environment variable and --data-path CLI flag
- Default data path: /data (separate from configuration directory)
- Automatic migration on startup: moves agent_tasks.json, agent_jobs.json, collections/, and assets/ from old config dir to new data path
- Backward compatible: preserves old behavior if LOCALAI_DATA_PATH is not set
- Agent state and job directories now use DataPath with proper fallback chain
- Update documentation with new flag and docker-compose example

This separates mutable persistent data (collectiondb, agents, assets, skills) from configuration files, enabling better volume mounting and data persistence in containerized deployments.

Signed-off-by: localai-bot <localai-bot@noreply.github.com>
Co-authored-by: localai-bot <localai-bot@noreply.github.com>
2026-03-09 14:11:15 +01:00
..
agent_jobs.go feat: Add --data-path CLI flag for persistent data separation (#8888) 2026-03-09 14:11:15 +01:00
agent_jobs_test.go feat(loader): enhance single active backend to support LRU eviction (#7535) 2025-12-12 12:28:38 +01:00
agent_pool.go feat: Add --data-path CLI flag for persistent data separation (#8888) 2026-03-09 14:11:15 +01:00
agent_pool_sse.go feat: add agentic management (#8820) 2026-03-07 00:03:08 +01:00
backend_monitor.go chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
backends.go chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
backends_test.go fix(gallery): Use YAML v3 to avoid merging maps with incompatible keys (#8580) 2026-02-16 14:10:19 +01:00
gallery.go feat(ui): allow to cancel ops (#7264) 2025-11-13 18:41:47 +01:00
list_models.go feat(backends): add system backend, refactor (#6059) 2025-08-14 19:38:26 +02:00
metrics.go chore(refactor): move logging to common package based on slog (#7668) 2025-12-21 19:33:13 +01:00
models.go fix(gallery): Use YAML v3 to avoid merging maps with incompatible keys (#8580) 2026-02-16 14:10:19 +01:00
operation.go feat(ui): add mask to install custom backends (#7559) 2025-12-13 19:11:32 +01:00
services_suite_test.go feat: agent jobs panel (#7390) 2025-11-28 23:05:39 +01:00