[GH-ISSUE #1185] [BUG]: get error while run as a docker container #730

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

Originally created by @sydongda on GitHub (Apr 25, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1185

How are you running AnythingLLM?

Docker (local)

What happened?

the container exited with error, check with cmd: sudo docker logs xx, get below error message:

Collector hot directory and tmp storage wiped!
Document processor app listening on port 8888
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma

✔ Generated Prisma Client (v5.3.1) to ./node_modules/@prisma/client in 605ms

Start using Prisma Client in Node.js (See: https://pris.ly/d/client)

import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()

or start using Prisma Client at the edge (See: https://pris.ly/d/accelerate)

import { PrismaClient } from '@prisma/client/edge'
const prisma = new PrismaClient()


See other ways of importing Prisma Client: http://pris.ly/d/importing-client

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?

 export STORAGE_LOCATION=/mnt/anyllm/docker_cotainer && mkdir -p $STORAGE_LOCATION && touch "$STORAGE_LOCATION/.env" && sudo docker run -d -p 3001:3001 --cap-add SYS_ADMIN -v ${STORAGE_LOCATION}:/app/server/storage -v ${STORAGE_LOCATION}/.env:/app/server/.env -e STORAGE_DIR="/app/server/storage" mintplexlabs/anythingllm

sudo docker ps -a
Originally created by @sydongda on GitHub (Apr 25, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1185 ### How are you running AnythingLLM? Docker (local) ### What happened? the container exited with error, check with cmd: sudo docker logs xx, get below error message: ``` Collector hot directory and tmp storage wiped! Document processor app listening on port 8888 Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma ✔ Generated Prisma Client (v5.3.1) to ./node_modules/@prisma/client in 605ms Start using Prisma Client in Node.js (See: https://pris.ly/d/client) ``` import { PrismaClient } from '@prisma/client' const prisma = new PrismaClient() ``` or start using Prisma Client at the edge (See: https://pris.ly/d/accelerate) ``` import { PrismaClient } from '@prisma/client/edge' const prisma = new PrismaClient() ``` See other ways of importing Prisma Client: http://pris.ly/d/importing-client 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? ``` export STORAGE_LOCATION=/mnt/anyllm/docker_cotainer && mkdir -p $STORAGE_LOCATION && touch "$STORAGE_LOCATION/.env" && sudo docker run -d -p 3001:3001 --cap-add SYS_ADMIN -v ${STORAGE_LOCATION}:/app/server/storage -v ${STORAGE_LOCATION}/.env:/app/server/.env -e STORAGE_DIR="/app/server/storage" mintplexlabs/anythingllm sudo docker ps -a ```
yindo added the possible bug label 2026-02-22 18:21:04 -05:00
yindo closed this issue 2026-02-22 18:21:04 -05:00
Author
Owner

@sydongda commented on GitHub (Apr 25, 2024):

linux version:

uname -a
Linux xxx 5.15.0-1061-azure #70~20.04.1-Ubuntu SMP Mon Apr 8 15:38:58 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
@sydongda commented on GitHub (Apr 25, 2024): linux version: ``` uname -a Linux xxx 5.15.0-1061-azure #70~20.04.1-Ubuntu SMP Mon Apr 8 15:38:58 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux ```
Author
Owner

@timothycarambat commented on GitHub (Apr 25, 2024):

You cannot write to /mnt unless you chmod 777 that folder you are using for storage. The reason it cannot interact with the database is permission related, modify the permissions so the docker user can write and it will work

@timothycarambat commented on GitHub (Apr 25, 2024): You cannot write to `/mnt` unless you chmod 777 that folder you are using for storage. The reason it cannot interact with the database is permission related, modify the permissions so the docker user can write and it will work
Author
Owner

@sydongda commented on GitHub (Apr 25, 2024):

thanks a lot @timothycarambat .

@sydongda commented on GitHub (Apr 25, 2024): thanks a lot @timothycarambat .
yindo changed title from [BUG]: get error while run as a docker container to [GH-ISSUE #1185] [BUG]: get error while run as a docker container 2026-06-05 14:36:54 -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#730