LocalAI version:
Container Image: localai/localai:v4.1.2-gpu-nvidia-cuda-13
Environment, CPU architecture, OS, and Version:
Architecture: x86_64
OS: Linux (Debian-based)
Docker Compose deployment
GPU: 3x NVIDIA GPUs (CUDA 13)
Network: Running behind nginx proxy
Describe the bug
Chat conversations in GUI do not persist across browser refreshes or tab changes. When a user refreshes the page or closes and reopens the tab, the entire chat history is lost. No chat history is persisted to disk despite having persistent storage volumes mounted.
To Reproduce
- Start LocalAI container with standard WebUI access
- Open the WebUI in a browser at configured port
- Start a chat conversation - send multiple messages and receive responses
- Refresh the browser page OR close the tab and reopen it
- Observe that the chat history is completely gone
Expected behavior
One of the following should be the expected behavior:
- Chat history persists - Conversations should be saved to disk and restored when the user returns
- Clear documentation - If chat history is not intended to persist, this should be clearly documented
- Configurable option - There should be a documented way to enable/disable chat history persistence
Currently, there is no clear way to configure chat history persistence. The following environment variables were tried but do not exist or have no effect:
LOCALAI_CHAT_HISTORY
LOCALAI_CHAT_HISTORY_ENABLED
LOCALAI_CHAT_STORAGE
LOCALAI_CHAT_HISTORY_DIR
Persistent volumes configured:
- /home/user/localai/backends:/backends:cached
- /home/user/localai/caches:/build/cache
- /home/user/localai/models:/models:cached
- /home/user/localai/tasks:/data
- /home/user/localai/generated_assets:/tmp/generated/content
- /home/user/localai/backends/upload:/tmp/localai/upload
- /home/user/localai/runtime:/configuration
Despite having a /data volume mounted, no chat history files are created.
Additional context
- The issue affects the built-in WebUI
- This makes the chat feature impractical for actual use
- Users expect chat history to persist as a default behavior in most LLM interfaces
- No configuration options for chat history are documented in the LocalAI documentation
- This may be a feature request rather than a bug - but the lack of documentation makes it unclear
Questions for maintainers:
- Am I configuring something wrong?
- Is there a configuration option that is undocumented?
- Is this expected behavior and should the documentation be updated to clarify this?
- Should this be client-side storage (browser localStorage) vs server-side storage?
LocalAI version:
Container Image: localai/localai:v4.1.2-gpu-nvidia-cuda-13
Environment, CPU architecture, OS, and Version:
Describe the bug
Chat conversations in GUI do not persist across browser refreshes or tab changes. When a user refreshes the page or closes and reopens the tab, the entire chat history is lost. No chat history is persisted to disk despite having persistent storage volumes mounted.
To Reproduce
Expected behavior
One of the following should be the expected behavior:
Currently, there is no clear way to configure chat history persistence. The following environment variables were tried but do not exist or have no effect:
LOCALAI_CHAT_HISTORYLOCALAI_CHAT_HISTORY_ENABLEDLOCALAI_CHAT_STORAGELOCALAI_CHAT_HISTORY_DIRPersistent volumes configured:
Despite having a
/datavolume mounted, no chat history files are created.Additional context
Questions for maintainers: