Get Started with AnythingLLM in Docker
Pull the latest image
docker pull mintplexlabs/anythingllm:latestRun the image
If you do not use the command below - all of your data will be lost when the container is restarted!
The -v ${STORAGE_LOCATION}:/app/server/storage is required to persist your data on your host machine in a persistent way.
Open the application
To access the full application, visit http://localhost:3001 in your browser.
Other information
About UID and GID in the ENV
- The UID and GID are set to 1000 by default. This is the default user in the Docker container and on most host operating systems.
- If there is a mismatch between your host user UID and GID and what is set in the
.envfile, you may experience permission issues.
Build locally from source not recommended for casual use
git clonethis repo andcd anything-llmto get to the root directory.touch server/storage/anythingllm.dbto create empty SQLite DB file.cd docker/cp .env.example .envyou must do this before buildingdocker-compose up -d --buildto build the image - this will take a few moments.
Your docker host will show the image as online once the build process is completed. This will build the app to http://localhost:3001.
Common questions and fixes
Container exits with Illegal instruction (core dumped)
If the container dies on startup or the first time you chat, and the logs end with:
/usr/local/bin/docker-entrypoint.sh: line 7: 115 Illegal instruction (core dumped) node /app/server/index.jsyour CPU does not support the AVX2 instruction set, which the default vector database requires. This comes up most often on older hardware, on some cloud instance families, and on Proxmox or QEMU/KVM guests whose virtual CPU hides AVX2 from the guest.
See CPU instruction set requirements for how to check and what to do about it.
Container exits with unable to open database file
If the container starts and then immediately dies with a log that ends like this:
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.dbyour storage folder is not writable by the container.
This almost always happens on Linux when STORAGE_LOCATION points somewhere under a top-level folder such as /mnt, /data, /srv, or /opt. Those folders are owned by root, and so is anything you create inside them. AnythingLLM runs as the unprivileged anythingllm user (UID/GID 1000), so it cannot write the database file into a root-owned mount.
The install command in this guide uses $HOME/anythingllm, which your own user already owns - that is why the default path works and a custom one may not.
To fix it, give the storage folder to UID/GID 1000 before starting the container:
sudo chown -R 1000:1000 ${STORAGE_LOCATION}Then remove the dead container and run the install command again.
You will find chmod -R 777 suggested as a fix for this in old GitHub issues.
It does work, but it makes your storage folder - including your database, your
documents, and your .env with any API keys in it - readable and writable by
every user on the machine. Use chown instead.
The published image always runs as 1000:1000. If you build from source with docker-compose and have changed the UID and GID values in your .env, use those numbers instead.
Cannot connect to service running on localhost!
Please see How to connect to localhost services.
Having issues with Ollama?
See Ollama Connection Troubleshooting and also read about How to connect to localhost services. This is 100% of the time the issue.
Still not working?
Ask for help on our Discord Community Server (opens in a new tab)