[GH-ISSUE #3813] Abnormal shutdown of anythingllm causes data loss #2443

Closed
opened 2026-02-22 18:29:42 -05:00 by yindo · 5 comments
Owner

Originally created by @ayers-ltd on GitHub (May 12, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3813

Use docker compose down to restart the application. No data is lost. However, after the virtual machine is forced to shut down, docker will automatically start and find that the data in the anythingllm working directory is lost. Where can I configure it to take a scheduled snapshot or abnormal shutdown without causing data loss?

Originally created by @ayers-ltd on GitHub (May 12, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3813 Use docker compose down to restart the application. No data is lost. However, after the virtual machine is forced to shut down, docker will automatically start and find that the data in the anythingllm working directory is lost. Where can I configure it to take a scheduled snapshot or abnormal shutdown without causing data loss?
yindo closed this issue 2026-02-22 18:29:42 -05:00
Author
Owner

@ayers-ltd commented on GitHub (May 12, 2025):

my docker-compose.yml

services:
  anythingllm:
    image: anythingllm-anything-llm:v5
    container_name: anythingllm
    ports:
    - "3001:3001"
    cap_add:
      - SYS_ADMIN
    environment:
    # Adjust for your environment
      - STORAGE_DIR=/app/server/storage
      - JWT_SECRET="make this a large list of random numbers and letters 20+"
      # - LLM_PROVIDER=ollama
      - LLM_PROVIDER=volcdeepseek
      - OLLAMA_BASE_PATH=http://127.0.0.1:11434
      - OLLAMA_MODEL_PREF=llama2
      - OLLAMA_MODEL_TOKEN_LIMIT=4096
      # - EMBEDDING_ENGINE=ollama
      # - EMBEDDING_BASE_PATH=http://127.0.0.1:11434
      # - EMBEDDING_MODEL_PREF=nomic-embed-text:latest
      # - EMBEDDING_MODEL_MAX_CHUNK_LENGTH=8192
      - VECTOR_DB=lancedb
      - WHISPER_PROVIDER=local
      - TTS_PROVIDER=native
      - PASSWORDMINCHAR=8
      # Add any other keys here for services or settings
      # you can find in the docker/.env.example file
    volumes:
      - anythingllm_storage:/app/server/storage
    restart: always

volumes:
  anythingllm_storage:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: /data/anythingllm-xb/data

@ayers-ltd commented on GitHub (May 12, 2025): my docker-compose.yml ``` services: anythingllm: image: anythingllm-anything-llm:v5 container_name: anythingllm ports: - "3001:3001" cap_add: - SYS_ADMIN environment: # Adjust for your environment - STORAGE_DIR=/app/server/storage - JWT_SECRET="make this a large list of random numbers and letters 20+" # - LLM_PROVIDER=ollama - LLM_PROVIDER=volcdeepseek - OLLAMA_BASE_PATH=http://127.0.0.1:11434 - OLLAMA_MODEL_PREF=llama2 - OLLAMA_MODEL_TOKEN_LIMIT=4096 # - EMBEDDING_ENGINE=ollama # - EMBEDDING_BASE_PATH=http://127.0.0.1:11434 # - EMBEDDING_MODEL_PREF=nomic-embed-text:latest # - EMBEDDING_MODEL_MAX_CHUNK_LENGTH=8192 - VECTOR_DB=lancedb - WHISPER_PROVIDER=local - TTS_PROVIDER=native - PASSWORDMINCHAR=8 # Add any other keys here for services or settings # you can find in the docker/.env.example file volumes: - anythingllm_storage:/app/server/storage restart: always volumes: anythingllm_storage: driver: local driver_opts: type: none o: bind device: /data/anythingllm-xb/data ```
Author
Owner

@timothycarambat commented on GitHub (May 12, 2025):

https://docs.anythingllm.com/installation-docker/local-docker#run-the-image

@timothycarambat commented on GitHub (May 12, 2025): https://docs.anythingllm.com/installation-docker/local-docker#run-the-image
Author
Owner

@timothycarambat commented on GitHub (May 12, 2025):

That will bind a host folder to the container so you can stop/restart/repull any new image and always have all of your data

@timothycarambat commented on GitHub (May 12, 2025): That will bind a host folder to the container so you can stop/restart/repull any new image and always have all of your data
Author
Owner

@ayers-ltd commented on GitHub (May 13, 2025):

As shown in docker-compose.yml
My data directory has been configured to be persistent. The current problem is that forcibly shutting down the virtual machine will cause the working directory data of anythingllm to be lost

@ayers-ltd commented on GitHub (May 13, 2025): As shown in docker-compose.yml My data directory has been configured to be persistent. The current problem is that forcibly shutting down the virtual machine will cause the working directory data of anythingllm to be lost
Author
Owner

@timothycarambat commented on GitHub (May 13, 2025):

forcibly shutting down the virtual machine

Are you sure this is not related to the VM data being ephemeral? The compose and docker would work with that outline and this very much seems like the VM data persistence and not the docker engine not binding to the correct storage.

With the VM running, if starting and stopping the docker container does not result in data loss - then the issue is however you are running the VM and its attached volume, and that is something you would need to address since it's unrelated to AntyhingLLM

@timothycarambat commented on GitHub (May 13, 2025): > forcibly shutting down the virtual machine Are you sure this is not related to the VM data being ephemeral? The compose and docker would work with that outline and this very much seems like the VM data persistence and not the docker engine not binding to the correct storage. With the VM running, if starting and stopping the docker container does not result in data loss - then the issue is however you are running the VM and its attached volume, and that is something you would need to address since it's unrelated to AntyhingLLM
yindo changed title from Abnormal shutdown of anythingllm causes data loss to [GH-ISSUE #3813] Abnormal shutdown of anythingllm causes data loss 2026-06-05 14:46:34 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2443