[GH-ISSUE #2939] [BUG]: pdf upload fails on fresh docker installation #1874

Closed
opened 2026-02-22 18:26:56 -05:00 by yindo · 1 comment
Owner

Originally created by @tonylampada on GitHub (Jan 5, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2939

How are you running AnythingLLM?

Docker (local)

What happened?

Running with docker anythingllm:1.3 (also tried latest)

mkdir -p ~/anythingllm/storage
touch ~/anythingllm/.env
docker run --rm -d --net=host --name anythingllm \
       --restart unless-stopped \
       --cap-add SYS_ADMIN \
       -v ~/anythingllm/storage:/app/server/storage \
       -v ~/anythingllm/.env:/app/server/.env \
       -e STORAGE_DIR="/app/storage" \
       mintplexlabs/anythingllm:1.3

when uploading a document a see an error, and the /api/workspace/{name}/upload endpoint gives a 500

maybe i need to fix my docker config?

CleanShot 2025-01-05 at 09 18 17@2x

Are there known steps to reproduce?

No response

Originally created by @tonylampada on GitHub (Jan 5, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2939 ### How are you running AnythingLLM? Docker (local) ### What happened? Running with docker anythingllm:1.3 (also tried latest) ```bash mkdir -p ~/anythingllm/storage touch ~/anythingllm/.env docker run --rm -d --net=host --name anythingllm \ --restart unless-stopped \ --cap-add SYS_ADMIN \ -v ~/anythingllm/storage:/app/server/storage \ -v ~/anythingllm/.env:/app/server/.env \ -e STORAGE_DIR="/app/storage" \ mintplexlabs/anythingllm:1.3 ``` when uploading a document a see an error, and the `/api/workspace/{name}/upload` endpoint gives a 500 maybe i need to fix my docker config? ![CleanShot 2025-01-05 at 09 18 17@2x](https://github.com/user-attachments/assets/fccde48f-4ad2-4da1-bf59-281981a5332b) ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-02-22 18:26:56 -05:00
yindo closed this issue 2026-02-22 18:26:56 -05:00
Author
Owner

@timothycarambat commented on GitHub (Jan 6, 2025):

Referencing this template:

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 \
-e STORAGE_DIR="/app/server/storage" \
mintplexlabs/anythingllm
mkdir -p ~/anythingllm/storage
touch ~/anythingllm/.env
docker run --rm -d --net=host --name anythingllm \
       --restart unless-stopped \
       --cap-add SYS_ADMIN \
       -v ~/anythingllm/storage:/app/server/storage \
       -v ~/anythingllm/.env:/app/server/.env \
       -e STORAGE_DIR="/app/storage" \
       mintplexlabs/anythingllm:1.3
  • env needs to be in the storage folder - it appears to be outside of it (in ~/anythingllm not ~anythingllm/storage)

  • e STORAGE_DIR="/app/server/storage" \ is the right binding, not -e STORAGE_DIR="/app/storage" \ this is an ENV for bootup that you should not change as this is an internal path in the container.

Rewriting your command applying the above template

mkdir -p ~/anythingllm/storage && \
touch ~/anythingllm/storage/.env && \
docker run -d -p 3001:3001 \
--rm -d --net=host --name anythingllm \
-restart unless-stopped \
--cap-add SYS_ADMIN \
-v ~/anythingllm/storage:/app/server/storage \
-v ~/anythingllm/storage/.env:/app/server/.env \
-e STORAGE_DIR="/app/server/storage" \
mintplexlabs/anythingllm:1.3
@timothycarambat commented on GitHub (Jan 6, 2025): [Referencing this template](https://docs.anythingllm.com/installation-docker/local-docker): ```bash 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 \ -e STORAGE_DIR="/app/server/storage" \ mintplexlabs/anythingllm ``` ```bash mkdir -p ~/anythingllm/storage touch ~/anythingllm/.env docker run --rm -d --net=host --name anythingllm \ --restart unless-stopped \ --cap-add SYS_ADMIN \ -v ~/anythingllm/storage:/app/server/storage \ -v ~/anythingllm/.env:/app/server/.env \ -e STORAGE_DIR="/app/storage" \ mintplexlabs/anythingllm:1.3 ``` - `env` needs to be **in** the `storage` folder - it appears to be outside of it (in `~/anythingllm` not `~anythingllm/storage`) - `e STORAGE_DIR="/app/server/storage" \` is the right binding, not `-e STORAGE_DIR="/app/storage" \` this is an ENV for bootup that you should not change as this is an internal path in the container. Rewriting your command applying the above template ```bash mkdir -p ~/anythingllm/storage && \ touch ~/anythingllm/storage/.env && \ docker run -d -p 3001:3001 \ --rm -d --net=host --name anythingllm \ -restart unless-stopped \ --cap-add SYS_ADMIN \ -v ~/anythingllm/storage:/app/server/storage \ -v ~/anythingllm/storage/.env:/app/server/.env \ -e STORAGE_DIR="/app/server/storage" \ mintplexlabs/anythingllm:1.3 ```
yindo changed title from [BUG]: pdf upload fails on fresh docker installation to [GH-ISSUE #2939] [BUG]: pdf upload fails on fresh docker installation 2026-06-05 14:43:11 -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#1874