[GH-ISSUE #4649] [Help] Please help anythingllm docker + local ollama #2951

Closed
opened 2026-02-22 18:31:59 -05:00 by yindo · 4 comments
Owner

Originally created by @SKYC829 on GitHub (Nov 13, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4649

How are you running AnythingLLM?
Docker (local)

What happened?
I'm follow the chatgpt to install docker anything

sudo docker pull mintplexlabs/anythingllm:latest

mkdir -p ~/anythingllm
sudo chown -R 1000:1000 ~/anythingllm
sudo chmod -R 755 ~/anythingllm
sudo docker run -d -p 3001:3001 -v ~/anythingllm:/app/data -e STORAGE_DIR=/app/data mintplexlabs/anythingllm:latest

also vim /etc/systemd/system/ollama.service
Environment="OLLAMA_HOST=0.0.0.0:11434"

systemctl daemon-reload
systemctl restart ollama

launch anything llm in browser and select llm preference

Image

ollama api response:

Image

docker log

[collector] info: [TikTokenTokenizer] Initialized new TikTokenTokenizer instance.
[collector] info: Collector hot directory and tmp storage wiped!
[collector] info: 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 584ms

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

npm notice
npm notice New major version of npm available! 10.8.2 -> 11.6.2
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.6.2
npm notice To update run: npm install -g npm@11.6.2
npm notice
Environment variables loaded from .env
Prisma schema loaded from prisma/schema.prisma
Datasource "db": SQLite database "anythingllm.db" at "file:../storage/anythingllm.db"

SQLite database anythingllm.db created at file:../storage/anythingllm.db

33 migrations found in prisma/migrations

Applying migration `20230921191814_init`
Applying migration `20231101001441_init`
Applying migration `20231101195421_init`
Applying migration `20231129012019_add`
Applying migration `20240113013409_init`
Applying migration `20240118201333_init`
Applying migration `20240202002020_init`
Applying migration `20240206181106_init`
Applying migration `20240206211916_init`
Applying migration `20240208224848_init`
Applying migration `20240210004405_init`
Applying migration `20240216214639_init`
Applying migration `20240219211018_init`
Applying migration `20240301002308_init`
Applying migration `20240326231053_init`
Applying migration `20240405015034_init`
Applying migration `20240412183346_init`
Applying migration `20240425004220_init`
Applying migration `20240430230707_init`
Applying migration `20240510032311_init`
Applying migration `20240618224346_init`
Applying migration `20240821215625_init`
Applying migration `20240824005054_init`
Applying migration `20241003192954_init`
Applying migration `20241029203722_init`
Applying migration `20241029233509_init`
Applying migration `20250102204948_init`
Applying migration `20250226005538_init`
Applying migration `20250318154720_init`
Applying migration `20250506214129_init`
Applying migration `20250709230835_init`
Applying migration `20250725194841_init`
Applying migration `20250808171557_init`

The following migrations have been applied:

migrations/
  └─ 20230921191814_init/
    └─ migration.sql
  └─ 20231101001441_init/
    └─ migration.sql
  └─ 20231101195421_init/
    └─ migration.sql
  └─ 20231129012019_add/
    └─ migration.sql
  └─ 20240113013409_init/
    └─ migration.sql
  └─ 20240118201333_init/
    └─ migration.sql
  └─ 20240202002020_init/
    └─ migration.sql
  └─ 20240206181106_init/
    └─ migration.sql
  └─ 20240206211916_init/
    └─ migration.sql
  └─ 20240208224848_init/
    └─ migration.sql
  └─ 20240210004405_init/
    └─ migration.sql
  └─ 20240216214639_init/
    └─ migration.sql
  └─ 20240219211018_init/
    └─ migration.sql
  └─ 20240301002308_init/
    └─ migration.sql
  └─ 20240326231053_init/
    └─ migration.sql
  └─ 20240405015034_init/
    └─ migration.sql
  └─ 20240412183346_init/
    └─ migration.sql
  └─ 20240425004220_init/
    └─ migration.sql
  └─ 20240430230707_init/
    └─ migration.sql
  └─ 20240510032311_init/
    └─ migration.sql
  └─ 20240618224346_init/
    └─ migration.sql
  └─ 20240821215625_init/
    └─ migration.sql
  └─ 20240824005054_init/
    └─ migration.sql
  └─ 20241003192954_init/
    └─ migration.sql
  └─ 20241029203722_init/
    └─ migration.sql
  └─ 20241029233509_init/
    └─ migration.sql
  └─ 20250102204948_init/
    └─ migration.sql
  └─ 20250226005538_init/
    └─ migration.sql
  └─ 20250318154720_init/
    └─ migration.sql
  └─ 20250506214129_init/
    └─ migration.sql
  └─ 20250709230835_init/
    └─ migration.sql
  └─ 20250725194841_init/
    └─ migration.sql
  └─ 20250808171557_init/
    └─ migration.sql

All migrations have been successfully applied.
┌─────────────────────────────────────────────────────────┐
│  Update available 5.3.1 -> 6.19.0                       │
│                                                         │
│  This is a major update - please follow the guide at    │
│  https://pris.ly/d/major-version-upgrade                │
│                                                         │
│  Run the following to update                            │
│    npm i --save-dev prisma@latest                       │
│    npm i @prisma/client@latest                          │
└─────────────────────────────────────────────────────────┘
[backend] info: [EncryptionManager] Self-assigning key & salt for encrypting arbitrary data.
[backend] info: [TokenManager] Initialized new TokenManager instance for model: gpt-3.5-turbo
[backend] info: [ContextWindowFinder] Pulling remote model map...
[backend] info: [TokenManager] Returning existing instance for model: gpt-3.5-turbo
[backend] info: [TELEMETRY ENABLED] Anonymous Telemetry enabled. Telemetry helps Mintplex Labs Inc improve AnythingLLM.
[backend] info: [ContextWindowFinder] Error syncing remote model map TypeError: fetch failed
    at node:internal/deps/undici/undici:12637:11
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async #pullRemoteModelMap (/app/server/utils/AiProviders/modelMap/index.js:99:37)
[backend] info: prisma:info Starting a sqlite pool with 17 connections.
[backend] info: [TELEMETRY SENT] {"event":"server_boot","distinctId":"b7528b3a-1008-4b62-b323-0a0a6581de32","properties":{"commit":"--","runtime":"docker"}}
[backend] info: [CommunicationKey] RSA key pair generated for signed payloads within AnythingLLM services.
[backend] info: [EncryptionManager] Loaded existing key & salt for encrypting arbitrary data.
[backend] info: Primary server in HTTP mode listening on port 3001
[backend] info: [BackgroundWorkerService] Starting...
[backend] info: [BackgroundWorkerService] Service started with 1 jobs ["cleanup-orphan-documents"]
[backend] info: [MetaGenerator] fetching custom meta tag settings...
[backend] error: Error: The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }).
    at new OpenAI (/app/server/node_modules/openai/index.js:72:19)
    at openAiModels (/app/server/utils/helpers/customModels.js:114:18)
    at getCustomModels (/app/server/utils/helpers/customModels.js:52:20)
    at /app/server/endpoints/system.js:973:41
    at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/server/node_modules/express/lib/router/route.js:149:13)
    at /app/server/utils/middleware/multiUserProtected.js:60:7
    at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/server/node_modules/express/lib/router/route.js:149:13)
    at validatedRequest (/app/server/utils/middleware/validatedRequest.js:20:5)
[backend] error: Error: The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }).
    at new OpenAI (/app/server/node_modules/openai/index.js:72:19)
    at openAiModels (/app/server/utils/helpers/customModels.js:114:18)
    at getCustomModels (/app/server/utils/helpers/customModels.js:52:20)
    at /app/server/endpoints/system.js:973:41
    at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/server/node_modules/express/lib/router/route.js:149:13)
    at /app/server/utils/middleware/multiUserProtected.js:60:7
    at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/server/node_modules/express/lib/router/route.js:149:13)
    at validatedRequest (/app/server/utils/middleware/validatedRequest.js:20:5)
[backend] error: Error: The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }).
    at new OpenAI (/app/server/node_modules/openai/index.js:72:19)
    at openAiModels (/app/server/utils/helpers/customModels.js:114:18)
    at getCustomModels (/app/server/utils/helpers/customModels.js:52:20)
    at /app/server/endpoints/system.js:973:41
    at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/server/node_modules/express/lib/router/route.js:149:13)
    at /app/server/utils/middleware/multiUserProtected.js:60:7
    at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/server/node_modules/express/lib/router/route.js:149:13)
    at validatedRequest (/app/server/utils/middleware/validatedRequest.js:20:5)
prisma:info Starting a sqlite pool with 17 connections.
[backend] info: [141:174]: No direct uploads path found - exiting.
[bg-worker][cleanup-orphan-documents] info: [141:174]: No direct uploads path found - exiting.
[backend] warn: Child process exited with code 0 and signal null
[backend] info: Worker for job "cleanup-orphan-documents" exited with code 0
[backend] error: Error: The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }).
    at new OpenAI (/app/server/node_modules/openai/index.js:72:19)
    at openAiModels (/app/server/utils/helpers/customModels.js:114:18)
    at getCustomModels (/app/server/utils/helpers/customModels.js:52:20)
    at /app/server/endpoints/system.js:973:41
    at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/server/node_modules/express/lib/router/route.js:149:13)
    at /app/server/utils/middleware/multiUserProtected.js:60:7
    at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/server/node_modules/express/lib/router/route.js:149:13)
    at validatedRequest (/app/server/utils/middleware/validatedRequest.js:20:5)
[backend] error: TypeError: fetch failed
    at node:internal/deps/undici/undici:12637:11
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ollamaAIModels (/app/server/utils/helpers/customModels.js:372:18)
    at async getCustomModels (/app/server/utils/helpers/customModels.js:58:14)
    at async /app/server/endpoints/system.js:973:35
[backend] error: TypeError: fetch failed
    at node:internal/deps/undici/undici:12637:11
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ollamaAIModels (/app/server/utils/helpers/customModels.js:372:18)
    at async getCustomModels (/app/server/utils/helpers/customModels.js:58:14)
    at async /app/server/endpoints/system.js:973:35
a
[backend] error: Error: The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }).
    at new OpenAI (/app/server/node_modules/openai/index.js:72:19)
    at openAiModels (/app/server/utils/helpers/customModels.js:114:18)
    at getCustomModels (/app/server/utils/helpers/customModels.js:52:20)
    at /app/server/endpoints/system.js:973:41
    at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/server/node_modules/express/lib/router/route.js:149:13)
    at /app/server/utils/middleware/multiUserProtected.js:60:7
    at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5)
    at next (/app/server/node_modules/express/lib/router/route.js:149:13)
    at validatedRequest (/app/server/utils/middleware/validatedRequest.js:20:5)
b
[backend] error: TypeError: fetch failed
    at node:internal/deps/undici/undici:12637:11
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ollamaAIModels (/app/server/utils/helpers/customModels.js:372:18)
    at async getCustomModels (/app/server/utils/helpers/customModels.js:58:14)
    at async /app/server/endpoints/system.js:973:35
[backend] error: TypeError: fetch failed
    at node:internal/deps/undici/undici:12637:11
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ollamaAIModels (/app/server/utils/helpers/customModels.js:372:18)
    at async getCustomModels (/app/server/utils/helpers/customModels.js:58:14)
    at async /app/server/endpoints/system.js:973:35
c
[backend] info: EmbeddingEngine changed from undefined to native - resetting undefined namespaces
[backend] info: [Event Logged] - workspace_vectors_reset
[backend] info: Resetting anythingllm managed vector namespaces for
/usr/local/bin/docker-entrypoint.sh: line 24:   141 Illegal instruction     (core dumped) node /app/server/index.js
Originally created by @SKYC829 on GitHub (Nov 13, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/4649 How are you running AnythingLLM? Docker (local) What happened? I'm follow the chatgpt to install docker anything 1. sudo docker pull mintplexlabs/anythingllm:latest 2. mkdir -p ~/anythingllm sudo chown -R 1000:1000 ~/anythingllm sudo chmod -R 755 ~/anythingllm sudo docker run -d -p 3001:3001 -v ~/anythingllm:/app/data -e STORAGE_DIR=/app/data mintplexlabs/anythingllm:latest 3. also vim /etc/systemd/system/ollama.service Environment="OLLAMA_HOST=0.0.0.0:11434" 4. systemctl daemon-reload systemctl restart ollama 5. launch anything llm in browser and select llm preference <img width="1920" height="919" alt="Image" src="https://github.com/user-attachments/assets/8331d579-5440-4204-a692-51277c908ca6" /> 6. ollama api response: <img width="1917" height="165" alt="Image" src="https://github.com/user-attachments/assets/7e2d7a0e-41a9-411a-8ca4-72ae5ec59c07" /> 7. docker log ``` [collector] info: [TikTokenTokenizer] Initialized new TikTokenTokenizer instance. [collector] info: Collector hot directory and tmp storage wiped! [collector] info: 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 584ms 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 npm notice npm notice New major version of npm available! 10.8.2 -> 11.6.2 npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.6.2 npm notice To update run: npm install -g npm@11.6.2 npm notice Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma Datasource "db": SQLite database "anythingllm.db" at "file:../storage/anythingllm.db" SQLite database anythingllm.db created at file:../storage/anythingllm.db 33 migrations found in prisma/migrations Applying migration `20230921191814_init` Applying migration `20231101001441_init` Applying migration `20231101195421_init` Applying migration `20231129012019_add` Applying migration `20240113013409_init` Applying migration `20240118201333_init` Applying migration `20240202002020_init` Applying migration `20240206181106_init` Applying migration `20240206211916_init` Applying migration `20240208224848_init` Applying migration `20240210004405_init` Applying migration `20240216214639_init` Applying migration `20240219211018_init` Applying migration `20240301002308_init` Applying migration `20240326231053_init` Applying migration `20240405015034_init` Applying migration `20240412183346_init` Applying migration `20240425004220_init` Applying migration `20240430230707_init` Applying migration `20240510032311_init` Applying migration `20240618224346_init` Applying migration `20240821215625_init` Applying migration `20240824005054_init` Applying migration `20241003192954_init` Applying migration `20241029203722_init` Applying migration `20241029233509_init` Applying migration `20250102204948_init` Applying migration `20250226005538_init` Applying migration `20250318154720_init` Applying migration `20250506214129_init` Applying migration `20250709230835_init` Applying migration `20250725194841_init` Applying migration `20250808171557_init` The following migrations have been applied: migrations/ └─ 20230921191814_init/ └─ migration.sql └─ 20231101001441_init/ └─ migration.sql └─ 20231101195421_init/ └─ migration.sql └─ 20231129012019_add/ └─ migration.sql └─ 20240113013409_init/ └─ migration.sql └─ 20240118201333_init/ └─ migration.sql └─ 20240202002020_init/ └─ migration.sql └─ 20240206181106_init/ └─ migration.sql └─ 20240206211916_init/ └─ migration.sql └─ 20240208224848_init/ └─ migration.sql └─ 20240210004405_init/ └─ migration.sql └─ 20240216214639_init/ └─ migration.sql └─ 20240219211018_init/ └─ migration.sql └─ 20240301002308_init/ └─ migration.sql └─ 20240326231053_init/ └─ migration.sql └─ 20240405015034_init/ └─ migration.sql └─ 20240412183346_init/ └─ migration.sql └─ 20240425004220_init/ └─ migration.sql └─ 20240430230707_init/ └─ migration.sql └─ 20240510032311_init/ └─ migration.sql └─ 20240618224346_init/ └─ migration.sql └─ 20240821215625_init/ └─ migration.sql └─ 20240824005054_init/ └─ migration.sql └─ 20241003192954_init/ └─ migration.sql └─ 20241029203722_init/ └─ migration.sql └─ 20241029233509_init/ └─ migration.sql └─ 20250102204948_init/ └─ migration.sql └─ 20250226005538_init/ └─ migration.sql └─ 20250318154720_init/ └─ migration.sql └─ 20250506214129_init/ └─ migration.sql └─ 20250709230835_init/ └─ migration.sql └─ 20250725194841_init/ └─ migration.sql └─ 20250808171557_init/ └─ migration.sql All migrations have been successfully applied. ┌─────────────────────────────────────────────────────────┐ │ Update available 5.3.1 -> 6.19.0 │ │ │ │ This is a major update - please follow the guide at │ │ https://pris.ly/d/major-version-upgrade │ │ │ │ Run the following to update │ │ npm i --save-dev prisma@latest │ │ npm i @prisma/client@latest │ └─────────────────────────────────────────────────────────┘ [backend] info: [EncryptionManager] Self-assigning key & salt for encrypting arbitrary data. [backend] info: [TokenManager] Initialized new TokenManager instance for model: gpt-3.5-turbo [backend] info: [ContextWindowFinder] Pulling remote model map... [backend] info: [TokenManager] Returning existing instance for model: gpt-3.5-turbo [backend] info: [TELEMETRY ENABLED] Anonymous Telemetry enabled. Telemetry helps Mintplex Labs Inc improve AnythingLLM. [backend] info: [ContextWindowFinder] Error syncing remote model map TypeError: fetch failed at node:internal/deps/undici/undici:12637:11 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async #pullRemoteModelMap (/app/server/utils/AiProviders/modelMap/index.js:99:37) [backend] info: prisma:info Starting a sqlite pool with 17 connections. [backend] info: [TELEMETRY SENT] {"event":"server_boot","distinctId":"b7528b3a-1008-4b62-b323-0a0a6581de32","properties":{"commit":"--","runtime":"docker"}} [backend] info: [CommunicationKey] RSA key pair generated for signed payloads within AnythingLLM services. [backend] info: [EncryptionManager] Loaded existing key & salt for encrypting arbitrary data. [backend] info: Primary server in HTTP mode listening on port 3001 [backend] info: [BackgroundWorkerService] Starting... [backend] info: [BackgroundWorkerService] Service started with 1 jobs ["cleanup-orphan-documents"] [backend] info: [MetaGenerator] fetching custom meta tag settings... [backend] error: Error: The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }). at new OpenAI (/app/server/node_modules/openai/index.js:72:19) at openAiModels (/app/server/utils/helpers/customModels.js:114:18) at getCustomModels (/app/server/utils/helpers/customModels.js:52:20) at /app/server/endpoints/system.js:973:41 at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5) at next (/app/server/node_modules/express/lib/router/route.js:149:13) at /app/server/utils/middleware/multiUserProtected.js:60:7 at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5) at next (/app/server/node_modules/express/lib/router/route.js:149:13) at validatedRequest (/app/server/utils/middleware/validatedRequest.js:20:5) [backend] error: Error: The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }). at new OpenAI (/app/server/node_modules/openai/index.js:72:19) at openAiModels (/app/server/utils/helpers/customModels.js:114:18) at getCustomModels (/app/server/utils/helpers/customModels.js:52:20) at /app/server/endpoints/system.js:973:41 at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5) at next (/app/server/node_modules/express/lib/router/route.js:149:13) at /app/server/utils/middleware/multiUserProtected.js:60:7 at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5) at next (/app/server/node_modules/express/lib/router/route.js:149:13) at validatedRequest (/app/server/utils/middleware/validatedRequest.js:20:5) [backend] error: Error: The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }). at new OpenAI (/app/server/node_modules/openai/index.js:72:19) at openAiModels (/app/server/utils/helpers/customModels.js:114:18) at getCustomModels (/app/server/utils/helpers/customModels.js:52:20) at /app/server/endpoints/system.js:973:41 at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5) at next (/app/server/node_modules/express/lib/router/route.js:149:13) at /app/server/utils/middleware/multiUserProtected.js:60:7 at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5) at next (/app/server/node_modules/express/lib/router/route.js:149:13) at validatedRequest (/app/server/utils/middleware/validatedRequest.js:20:5) prisma:info Starting a sqlite pool with 17 connections. [backend] info: [141:174]: No direct uploads path found - exiting. [bg-worker][cleanup-orphan-documents] info: [141:174]: No direct uploads path found - exiting. [backend] warn: Child process exited with code 0 and signal null [backend] info: Worker for job "cleanup-orphan-documents" exited with code 0 [backend] error: Error: The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }). at new OpenAI (/app/server/node_modules/openai/index.js:72:19) at openAiModels (/app/server/utils/helpers/customModels.js:114:18) at getCustomModels (/app/server/utils/helpers/customModels.js:52:20) at /app/server/endpoints/system.js:973:41 at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5) at next (/app/server/node_modules/express/lib/router/route.js:149:13) at /app/server/utils/middleware/multiUserProtected.js:60:7 at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5) at next (/app/server/node_modules/express/lib/router/route.js:149:13) at validatedRequest (/app/server/utils/middleware/validatedRequest.js:20:5) [backend] error: TypeError: fetch failed at node:internal/deps/undici/undici:12637:11 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ollamaAIModels (/app/server/utils/helpers/customModels.js:372:18) at async getCustomModels (/app/server/utils/helpers/customModels.js:58:14) at async /app/server/endpoints/system.js:973:35 [backend] error: TypeError: fetch failed at node:internal/deps/undici/undici:12637:11 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ollamaAIModels (/app/server/utils/helpers/customModels.js:372:18) at async getCustomModels (/app/server/utils/helpers/customModels.js:58:14) at async /app/server/endpoints/system.js:973:35 a [backend] error: Error: The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' }). at new OpenAI (/app/server/node_modules/openai/index.js:72:19) at openAiModels (/app/server/utils/helpers/customModels.js:114:18) at getCustomModels (/app/server/utils/helpers/customModels.js:52:20) at /app/server/endpoints/system.js:973:41 at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5) at next (/app/server/node_modules/express/lib/router/route.js:149:13) at /app/server/utils/middleware/multiUserProtected.js:60:7 at Layer.handle [as handle_request] (/app/server/node_modules/express/lib/router/layer.js:95:5) at next (/app/server/node_modules/express/lib/router/route.js:149:13) at validatedRequest (/app/server/utils/middleware/validatedRequest.js:20:5) b [backend] error: TypeError: fetch failed at node:internal/deps/undici/undici:12637:11 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ollamaAIModels (/app/server/utils/helpers/customModels.js:372:18) at async getCustomModels (/app/server/utils/helpers/customModels.js:58:14) at async /app/server/endpoints/system.js:973:35 [backend] error: TypeError: fetch failed at node:internal/deps/undici/undici:12637:11 at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async ollamaAIModels (/app/server/utils/helpers/customModels.js:372:18) at async getCustomModels (/app/server/utils/helpers/customModels.js:58:14) at async /app/server/endpoints/system.js:973:35 c [backend] info: EmbeddingEngine changed from undefined to native - resetting undefined namespaces [backend] info: [Event Logged] - workspace_vectors_reset [backend] info: Resetting anythingllm managed vector namespaces for /usr/local/bin/docker-entrypoint.sh: line 24: 141 Illegal instruction (core dumped) node /app/server/index.js ```
yindo closed this issue 2026-02-22 18:31:59 -05:00
Author
Owner

@SKYC829 commented on GitHub (Nov 13, 2025):

This is extremely frustrating. I have no idea what happened or where I went wrong.

Image

@SKYC829 commented on GitHub (Nov 13, 2025): This is extremely frustrating. I have no idea what happened or where I went wrong. ![Image](https://github.com/user-attachments/assets/c31e0eac-187c-4d2c-9be5-e909beb5b4b2)
Author
Owner

@MvrckTheBald commented on GitHub (Nov 14, 2025):

Did you tryed mounting the .env in a persistent volume.

This is from the wiki:

export STORAGE_LOCATION=$HOME/anythingllm &&
mkdir -p $STORAGE_LOCATION &&
touch "$STORAGE_LOCATION/.env" &&
docker run -d -p 3001:3001
--cap-add SYS_ADMIN
-v ${STORAGE_LOCATION}:/app/server/storage
-v ${STORAGE_LOCATION}/.env:/app/server/.env \ <---you are missing this
-e STORAGE_DIR="/app/server/storage"
mintplexlabs/anythingllm:latest

@MvrckTheBald commented on GitHub (Nov 14, 2025): Did you tryed mounting the .env in a persistent volume. This is from the wiki: export STORAGE_LOCATION=$HOME/anythingllm && \ mkdir -p $STORAGE_LOCATION && \ touch "$STORAGE_LOCATION/.env" && \ docker run -d -p 3001:3001 \ --cap-add SYS_ADMIN \ -v ${STORAGE_LOCATION}:/app/server/storage \ -v ${STORAGE_LOCATION}/.env:/app/server/.env \ <---you are missing this -e STORAGE_DIR="/app/server/storage" \ mintplexlabs/anythingllm:latest
Author
Owner

@shatfield4 commented on GitHub (Nov 14, 2025):

@SKYC829 Be sure to follow the guide here on how to get the Docker image started with the correct env and persistent volume like @MvrckTheBald suggested.

Also in your sample video you are setting the embedding provider to Phi3 Mini which is an LLM not an embedding provider. Once you have the docker image running properly, try setting only the LLM provider to Ollama and leave the embedding provider as the AnythingLLM embedder. After you have the LLM responding, then you can go ahead and download other embedding models from Ollama and test them out.

@shatfield4 commented on GitHub (Nov 14, 2025): @SKYC829 Be sure to follow the guide [here](https://docs.anythingllm.com/installation-docker/quickstart) on how to get the Docker image started with the correct env and persistent volume like @MvrckTheBald suggested. Also in your sample video you are setting the embedding provider to Phi3 Mini which is an LLM not an embedding provider. Once you have the docker image running properly, try setting only the LLM provider to Ollama and leave the embedding provider as the AnythingLLM embedder. After you have the LLM responding, then you can go ahead and download other embedding models from Ollama and test them out.
Author
Owner

@SKYC829 commented on GitHub (Nov 20, 2025):

Finally, although this issue has been closed, I still want to comment on it. I hope it can be helpful to those in need. Thank you for the assistance of ChatGPT(All hail the goblinChatGPT. xddd). I eventually identified that my problem was that my virtual machine's CPU did not support the AVX/AVX2 instruction set. And the node version used by AnythingLLM seemed to be node:20-alpine. In some cases, it would perform JIT optimization. If the CPU did not support AVX/AVX2, it would directly exit with an illegal instruction. I eventually replaced the CPU of my virtual machine and successfully ran my self-hosted AnythingLLM based on Docker. link to the ChatGPT response sharing here.

@SKYC829 commented on GitHub (Nov 20, 2025): Finally, although this issue has been closed, I still want to comment on it. I hope it can be helpful to those in need. Thank you for the assistance of ChatGPT(All hail the ~goblin~ChatGPT. xddd). I eventually identified that my problem was that my virtual machine's CPU did not support the AVX/AVX2 instruction set. And the node version used by AnythingLLM seemed to be node:20-alpine. In some cases, it would perform JIT optimization. If the CPU did not support AVX/AVX2, it would directly exit with an illegal instruction. I eventually replaced the CPU of my virtual machine and successfully ran my self-hosted AnythingLLM based on Docker. [link to the ChatGPT response sharing here.](https://chatgpt.com/s/t_691ed1f4c6808191a539bb35d845e482)
yindo changed title from [Help] Please help anythingllm docker + local ollama to [GH-ISSUE #4649] [Help] Please help anythingllm docker + local ollama 2026-06-05 14:49:28 -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#2951