AnythingLLM is an open-source interface that lets you chat with your own documents. You upload PDFs, text files, spreadsheets, or web pages to a workspace. AnythingLLM breaks them into sections and stores them in a built-in vector database. When you ask a question, AnythingLLM finds the relevant passages and sends them to the language model. The answer also shows which documents it came from. This process is called Retrieval-Augmented Generation (RAG).
AnythingLLM does not include a language model. You connect it to a provider such as OpenAI or Anthropic using your own API key, to a gateway such as LiteLLM, or to your own Ollama installation running models on your server.
In this guide, we'll show you two ways to get started: the easy way, using the One-Click App, which gets AnythingLLM up and running in just a few minutes with password protection and HTTPS; and a manual installation with Docker Compose, optionally alongside Ollama. Then you'll connect a language model, upload your first documents, and set up accounts for your team.
Running AnythingLLM on your own server is a good choice if:
- You want to work with your own materials. Store manuals, policies, contracts, or project documentation in workspaces, then ask questions about them in plain language and get answers with citations.
- You want your documents to stay on your server. By default, document processing, embedding, and the vector database all run on your VPS. Only your question, the matching passages, and the chat history so far are sent to the language model provider.
- Several people need to use the same knowledge base. In multi-user mode, each person gets their own account and only sees the workspaces you share with them.
- You want the freedom to choose your provider. You can switch providers at any time and even set a different model for individual workspaces.
- You want AnythingLLM to be available around the clock, for example, to your team, the smartphone app, or your own programs through the developer API.
AnythingLLM is less suitable if you only want to query a few files by yourself every now and then. In that case, the AnythingLLM desktop version on your own computer is enough. If you mainly want a chat interface for many models, Ollama with Open WebUI is a better fit.
Before you get started, decide where you want the answers to come from. AnythingLLM supports both options:
| Provider with API key (e.g., OpenAI, Anthropic) | Local model with Ollama on the VPS | |
|---|---|---|
| Answer quality | High, including for long documents | Smaller models are more limited, but often sufficient for finding facts in documents |
| Speed | Fast | Significantly slower without a GPU, depending on the model and CPU |
| Cost | Billed directly by the provider based on usage | No API costs, but requires more RAM and CPU on the VPS |
| Data | Questions and matching passages are sent to the provider | Everything stays on your server |
| AnythingLLM RAM requirement | From 2 GB | Several additional GB for the model |
A VPS does not have a graphics card, so local models run on the CPU. In our test, the small model qwen2.5:0.5b answered a question about a document in a few seconds using 4 vCPU cores. Larger models with 7 or 8 billion parameters need 8 GB of RAM or more and respond noticeably more slowly. The Ollama guide explains how to choose models.
The quickest way to get AnythingLLM is through your VPS's One-Click Apps. With a domain, the app is accessible directly over HTTPS, and a password is generated automatically during installation. You don't need to set up a reverse proxy, certificate, or firewall rules.
- A Linux VPS (Debian or Ubuntu) with One-Click Apps set up. See Setting Up One-Click Apps for instructions.
- At least 2 vCPU cores, 2 GB of RAM, and 5 GB of free storage. We recommend 4 vCPU cores, 4 GB of RAM, and 20 GB of storage. The AnythingLLM image alone takes up just under 5 GB of disk space. AnythingLLM uses around 400 MB of RAM when idle and more when processing documents. The CPU must support AVX2, which is the case with current servers.
- An account with an API key from a provider such as OpenAI or Anthropic, your own Ollama, or LiteLLM. AnythingLLM does not include a language model.
- Open your VPS in the ZapX dashboard and go to the One-Click Apps tab.
- Search the app catalog for AnythingLLM and click Install app.
- Use a custom subdomain or zap.cloud is already selected, with a randomly generated name. Leave the option enabled or enter your own name, such as
docs-ai. You'll use this address to access AnythingLLM over HTTPS. - You don't need to change anything under App configuration.
DISABLE_TELEMETRYis set totrue, so AnythingLLM won't send anonymous usage data to its developer. The fields beginning withPASSWORDset password rules for multi-user mode, such as the minimum length. The dashboard masks their values because of their names, but they are just numbers such as1or6. LeaveSERVER_PORT,UID, andGIDunchanged. - Click Queue installation.
The initial installation takes a few minutes because the image is large. The app card will show “Starting” while the installation is in progress. Once it shows “Online,” AnythingLLM is ready.
AnythingLLM starts in single-user mode and is password-protected by default. No one can access your settings or documents without the password.
- Click the gear icon on the app card and go to App environment.
- Under Automatically generated values, you'll find
SERVICE_PASSWORD_AUTHTOKEN. This is your password. Click the eye icon to show it or the icon next to it to copy it. - Open AnythingLLM using the Access link. On the “Welcome” page, enter the password under “Password” and click “Login.”
AnythingLLM uses the other three values (SERVICE_PASSWORD_JWTSECRET, SERVICE_PASSWORD_SIGKEY, and SERVICE_PASSWORD_SIGSALT) internally for logins and signatures. You don't need to do anything with them.
Under “Settings” > “Security” > “Password Protection,” AnythingLLM offers an option to change the password. With the One-Click App, this change only lasts until the next restart. After that, SERVICE_PASSWORD_AUTHTOKEN from App environment is valid again. If multiple people need access or you want to assign individual passwords, enable multi-user mode instead, as described below.
AnythingLLM stores settings under “AI Providers”—the selected LLM provider, model, and API keys—in a file inside the container, not in the data volume. If the container is recreated, for example during an App update or with Reinstall app, these settings are lost. Workspaces, documents, chats, and user accounts are stored in the volume and remain intact.
After an update, go to “Settings” > “AI Providers” > “LLM.” If it says “None selected,” select your provider again and enter the API key again. Make a note of which provider and model you use, and keep your API key safe, for example in a password manager.
Update AnythingLLM in the app settings (gear icon) under App update. Click Check for updates and install a new version using Apply update. If the page says “The app is already up to date.”, there isn't a newer version in the app catalog yet.
Your data is stored in three app volumes. The most important is the storage volume (anythingllm-storage), which contains the database for users, workspaces, and chats; processed documents; the vector database; and the downloaded embedding model. Back up the entire VPS before an update, for example, using Backups in the dashboard. That way, you can restore the previous state if something goes wrong.
The rest of this guide describes a manual installation of AnythingLLM with Docker Compose on your VPS. This is useful, for example, if you don't use One-Click Apps on your server or want to run AnythingLLM and Ollama together in one project.
- A Linux VPS running Debian or Ubuntu, with SSH access. See First Access via SSH.
- Docker and Docker Compose (Compose v2). See Install Docker. Check the installation with
docker --versionanddocker compose version. - A domain or subdomain whose A record points to your VPS IP address (e.g.,
docs-ai.example.com).
These requirements are for AnythingLLM with the built-in embedder and an external provider. According to the developer, the CPU must support AVX2. If you plan to run Ollama on the same server, allow at least 8 GB of RAM for a small model. The Ollama image takes up around 8.5 GB, not including the models.
| Hardware | Minimum | Recommended |
|---|---|---|
| CPU | 2 vCPU cores | 4 vCPU cores |
| RAM | 2 GB | 4 GB (8 GB or more with Ollama) |
| Storage | 10 GB | 20 GB (40 GB or more with Ollama) |
AnythingLLM listens on port 3001 and Ollama on port 11434. Don't open either port. Only SSH and the reverse proxy should be accessible from outside:
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
Ports published by Docker with ports: are accessible from outside even if ufw blocks them. Docker inserts its own rules before those of ufw. Therefore, bind AnythingLLM to 127.0.0.1 as shown below and don't publish Ollama's port at all. The Ollama API has no authentication. Learn more about firewalls in Managing Firewalls on Linux.
Create a directory and generate a password and secret keys. These commands write the values directly to the .env file without displaying them. Then create the storage folder and an empty storage/.env file. AnythingLLM will later write your settings from the interface to this file:
mkdir -p /opt/anythingllm/storage
cd /opt/anythingllm
echo "AUTH_TOKEN=$(openssl rand -hex 16)" >> .env
echo "JWT_SECRET=$(openssl rand -hex 32)" >> .env
echo "SIG_KEY=$(openssl rand -hex 32)" >> .env
echo "SIG_SALT=$(openssl rand -hex 32)" >> .env
chmod 600 .env
touch storage/.env
chown -R 1000:1000 storage
Now create the docker-compose.yml file, for example, using nano docker-compose.yml:
services:
anythingllm:
image: mintplexlabs/anythingllm:1.19.0
restart: unless-stopped
cap_add:
- SYS_ADMIN
environment:
- STORAGE_DIR=/app/server/storage
- DISABLE_TELEMETRY=true
- AUTH_TOKEN=${AUTH_TOKEN}
- JWT_SECRET=${JWT_SECRET}
- SIG_KEY=${SIG_KEY}
- SIG_SALT=${SIG_SALT}
volumes:
- ./storage:/app/server/storage
- ./storage/.env:/app/server/.env
ports:
- "127.0.0.1:3001:3001"
depends_on:
- ollama
ollama:
image: ollama/ollama:0.40.19
restart: unless-stopped
volumes:
- ./ollama:/root/.ollama
Here's what the important lines do:
mintplexlabs/anythingllm:1.19.0: The official image pinned to a specific version. This means it only updates when you change the version yourself.AUTH_TOKEN: The password for single-user mode. Without this variable, AnythingLLM is open to anyone who knows the address after startup, until you set a password in the interface.JWT_SECRET,SIG_KEY, andSIG_SALT: Secret keys used for logins and signatures. Don't change them after the first startup../storage:/app/server/storage: This is where the database, documents, vector database, and built-in embedder model are stored../storage/.env:/app/server/.env: AnythingLLM saves providers, models, and API keys configured in the interface to this file. Without this line, the settings would be lost every time the container is recreated.cap_add: SYS_ADMIN: AnythingLLM needs this for its built-in browser, which it uses to read web pages as documents.127.0.0.1:3001:3001: AnythingLLM is only accessible from the server itself, and from outside only through the reverse proxy.ollama: Runs local models. The service has noportsentry, so it's only accessible to AnythingLLM athttp://ollama:11434. If you don't need a local model, remove the entireollamasection and thedepends_onlines.
Pull the images and start the containers:
docker compose pull
docker compose up -d
docker compose logs -f anythingllm
On the first startup, AnythingLLM creates its database. Check whether AnythingLLM is responding by running curl http://127.0.0.1:3001/api/ping on the server. The response is {"online":true}. Press Strg+C to exit the log view.
If you're using Ollama, download a model now, for example, a small one to get started:
docker compose exec ollama ollama pull qwen2.5:0.5b
First, set up the reverse proxy in the next section. Then open https://docs-ai.example.com. To display the password on the server, run grep AUTH_TOKEN /opt/anythingllm/.env.
For a quick test without a domain, you can also use an SSH tunnel: ssh -L 3001:127.0.0.1:3001 root@SERVER_IP. While the tunnel is open, you can access AnythingLLM on your computer at http://localhost:3001.
The same rule applies here: change the password in the .env file in the project folder, then restart using docker compose up -d. If you change it under “Security” in the interface, the value from AUTH_TOKEN will overwrite it the next time the container starts.
To access AnythingLLM from outside, put a reverse proxy with a valid certificate in front of it. For the basics, see Set Up a Reverse Proxy with nginx and Create an SSL Certificate (Let's Encrypt). Here's a server block for nginx:
server {
listen 80;
server_name docs-ai.example.com;
client_max_body_size 100m;
location / {
proxy_pass http://127.0.0.1:3001;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_buffering off;
proxy_read_timeout 600s;
}
}
Then get the certificate using certbot --nginx -d docs-ai.example.com. Certbot adds HTTPS and HTTP redirection to the block. The lines with Upgrade and Connection enable WebSockets, which AnythingLLM needs for agents. proxy_buffering off ensures that answers appear word by word. client_max_body_size sets the maximum upload size, and the long timeout prevents interruptions if a local model takes longer to respond.
Everything important is in the storage folder: the database with users, workspaces, and chats; processed documents; the vector database; and the storage/.env file with your provider settings and API keys. Briefly stop AnythingLLM to create a consistent backup:
cd /opt/anythingllm
docker compose stop anythingllm
tar czf anythingllm-backup-$(date +%F).tar.gz storage .env docker-compose.yml
docker compose start anythingllm
The backup contains API keys and the password. Store it securely and not just on the VPS itself. You don't need to back up the ollama folder; you can download the models again if needed.
Back up the storage folder first and read the new version's release notes. Then change the version for the image in docker-compose.yml and restart AnythingLLM:
cd /opt/anythingllm
docker compose pull
docker compose up -d
When it starts, AnythingLLM automatically updates its database to the new version. To roll back, you'll need the previous version and the backup from before the update. You can see the installed version in the bottom left of the settings. Update Ollama the same way by changing the version for the ollama/ollama image.
After installation, connect a language model, create a workspace, and upload documents. The steps are the same for the One-Click App and the manual installation. Open the settings using the wrench icon in the bottom left.
After installation, “None selected” appears under “Settings” > “AI Providers” > “LLM.” Click it and select your provider from the list:
- Provider with API key: Select, for example, “OpenAI” or “Anthropic,” enter your API key (for Anthropic, use the “Anthropic API Key” field), and select a model under “Chat Model Selection.” Click “Save changes.” The provider bills you directly.
- Ollama in your Docker Compose project: Select “Ollama” and, under “Show advanced settings,” enter
http://ollama:11434in “Ollama Base URL.” The models you've downloaded will then appear under “Ollama Model.” - Ollama with Open WebUI as a One-Click App: The Ollama API isn't accessible from the internet in this setup. Instead, use Open WebUI's OpenAI-compatible interface. Create an API key in Open WebUI as described in the Ollama guide. In AnythingLLM, select “Generic OpenAI,” enter your Open WebUI address with
/apiunder “Base URL” (for example,https://ai.example.com/api), the key under “API Key,” and the model name under “Selected Model,” such asllama3.2:1b. - LiteLLM: If you're running LiteLLM as a gateway, select “LiteLLM,” enter your LiteLLM address under “Base URL,” and a virtual key under “API Key.” The models available to that key will appear under “Chat Model Selection.”
Under “Model context window,” set how much text the model can process at once. For small local models, 4096 tokens is a good starting point.
By default, AnythingLLM uses the built-in “AnythingLLM Embedder” with the all-MiniLM-L6-v2 model and the built-in “LanceDB” vector database to search your documents. Both run on your server and require no setup. AnythingLLM downloads the embedder model (around 23 MB) when you add your first document. If you switch embedders later, you'll need to re-embed all your documents.
A workspace is a separate knowledge base with its own chats. Create a workspace for each topic, such as “Support Docs” or “Contracts”:
- Click the plus sign in the top left next to the search field, enter a name, and save.
- Click the upload icon for the workspace. This opens document management, with “My Documents” on the left and the workspace on the right.
- Drag files into the “Click to upload or drag and drop” area, or enter an address under “or submit a link” and click “Fetch website.” AnythingLLM can read PDFs, Word documents, text files, spreadsheets, and audio files, among others.
- Select the uploaded documents on the left, move them to the workspace using “Move to Workspace,” and click “Save and Embed.”
Embedding runs in the background on your server's CPU. Small files are ready in seconds; large PDFs take longer. After that, you can ask questions about the documents in your workspace chat. Below each answer, “Sources” shows which documents the passages came from.
In a workspace's settings (the gear icon for the workspace), choose how AnythingLLM responds under “Chat Settings” > “Chat mode”:
- Query: AnythingLLM answers only from your documents. If it can't find a relevant passage, it says so instead of making something up. We recommend this mode for manuals and policies.
- Chat: The model uses your documents as well as its general knowledge.
- Agent: The model can use tools, such as retrieving web pages. This only works with models that support tools. Small local models often struggle with this.
Under “Workspace LLM Provider,” you can choose a different model for an individual workspace than the one in the system settings. Use “System Prompt” to give the model instructions, such as “Always answer in German.”
In single-user mode, everyone shares the same password and has full permissions. To use AnythingLLM with a team, enable multi-user mode:
- Go to “Settings” > “Security” and click “Enable Multi-User Mode” under “Multi-User Mode.”
- Set a username and password for your administrator account. The username can contain lowercase letters, numbers, periods, underscores, and hyphens.
- From now on, log in with your username and password. The previous password from
SERVICE_PASSWORD_AUTHTOKENorAUTH_TOKENis no longer valid. - Under “Settings” > “Admin” > “Users,” create additional accounts using “Add user.” Under “Role,” choose “Default” (can only chat in shared workspaces), “Manager,” or “Administrator.” Use “Limit messages per day” to limit the number of requests each person can make per day.
- In a workspace's settings, share it with specific people under “Members.”
You can't switch back to single-user mode in the settings. Keep the administrator account password safe. An administrator can reset passwords for other accounts if they're forgotten.
Under “Settings” > “Admin” > “Workspace Chats,” an administrator can see and export everyone's chats. Make sure your team knows this.
- No built-in language model: AnythingLLM can't answer questions without a provider, LiteLLM, or Ollama. Uploading and embedding documents still works.
- Local models without a GPU: Models run on the CPU on a VPS. Small models are useful, but slower and less accurate than large cloud models. Models with more than 8 billion parameters are rarely practical on a VPS.
- RAG finds passages, not an overall summary: AnythingLLM only gives the model the most relevant sections. As a result, it can only provide an incomplete answer to requests such as “Summarize all 200 documents.”
- Scanned PDFs: PDFs made up only of images and without a text layer provide little content. Use PDFs with text whenever possible.
- One-Click App provider settings: After an app update, you may need to re-enter your LLM provider under “AI Providers,” as described above.
You've set up AnythingLLM on your VPS, connected a language model, uploaded your first documents to a workspace, and learned how to create accounts for your team. From now on, AnythingLLM can answer questions about your materials with citations, while your documents stay on your server.
Prefer to skip the Docker setup? Use the easy One-Click App option described above under “Easy Option: AnythingLLM as a One-Click App.”