Centralized chat logs let an administrator inspect conversations outside the chat window. On a self-hosted AnythingLLM instance, DISABLE_VIEW_CHAT_HISTORY blocks administrative chat-history viewing for both workspace conversations and embedded widgets.

The restriction leaves stored messages in place. People can still see their own workspace conversations, and an embedded widget can restore its visitor's session history, so this setting does not provide chat deletion or a data-retention policy.

A Docker installation reads the setting from its mounted environment file when the server starts. The change needs a brief service interruption and access to both the Docker host and instance settings; a known conversation in the administrator's history table provides a before-and-after comparison.

Steps to disable chat history viewing in AnythingLLM:

  1. Open instance settings with the wrench icon at the bottom of the sidebar.
  2. Expand Admin in the settings sidebar.
  3. Open Workspace Chats under Admin.

    Multi-user instances require an administrator or manager account to view this table. The restriction will also apply to those accounts.

  4. Confirm that a known conversation appears in the chat table.

    The pictured Cedar Help row contains a question about 2 plus 3 and the stored reply 5.. A recognizable existing entry makes the later comparison possible; an already-empty table does not establish whether viewing is allowed.

  5. Open the mounted AnythingLLM environment file in Nano with administrator privileges.
    $ sudo nano "$HOME/anythingllm/.env"

    This is the storage file mounted at /app/server/.env by the Docker installation. A different storage directory needs its own path. Existing provider credentials and encryption settings must remain unchanged, and the file must retain its existing ownership and permissions so the container can read it. This method applies to self-hosted Docker, not the desktop application.
    Related: How to run AnythingLLM with Docker

  6. Disable administrative chat-history viewing by adding DISABLE_VIEW_CHAT_HISTORY=“true” at the end of the environment file.
    DISABLE_VIEW_CHAT_HISTORY="true"

    If the variable already exists, replace its line instead of adding a duplicate. AnythingLLM 1.19.0 checks whether the variable is present, so even DISABLE_VIEW_CHAT_HISTORY="false" keeps viewing disabled. Restoring access requires removing the line and restarting the container; changing its value to false does not restore it.

  7. Save the environment file in Nano.

    Ctrl+O, followed by Enter, saves to the existing filename without replacing the file's ownership or permissions.

  8. Exit Nano with Ctrl+X.
  9. Restart the AnythingLLM container to load the setting.

    The restart interrupts active chats and document processing for everyone using this instance. The application is unavailable until the server has started again.

    $ docker restart --timeout 30 anythingllm

    anythingllm is the container name from the Docker installation. The existing container rereads its mounted .env file at startup. A variable originally supplied with docker run -e needs a container recreation to change; a restart alone keeps that container's original environment.

  10. Reload the Workspace Chats page after the application is available again.
  11. Verify that the previously visible conversation rows are no longer displayed.

    In AnythingLLM 1.19.0, Workspace Chats keeps its heading and column headers but displays no rows. The viewer and its export request are refused with HTTP 422 and This feature has been disabled by the administrator.. Chat Embed → History instead shows An error occurred. with Cannot read properties of undefined (reading 'map') in this build. These screens do not mean the saved chats were deleted; normal conversations and a widget visitor's own session history remain available.

  12. Return to workspaces with the back arrow at the bottom of the settings sidebar.
  13. Open your existing conversation from the workspace sidebar.
  14. Enter a short message in the conversation's message box.
  15. Send the message with the upward-arrow button.
  16. Confirm that AnythingLLM displays a completed reply to the new message.
Share this guide