[GH-ISSUE #3886] [BUG]: Default LLM provider not saved when restarting docker container #2480

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

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

How are you running AnythingLLM?

Docker (local)

What happened?

The default LLM provider says it saves but when i restart the container it loses its setting.

Image

Are there known steps to reproduce?

Edit the api key and provider, save, restart docker container.

Originally created by @jezweb on GitHub (May 26, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3886 ### How are you running AnythingLLM? Docker (local) ### What happened? The default LLM provider says it saves but when i restart the container it loses its setting. ![Image](https://github.com/user-attachments/assets/0e9ae54b-198b-4ecb-92b7-fc82cd3bc706) ### Are there known steps to reproduce? Edit the api key and provider, save, restart docker container.
yindo added the possible bug label 2026-02-22 18:29:52 -05:00
yindo closed this issue 2026-02-22 18:29:52 -05:00
Author
Owner

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

Follow the instructions on https://docs.anythingllm.com/installation-docker/quickstart#start-anythingllm-via-docker

There is also a giant warning on the container start if the storage DIR is not defined
https://github.com/Mintplex-Labs/anything-llm/blob/436d97f792bc609673d44b979e0469b39df26f10/docker/docker-entrypoint.sh#L3-L17

@timothycarambat commented on GitHub (May 26, 2025): Follow the instructions on https://docs.anythingllm.com/installation-docker/quickstart#start-anythingllm-via-docker There is also a giant warning on the container start if the storage DIR is not defined https://github.com/Mintplex-Labs/anything-llm/blob/436d97f792bc609673d44b979e0469b39df26f10/docker/docker-entrypoint.sh#L3-L17
Author
Owner

@barneycatatau commented on GitHub (Oct 9, 2025):

Same it's happening to me and I'm using default app provided in TrueNas Scale. I am also facing "lancedb invalid env settings". That started to happeng right before I restarted the app.

I'm really not sure why those settings aren't supposed to be kept since the first beggining

@barneycatatau commented on GitHub (Oct 9, 2025): Same it's happening to me and I'm using default app provided in TrueNas Scale. I am also facing "lancedb invalid env settings". That started to happeng right before I restarted the app. I'm really not sure why those settings aren't supposed to be kept since the first beggining
Author
Owner

@timothycarambat commented on GitHub (Oct 9, 2025):

@barneycatatau Same as above - use the official command to preserve your data between container restarts. If you arent using the command that is the reason.

@timothycarambat commented on GitHub (Oct 9, 2025): @barneycatatau Same as above - use the official command to preserve your data between container restarts. If you arent using the command that is the reason.
Author
Owner

@barneycatatau commented on GitHub (Oct 9, 2025):

I know @timothycarambat, the problem is where to add it in truenas scale. The only field available is through "Aditional Environment Variables" which the official command from the documentation doesn't apply. Apprecite if you can provide some guidance. Screenshot below:

Image
@barneycatatau commented on GitHub (Oct 9, 2025): I know @timothycarambat, the problem is where to add it in truenas scale. The only field available is through "Aditional Environment Variables" which the official command from the documentation doesn't apply. Apprecite if you can provide some guidance. Screenshot below: <img width="873" height="937" alt="Image" src="https://github.com/user-attachments/assets/9225749d-69d1-4dab-b4de-d7b9ebbce7cd" />
yindo changed title from [BUG]: Default LLM provider not saved when restarting docker container to [GH-ISSUE #3886] [BUG]: Default LLM provider not saved when restarting docker container 2026-06-05 14:46:48 -04:00
Author
Owner

@berensn commented on GitHub (Apr 30, 2026):

I've run this command directly on the CLI, copied directly from the deploy to cloud page

export STORAGE_LOCATION="/var/lib/anythingllm" && \ mkdir -p $STORAGE_LOCATION && \ touch "$STORAGE_LOCATION/.env" && \ docker run -d -p 3001:3001 \ # expose on port 3001 (can be any host port) --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:master

and it doesn't do anything
In /var/lib/anythingllm there is an empty .env file. I don't see any app/server/storage directories in there or elsewhere on my system.
What am I doing wrong?

<!-- gh-comment-id:4354812430 --> @berensn commented on GitHub (Apr 30, 2026): I've run this command directly on the CLI, copied directly from the [deploy to cloud](https://docs.anythingllm.com/installation-docker/cloud-docker) page `export STORAGE_LOCATION="/var/lib/anythingllm" && \ mkdir -p $STORAGE_LOCATION && \ touch "$STORAGE_LOCATION/.env" && \ docker run -d -p 3001:3001 \ # expose on port 3001 (can be any host port) --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:master` and it doesn't do anything In /var/lib/anythingllm there is an empty .env file. I don't see any app/server/storage directories in there or elsewhere on my system. What am I doing wrong?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2480