AIGenLab
EN

UPDATElightrag v1.5.8

LightRAG v1.5.8 blocks unsafe upgrades and repairs graph writes

Version & typev1.5.8 · Feature
In short

The LightRAG release notes for v1.5.8 bind configuration, embedding space, and deployment identity to each workspace. Mismatched models are refused, graph writes are serialized, and failed deletions are retryable. Back up and stop old instances first; the WebUI moves to accounts and Ollama routes need a key.

What changed in this release

24 checkpoints in 6 groups, organized by task from the official notes. Checkpoints do not count separate features or commits.

Configuration and deployment identity

  • Configuration storage records embedding-space baselines for entities, relationships, and chunks in each workspace.
  • Changing the embedding model on an existing workspace now refuses startup; restore configuration or rebuild vectors.
  • The first start records backend type and container UUID in an anchor file under WORKING_DIR.
  • lightrag-migrate-config migrates configuration across backend types while every server is stopped.

Storage defaults

  • The setup wizard defaults to the official pgvector image and offers PGTableGraphStorage.
  • PGGraphStorage, RedisKVStorage, and RedisDocStatusStorage are deprecated but keep working.
  • Redis deployments fall back to JSON configuration storage and log a startup warning.
  • Servers sharing WORKING_DIR need separate workspaces and ports plus the same configuration storage.

Graph and document lifecycle

  • Manual NetworkX graph writes are serialized against each other and ingestion to prevent interference.
  • Entity and relation commit ordering was reworked to reduce data-loss risk from interruptions.
  • Interrupted document deletions are visible and retryable; failed rebuilds no longer report success.
  • Post-deletion rebuilds re-extract surviving chunks missing their cache; lightrag-repair-chunk-tracking cleans orphan tracking rows.

Login and API access

  • The WebUI uses account-only login and no longer prompts for, stores, or sends API keys.
  • Servers protected only by LIGHTRAG_API_KEY display account-configuration guidance.
  • Ollama-compatible routes reject keyless requests with HTTP 403 when a key is configured.
  • Account passwords over 72 bytes are rejected, and TOKEN_SECRET should be random and at least 32 bytes.

Query and parsing boundaries

  • Failed library queries now raise, allowing callers to separate empty results from failures.
  • Answers containing only a think trace and no text are treated as errors and not cached.
  • Keyword extraction requests JSON mode by default and retries once without the field after rejection.
  • Chunk-size inputs reject values below 64 tokens; already queued documents are unaffected.

Offline migration and cleanup

  • lightrag-clear-storage clears the workspace, configuration storage, and anchor for an embedding-model change.
  • lightrag-gc-llm-cache reports extraction cache for missing chunks; --apply deletes it.
  • Document deletion supports delete_parsed_files and folds LLM cache clearing into the destructive clear.
  • POST /documents/clear_cache is removed; use DELETE /documents?clear_llm_cache=true.

Read the original announcement

On this page
  1. Release inventory
  2. This release protects dat…
  3. Configuration storage tie…
  4. PostgreSQL defaults to pg…
  5. Graph writes and document…
  6. The WebUI requires accoun…
  7. Query failures raise erro…
  8. Offline tools turn migrat…
  9. Peer tools manage migrati…
  10. From v1.5.7 to v1.5.8
  11. Release analysis
  12. Sources & method

ContextThis release protects data identity before tightening writes and login

LightRAG v1.5.8 targets knowledge-base handover risks: configuration moving with storage, vectors tracking an old model, deleted text staying in graphs, and mismatched UI/API access.

This article groups the release into six areas: configuration, storage defaults, graph lifecycle, access, queries, and cleanup. It lists the v1.5.8 fixes first, then compares peers and v1.5.7 in two tables.

The figure maps the 6 groups from data identity through storage, writes, deletion, access, queries, and cleanup. The sections below expand each group with its result, action, and cost.

Six LightRAG v1.5.8 change groups follow data identity, storage, writes and deletion, access, queries, and cleanup. Establish configuration and backups before functional acceptance.
Where the 24 grouped changes landWhere the 24 grouped changes landConfiguration and deploymentidentity4Storage defaults4Graph and document lifecycle4Login and API access4Query and parsing boundaries4Offline migration and cleanup4
AIGenLab original

Configuration storage ties workspaces to vector space and deployment identity

  1. Wrong model: restore the original embedding configuration or rebuild with lightrag-rebuild-vdb.
  2. New backend: back up WORKING_DIR and its anchor before changing configuration storage.
  3. Migration: stop servers, use lightrag-migrate-config, or reset with lightrag-clear-storage.

PostgreSQL defaults to pgvector while AGE and Redis become deprecated

  1. New installs: the wizard uses the pgvector image and offers PGTableGraphStorage.
  2. Existing AGE: migrate the graph first; Redis users must persist WORKING_DIR.
  3. Shared directory: separate WORKSPACE and port per server, with one configuration storage.

Graph writes and document deletion stop hiding interruptions behind success

  1. On the NetworkX graph backend, schedule graph edits separately from ingestion because writes are serialized.
  2. Retry interrupted deletions; verify final state because failed rebuilds fail deletion.
  3. Repair tracking with lightrag-repair-chunk-tracking; inspect cache with lightrag-gc-llm-cache.

The WebUI requires accounts and Ollama-compatible routes require an API key

  1. Keep the API key; set AUTH_ACCOUNTS and a random TOKEN_SECRET of at least 32 bytes.
  2. Open WebUI: enter the API key in the Ollama connection’s API key field.
  3. Whitelist: WHITELIST_PATHS=/health,/api/* restores old behavior but bypasses protection.

Query failures raise errors and keyword extraction tolerates JSON-mode rejection

  1. Catch query exceptions and distinguish empty results from failed calls.
  2. Keep KEYWORD_EXTRACTION_JSON_MODE=auto and rerun previously empty local, global, and hybrid queries.
  3. Chunk sizes below 64 tokens are rejected; queued documents are unaffected.

Offline tools turn migration, reset, and cache cleanup into explicit operations

  1. Stop servers and maintenance tools, run lightrag-migrate-config, then set LIGHTRAG_CONFIG_STORAGE.
  2. Back up WORKING_DIR, the anchor, and databases before lightrag-clear-storage.
  3. Review lightrag-gc-llm-cache output before deleting rows with --apply.

Peer tools manage migration and deletion at different control points

LightRAG checks identity at startup and repairs deletion in its graph lifecycle. RAGFlow 1.0.0 migrates at container startup and purges engine data on document removal; GraphRAG 3.3.0 manages upgrades inside its data workflow.

These self-hosted products differ: RAGFlow is a full service, GraphRAG a pipeline, LightRAG a graph server. The table compares official controls, not feature counts.

Choose LightRAG for startup guards and retryable deletion, RAGFlow for automatic container migration, or GraphRAG for custom batch pipelines; prefer the latter two when configuration lives inside the workflow.

UpdateRAGFlow v1.0.0Microsoft GraphRAG v3.3.0LightRAG v1.5.8
Configuration and upgradesAutomatic container migration from v0.27.2; irreversibleMinor-version init; major-version migration notebookEmbedding baselines; offline migration; startup anchor
Deployment form and default componentsDocker for evaluation and production, or source; NATS replaces Redis; Kvrocks for cache and checkpointsPython pipeline and CLI; README marks the code a demonstration and the project in maintenance modepgvector image by default with PGTableGraphStorage offered; AGE and Redis storage deprecated
Graph and document lifecycleRemoveDocumentKeepFile purges engine dataEntity/relation/claim extraction; TextUnit referencesSerialized NetworkX writes; retryable deletion; rebuild failures fail
Query and parsingAgentic Chat: retrieval, tools, evidence checksGlobal, Local, DRIFT, Basic searchJSON-mode extraction retries without rejected field
Entry pointBrowser login, then model service address and API keyCLI runs graphrag init --root [path] --force to refresh config formatAccount-only WebUI; keyless Ollama-compatible requests rejected
Operations and leftoversBack up; restore full backup on migration failureConfiguration/prompt backups; reindexing pathMigration, clear, tracking repair, cache cleanup

From v1.5.7 to v1.5.8, the upgrade focus shifts to data integrity

v1.5.7 delivered /workspace, branding, and global prompts; v1.5.8 adds identity, configuration, write, and deletion checks behind them.

Maintenance changes most: configuration migration joins graph migration, and UI work now needs account setup. A new image is not enough.

Reuse the v1.5.7 query scenario with account login; programmatic access keeps API keys. Order: back up, stop every old instance, start once, then check accounts, queries, and deletion recovery.

Featurev1.5.7v1.5.8
End-user entryAdds mobile /workspace chatAccount login; no API-key entry
UI and loginUI branding; USER_PROMPT_PREFIXAccount-only WebUI; TOKEN_SECRET required
PostgreSQL pathAGE-to-PostgreSQL-table migrationpgvector image; PGTableGraphStorage offered; AGE deprecated
Configuration migrationGraph migration; no separate config store describedConfig storage, anchor, cross-backend migration
Embedding changesNo workspace baseline describedBaselines; changed model refused
Graph/deletion recoveryNetworkX returns; incremental chunk identifiersSerialized writes; retryable deletion; failed rebuilds fail

Release analysisMaintenance paths need attention before every application needs redesign

Shared workspaces, graph maintenance, model changes, and deletion carry the most work. Reserve a write freeze, back up WORKING_DIR and databases, and reconfigure accounts and Ollama. Stable single-instance applications can wait.

RAGFlow v1.0.0 automates container migration, GraphRAG v3.3.0 manages a batch pipeline, and LightRAG v1.5.8 rejects identity mismatches at startup. Pick the control point that fits your operating model.

Our view, not independently tested: back up, then stop every old instance, including shared-storage servers, workers, and maintenance tools, before the first v1.5.8 start binds the anchor. Run acceptance on a copy isolated from production storage, never with an old writer running.

Our view, not independently tested: record wrong-model rejection, deletion retry, and recovered empty queries, and review reports or backups before destructive migration and cache cleanup.

AIGenLab views

Not independently tested

Back up and stop every old instance, including shared-storage servers, workers, and maintenance tools, then start v1.5.8 to bind the anchor; run acceptance on a copy isolated from production storage.

Based on the first official upgrade note and the deployment-anchor mechanism; our view, not independently tested.

Keep three acceptance records: wrong-model rejection, interrupted-deletion retry, and recovery of previously empty queries.

Acceptance actions for three changes in this release; our view, not independently tested.

Official sources and scope

Dates beside sources indicate when we consulted them, not when the vendor released the update. Procedures are editorial guidance, not independently tested.