[GH-ISSUE #1309] [BUG]: When I update AnythingLLM docker container, it doesn't use previous settings or DB. #825

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

Originally created by @sheneman on GitHub (May 8, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1309

How are you running AnythingLLM?

Docker (local)

What happened?

I tried updating my AnythingLLM docker container (3 months old) to the latest version. Despite pointing it to the same persistent storage location (in my case /opt/anythingllm), the new container acted like a fresh install without retaining users, workspaces, and other configs from the previous container.

To do this, I stopped my previous (old) AnythingLLM container and ran:

export STORAGE_LOCATION=/opt/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:master

This pulled the latest version and ran it, and despite pointing it to the same /opt/anythingllm persistent storage, the configs in the new version seemed reset.

Fortunately, I could stop this new container and re-start my previous stopped container and everything was still there. But I would love to update, as I need some of the recent bug fixes.

Is there a backward compatibility issue? Or am I doing something wrong?

Thanks for your help.

Are there known steps to reproduce?

No response

Originally created by @sheneman on GitHub (May 8, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/1309 ### How are you running AnythingLLM? Docker (local) ### What happened? I tried updating my AnythingLLM docker container (3 months old) to the latest version. Despite pointing it to the same persistent storage location (in my case /opt/anythingllm), the new container acted like a fresh install without retaining users, workspaces, and other configs from the previous container. To do this, I stopped my previous (old) AnythingLLM container and ran: export STORAGE_LOCATION=/opt/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:master This pulled the latest version and ran it, and despite pointing it to the same /opt/anythingllm persistent storage, the configs in the new version seemed reset. Fortunately, I could stop this new container and re-start my previous stopped container and everything was still there. But I would love to update, as I need some of the recent bug fixes. Is there a backward compatibility issue? Or am I doing something wrong? Thanks for your help. ### Are there known steps to reproduce? _No response_
yindo added the Dockerneeds info / can't replicate labels 2026-02-22 18:21:36 -05:00
yindo closed this issue 2026-02-22 18:21:36 -05:00
Author
Owner

@timothycarambat commented on GitHub (May 8, 2024):

There should be no backward compatibility issue. I would check the docker logs to see if the db was found and migrated as your existing storage was quite old, but it should not matter. I am assuming you did docker pull mintplexlabs/anythingllm:master and not docker pull mintplexlabs/anythingllm?

If you leave out the :master tag it will pull :latest and not :master. docker image ls will let you know if you have duplicate images. :master is an alias for :latest but if you leave it out docker will keep both.

Other than that, regardless it should boot with that command

export STORAGE_LOCATION=/opt/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 # will assume :latest
@timothycarambat commented on GitHub (May 8, 2024): There should be no backward compatibility issue. I would check the docker logs to see if the db was found and migrated as your existing storage was quite old, but it should not matter. I am assuming you did `docker pull mintplexlabs/anythingllm:master` and not `docker pull mintplexlabs/anythingllm`? If you leave out the `:master` tag it will pull `:latest` and not `:master`. `docker image ls` will let you know if you have duplicate images. `:master` is an alias for `:latest` but if you leave it out docker will keep both. Other than that, regardless it should boot with that command ``` export STORAGE_LOCATION=/opt/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 # will assume :latest ```
Author
Owner

@sheneman commented on GitHub (May 8, 2024):

We determined that our old container for some reason was not using the externally mapped persistent storage. Possibly because the first time the container was run, we didn't map that storage? And when we ran it subsequently it used the DB internal to the container, even though we configured it to use persistent storage?

In any event, we were able to pull the db out of the container and put it in the correct external directory, pull the latest version of AnythingLLM, and run against the populated external database. It is working now without issue. Thank you.

@sheneman commented on GitHub (May 8, 2024): We determined that our old container for some reason was not using the externally mapped persistent storage. Possibly because the first time the container was run, we didn't map that storage? And when we ran it subsequently it used the DB internal to the container, even though we configured it to use persistent storage? In any event, we were able to pull the db out of the container and put it in the correct external directory, pull the latest version of AnythingLLM, and run against the populated external database. It is working now without issue. Thank you.
yindo changed title from [BUG]: When I update AnythingLLM docker container, it doesn't use previous settings or DB. to [GH-ISSUE #1309] [BUG]: When I update AnythingLLM docker container, it doesn't use previous settings or DB. 2026-06-05 14:37:23 -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#825