[GH-ISSUE #477] docker nor docker-compose works #273

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

Originally created by @manuelkamp on GitHub (Dec 19, 2023).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/477

i tried to get anything-llm running, but failed. tried on Ubuntu 20.04 and 22.04. I could not get plain docker to run, nor docker compose. For docker I used this procedure on plain fresh ubuntus:

apt install docker-ce -y
systemctl enable docker
systemctl start docker
mkdir -p /home/anythingllm  
touch /home/anythingllm/.env 
docker pull mintplexlabs/anythingllm:master
docker run -d -p 3001:3001 --cap-add SYS_ADMIN -v /home/anythingllm:/app/server/storage -v /home/anythingllm/.env:/app/server/.env -e STORAGE_DIR="/app/server/storage" mintplexlabs/anythingllm:master

and then:
curl http://localhost:3001
curl: (7) Failed to connect to localhost port 3001: Connection refused

for docker-compose I installed docker-ce and docker-compose also on 20.04 and 22.04 and tried two different approaches: first one with prebuilt file with this docker-compose.yaml:

version: '3.9'

name: anythingllm

networks:
  anything-llm:
    driver: bridge

services:
  anything-llm:
    container_name: anything-llm
    image: mintplexlabs/anythingllm:master
    platform: linux/amd64
    cap_add:
      - SYS_ADMIN
    volumes:
      - "./.env:/app/server/.env"
      - "../server/storage:/app/server/storage"
      - "../collector/hotdir/:/app/collector/hotdir"
      - "../collector/outputs/:/app/collector/outputs"
    user: "${UID:-1000}:${GID:-1000}"
    ports:
      - "3001:3001"
    env_file:
      - .env
    networks:
      - anything-llm

after docker-compose up -d (respectively docker compose up -d on 22.04) and curl http://localhost:3001 i get:
curl: (7) Failed to connect to localhost port 3001: Connection refused

the second approach was to build it myself and use docker-compose, but I could not get it to build. first, this error happened #474, after I added the file manually from an older branch that continues but then some build error occured which I am not able to debug nor understand how to get around it - searching did not help me find any solution (unfortunately I did not copy-paste it to document it here). I am about giving up anythingLLM, never had such an experience setting up a docker or docker-compose...

EDIT: I tried to look into the issue with plain docker. after docker run... the command docker ps shows the container running for a few seconds, repeating the command shows that it stops itself for some reason (it is no longer visible in docker ps)

EDIT2: docker logs shows this, I have no clue what this means...

root@srv-gptui:~# docker logs 3505c5c29aff
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.0) to ./node_modules/@prisma/client in 389ms

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


warn Versions of prisma@5.3.1 and @prisma/client@5.3.0 don't match.
This might lead to unexpected behavior.
Please make sure they have the same version.
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
Originally created by @manuelkamp on GitHub (Dec 19, 2023). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/477 i tried to get anything-llm running, but failed. tried on Ubuntu 20.04 and 22.04. I could not get plain docker to run, nor docker compose. For docker I used this procedure on plain fresh ubuntus: ``` apt install docker-ce -y systemctl enable docker systemctl start docker mkdir -p /home/anythingllm touch /home/anythingllm/.env docker pull mintplexlabs/anythingllm:master docker run -d -p 3001:3001 --cap-add SYS_ADMIN -v /home/anythingllm:/app/server/storage -v /home/anythingllm/.env:/app/server/.env -e STORAGE_DIR="/app/server/storage" mintplexlabs/anythingllm:master ``` and then: curl http://localhost:3001 curl: (7) Failed to connect to localhost port 3001: Connection refused for docker-compose I installed docker-ce and docker-compose also on 20.04 and 22.04 and tried two different approaches: first one with prebuilt file with this docker-compose.yaml: ``` version: '3.9' name: anythingllm networks: anything-llm: driver: bridge services: anything-llm: container_name: anything-llm image: mintplexlabs/anythingllm:master platform: linux/amd64 cap_add: - SYS_ADMIN volumes: - "./.env:/app/server/.env" - "../server/storage:/app/server/storage" - "../collector/hotdir/:/app/collector/hotdir" - "../collector/outputs/:/app/collector/outputs" user: "${UID:-1000}:${GID:-1000}" ports: - "3001:3001" env_file: - .env networks: - anything-llm ``` after docker-compose up -d (respectively docker compose up -d on 22.04) and curl http://localhost:3001 i get: curl: (7) Failed to connect to localhost port 3001: Connection refused the second approach was to build it myself and use docker-compose, but I could not get it to build. first, this error happened #474, after I added the file manually from an older branch that continues but then some build error occured which I am not able to debug nor understand how to get around it - searching did not help me find any solution (unfortunately I did not copy-paste it to document it here). I am about giving up anythingLLM, never had such an experience setting up a docker or docker-compose... EDIT: I tried to look into the issue with plain docker. after docker run... the command docker ps shows the container running for a few seconds, repeating the command shows that it stops itself for some reason (it is no longer visible in docker ps) EDIT2: docker logs shows this, I have no clue what this means... ``` root@srv-gptui:~# docker logs 3505c5c29aff 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.0) to ./node_modules/@prisma/client in 389ms 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 warn Versions of prisma@5.3.1 and @prisma/client@5.3.0 don't match. This might lead to unexpected behavior. Please make sure they have the same version. 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 ```
yindo closed this issue 2026-02-22 18:18:40 -05:00
Author
Owner

@timothycarambat commented on GitHub (Dec 19, 2023):

This is because you are building from source which is not recommended

The issue with your last build is that you likely didn't run yarn setup prior to all of this, so the server/storage/anythingllm.db sqlite file does not exist, so it cannot be migrated. Nevermind, I saw you ran this prior

touch server/storage/anythingllm.db and then build again and it will boot.

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

@timothycarambat commented on GitHub (Dec 19, 2023): This is because you are building from source [which is not recommended](https://github.com/Mintplex-Labs/anything-llm/blob/master/docker/HOW_TO_USE_DOCKER.md#recommend-way-to-run-dockerized-anythingllm) ~The issue with your last build is that you likely didn't run `yarn setup` prior to all of this, so the `server/storage/anythingllm.db` sqlite file does not exist, so it cannot be migrated.~ Nevermind, I saw you ran this prior `touch server/storage/anythingllm.db` and then build again and it will boot. > SQLite database error > unable to open database file: ../storage/anythingllm.db
Author
Owner

@timothycarambat commented on GitHub (Dec 19, 2023):

Now that i think about it, the prisma:generate should create the file but depending on permissions it may not.

Either way, the DB file was missing, that is what those logs are telling you!

@timothycarambat commented on GitHub (Dec 19, 2023): Now that i think about it, the prisma:generate should create the file but depending on permissions it may not. Either way, the DB file was missing, that is what those logs are telling you!
Author
Owner

@manuelkamp commented on GitHub (Dec 19, 2023):

right, the issue is, I am running in root context and with adding -u root it works

@manuelkamp commented on GitHub (Dec 19, 2023): right, the issue is, I am running in root context and with adding -u root it works
yindo changed title from docker nor docker-compose works to [GH-ISSUE #477] docker nor docker-compose works 2026-06-05 14:34:24 -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#273