[GH-ISSUE #3856] [BUG]: Docker container doesn't start #2461

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

Originally created by @olegshulyakov on GitHub (May 20, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3856

How are you running AnythingLLM?

Docker (remote machine)

What happened?

Container does not start. There is an error in logs related to database location:

Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": SQLite database "anythingllm.db" at "file:../storage/anythingllm.db"
Error: Schema engine error:
SQLite database error
unable to open database file: ../storage/anythingllm.db

Are there known steps to reproduce?

Tried to deploy application to Docker with Docker Compose

services:
  anything-llm:
    image: mintplexlabs/anythingllm:latest
    container_name: anything-llm
    restart: on-failure:5
    mem_limit: 2g
    mem_reservation: 128M
    healthcheck:
      test: curl -f http://localhost:3001 || exit 1
    environment:
      - PUID=${PUID:?err}
      - PGID=${PGID:?err}
      - TZ=${TIMEZONE:?err}
      - STORAGE_DIR=/app/server/storage
    volumes:
      - "${FOLDER_FOR_DATA}/anything-llm:/app/server/storage"
    ports:
      - "${WEBUI_PORT_ANYTHING_LLM}:3001"
Originally created by @olegshulyakov on GitHub (May 20, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3856 ### How are you running AnythingLLM? Docker (remote machine) ### What happened? Container does not start. There is an error in logs related to database location: ``` Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma Datasource "db": SQLite database "anythingllm.db" at "file:../storage/anythingllm.db" Error: Schema engine error: SQLite database error unable to open database file: ../storage/anythingllm.db ``` ### Are there known steps to reproduce? Tried to deploy application to Docker with Docker Compose ```yml services: anything-llm: image: mintplexlabs/anythingllm:latest container_name: anything-llm restart: on-failure:5 mem_limit: 2g mem_reservation: 128M healthcheck: test: curl -f http://localhost:3001 || exit 1 environment: - PUID=${PUID:?err} - PGID=${PGID:?err} - TZ=${TIMEZONE:?err} - STORAGE_DIR=/app/server/storage volumes: - "${FOLDER_FOR_DATA}/anything-llm:/app/server/storage" ports: - "${WEBUI_PORT_ANYTHING_LLM}:3001" ```
yindo added the possible bug label 2026-02-22 18:29:46 -05:00
yindo closed this issue 2026-02-22 18:29:46 -05:00
Author
Owner

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

unable to open database file: ../storage/anythingllm.db

It is in the error message, there should be write perms for the container to the place the STORAGE_DIR is being mounted. Likely, it cannot write to the FOLDER_FOR_DATA so chmod -r 777 that folder so the container can r+w

@timothycarambat commented on GitHub (May 20, 2025): > unable to open database file: ../storage/anythingllm.db It is in the error message, there should be write perms for the container to the place the STORAGE_DIR is being mounted. Likely, it cannot write to the `FOLDER_FOR_DATA` so `chmod -r 777` that folder so the container can `r+w`
Author
Owner

@olegshulyakov commented on GitHub (May 20, 2025):

@timothycarambat It has access to ${FOLDER_FOR_DATA}/anything-llm, why does it need to write outside of it? It is good practice to not allow an application to access outside of its starting point for production.

${FOLDER_FOR_DATA} contains config folders for other containers too.

Configuration is based on the instruction in docs.

@olegshulyakov commented on GitHub (May 20, 2025): @timothycarambat It has access to `${FOLDER_FOR_DATA}/anything-llm`, why does it need to write outside of it? It is good practice to not allow an application to access outside of its starting point for production. `${FOLDER_FOR_DATA}` contains config folders for other containers too. Configuration is based on the [instruction in docs](https://github.com/Mintplex-Labs/anything-llm/blob/master/docker/HOW_TO_USE_DOCKER.md).
Author
Owner

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

I meant just the anythingllm folder, it obviously has no need to the parent folder. Just${FOLDER_FOR_DATA}/anything-llm

@timothycarambat commented on GitHub (May 20, 2025): I meant just the anythingllm folder, it obviously has no need to the parent folder. Just`${FOLDER_FOR_DATA}/anything-llm`
yindo changed title from [BUG]: Docker container doesn't start to [GH-ISSUE #3856] [BUG]: Docker container doesn't start 2026-06-05 14:46:42 -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#2461