Skip to content

How to Deploy AnythingLLM on a VPS

Updated Sep 2026

verified on Ubuntu 26.04 · Aug 2026
We earn commissions when you shop through the links below. Full disclosure →

Self-host AnythingLLM on your own VPS — an all-in-one AI workspace with document management, multi-model support, and team collaboration features.

Before you start
  • A VPS with 4+ GB RAM (8 GB recommended with a 7B model backend)
  • A fresh Ubuntu 26.04 server with root/sudo SSH access
  • Optional: Ollama running on the same server or accessible remotely
Need a box for this guide? Kamatera's free tier lets you spin one up now.Start free on Kamatera → (opens in new tab)

What AnythingLLM is

AnythingLLM is an all-in-one AI workspace that combines a chat interface with document management, vector storage, and multi-model support. Unlike simpler chat tools, AnythingLLM treats your documents as first-class citizens — you upload files, they get embedded and indexed, and then you can chat with your data, ask questions about specific documents, or build knowledge bases that span hundreds of files.

The appeal is unified AI workflow. Instead of separate tools for chat, document indexing, and knowledge management, AnythingLLM does it all in one interface. It connects to Ollama, OpenAI, Anthropic, and other backends, so you can mix models for different tasks — use a small local model for quick questions and a larger cloud model for complex analysis.

For teams, AnythingLLM adds collaboration features: shared workspaces, user management, and document permissions. It's the self-hosted alternative to tools like ChatGPT's custom GPTs or Microsoft Copilot, but with full control over your data and no per-seat licensing.

Server sizing — memory depends on your backend

AnythingLLM itself is a Node.js application with a SQLite database and vector storage. It's not compute-intensive, but the vector embeddings and model backend decisions affect sizing significantly.

AnythingLLM alone (with a remote backend):

  • 2 GB RAM — handles the web UI, document management, and API calls to a remote model
  • 4 GB RAM — comfortable for large document collections and multiple users

With Ollama on the same box: Add the Ollama requirements. A 7B model needs ~8 GB for Ollama, so plan for 12-16 GB total.

Vector storage considerations: AnythingLLM uses a local vector database (ChromaDB by default) that stores embeddings in the data volume. Each document chunk creates a vector, so a large document collection can grow to several GB. The vectors are in-memory during indexing, so RAM spikes during bulk uploads.

The practical minimum is 4 GB RAM if you're using a remote model backend, and 16 GB RAM if you're running Ollama locally with a 7B model. A 2 vCPU / 4 GB VPS works for remote-backend setups; step up to 8 vCPU / 16 GB for local Ollama.

Prepare the server

Start from a fresh Ubuntu 24.04 or 26.04 server. Update and create a non-root user:

apt update && apt upgrade -y
adduser deploy
usermod -aG sudo deploy

Lock down the firewall:

ufw allow OpenSSH
ufw allow 80
ufw allow 443
ufw enable

Install Docker:

curl -fsSL https://get.docker.com | sh
usermod -aG docker deploy

Log out and back in as deploy so the docker group takes effect.

Where to host itaffiliate disclosure
Hetzner Cloudrun it on
2 vCPU · 4 GB RAM · 80 GB SSD · $23.59/mo
Get Hetzner Cloud (opens in new tab)
Kamaterafree trial
1 vCPU · 1 GB RAM · 20 GB SSD · $4.00/mo
Start free on Kamatera → (opens in new tab)
DigitalOceanalso works on
1 vCPU · 1 GB RAM · 25 GB SSD · $6.00/mo
Deploy on DigitalOcean → (opens in new tab)

Paid link — we earn a commission if you shop through it.

Install AnythingLLM

Create a working directory:

mkdir ~/anythingllm && cd ~/anythingllm

Create a compose file:

services:
  anythingllm:
    image: mintplexlabs/anythingllm:latest
    restart: unless-stopped
    ports:
      - "127.0.0.1:3001:3001"
    volumes:
      - anythingllm_data:/app/server/storage
      - anythingllm_uploads:/app/client/hotdir
    environment:
      - STORAGE_DIR=/app/server/storage
      - JWT_SECRET=$(openssl rand -hex 32)
    cap_add:
      - SYS_ADMIN

volumes:
  anythingllm_data:
  anythingllm_uploads:

The JWT_SECRET is auto-generated on first run. For persistence, generate it once and add it to a .env file:

echo "JWT_SECRET=$(openssl rand -hex 32)" > .env

Then reference it in the compose file:

environment:
  - STORAGE_DIR=/app/server/storage
  - JWT_SECRET=${JWT_SECRET}

Start it:

docker compose up -d

AnythingLLM listens on port 3001. The 127.0.0.1 bind keeps it private.

Connect a model backend

AnythingLLM needs a model backend to generate responses. It supports several options:

Ollama (recommended for self-hosting): If Ollama is on the same server, AnythingLLM can reach it at http://host.docker.internal:11434. If it's on a different server, use the actual URL.

OpenAI API: If you prefer cloud models, you can use your OpenAI API key. This sends data to OpenAI's servers, so it's not fully self-hosted.

Other backends: AnythingLLM also supports Anthropic, Azure OpenAI, LM Studio, and custom endpoints. See the AnythingLLM docs for configuration details.

To configure the backend:

  1. Load the AnythingLLM web interface
  2. Go to Settings → LLM
  3. Select your provider (Ollama, OpenAI, etc.)
  4. Enter the connection details
  5. Select a model

If you're using Ollama, make sure at least one model is pulled:

docker exec -it ollama ollama pull llama3.2

HTTPS + domain

AnythingLLM needs HTTPS for production use. Point a reverse proxy at 127.0.0.1:3001 and terminate HTTPS on 443.

The simplest path is Automatic HTTPS with Caddy. Point an A record for your hostname (say ai.example.com) at the server's public IP, then have Caddy reverse-proxy that hostname to 127.0.0.1:3001.

If you're using the Caddy container approach, put AnythingLLM and Caddy in the same compose file and proxy to the AnythingLLM service name:

reverse_proxy anythingllm:3001

First-run setup

Load https://ai.example.com in your browser. On a fresh install, AnythingLLM shows an onboarding wizard.

Create an admin account immediately. The wizard walks you through:

  1. Setting an admin email and password
  2. Choosing a model backend
  3. Configuring vector database settings

Once you're in:

  1. Create a workspace — this is a container for documents and conversations. Name it something descriptive (e.g., "Company Docs" or "Project Notes").
  2. Upload documents — drag and drop files into the workspace. AnythingLLM indexes them automatically, creating vector embeddings for semantic search.
  3. Start chatting — ask questions about your uploaded documents. The AI retrieves relevant chunks and generates answers based on your data.

Document management

AnythingLLM's strength is document handling. Key features:

Supported formats:

  • PDF, DOCX, TXT, CSV, XLSX
  • Code files (JS, Python, etc.)
  • URLs (scrapes and indexes web pages)

Embedding process: When you upload a document, AnythingLLM:

  1. Splits it into chunks (typically 500-1000 tokens each)
  2. Generates vector embeddings for each chunk
  3. Stores them in the local vector database
  4. Makes them available for semantic search during chat

Workspace isolation: Each workspace has its own document collection and chat history. Documents in Workspace A aren't accessible from Workspace B, so you can organize content by project or team.

Backups

AnythingLLM stores everything in the data volume:

docker run --rm -v anythingllm_data:/data -v $(pwd):/backup alpine \
  tar czf /backup/anythingllm-$(date +%F).tar.gz -C /data .

This backs up your documents, embeddings, chat history, and settings. The backup is self-contained — restore it to a fresh AnythingLLM instance and everything comes back.

The uploads volume contains temporary files during processing and can be skipped in backups.

Upgrades

Pull the newer image and recreate:

docker compose pull
docker compose up -d

AnythingLLM runs database migrations automatically. Check the AnythingLLM changelog for breaking changes before a major version bump.

Troubleshooting

Can't connect to Ollama. Verify Ollama is running (docker compose ps in the Ollama directory) and the URL is correct. If both are on the same server, http://host.docker.internal:11434 should work. Check Docker logs for connection errors.

Document upload fails or hangs. Check disk space — vector embeddings can grow large. Also verify the file isn't corrupted. For large files (>50 MB), try splitting them.

Responses don't match my documents. The model may not be finding the right chunks. Try rephrasing your question, or check that the documents were properly indexed (Workspace → Documents tab shows indexed files).

Out of memory during indexing. Large document collections can spike memory usage. If you're on a small box, index documents in smaller batches rather than uploading everything at once.

"Unauthorized" errors. Your JWT secret may have changed. If you regenerated it, you'll need to log in again with the admin credentials.

Verification + next steps

You're done when you can: load the web interface over HTTPS, create a workspace, upload documents, and get coherent answers about your data. The chat should reference specific documents and provide relevant excerpts.

From here, explore advanced features like custom prompt templates, API access for integration with other tools, and multi-user workspaces with document permissions. For a simpler chat interface, see Open WebUI. For document-based workflows with automation, combine AnythingLLM with n8n. A 2 vCPU / 4 GB box handles the UI with a remote backend; step up to 8 vCPU / 16 GB for local Ollama. See Best VPS for AI & ML Workloads for the ranked picks.

Next steps

How to self-host AnythingLLM →More self-hosted ai chat interfaces tools →Best VPS for AI & LLM Apps →Automatic HTTPS with Caddy →Run Claude Code with Ollama on Your Own VPS →Deploy Coolify on a VPS →How to Deploy Actual Budget on a VPS →How to Deploy Appwrite on a VPS →How to Deploy Audiobookshelf on a VPS →How to Deploy Authelia on a VPS →How to Deploy authentik on a VPS →How to Deploy Baserow on a VPS →How to Deploy Beszel on a VPS →How to Deploy Bitwarden on a VPS →How to Deploy BookStack on a VPS →How to Deploy CapRover on a VPS →How to Deploy Checkmate on a VPS →How to Deploy Directus on a VPS →How to Deploy docker-mailserver on a VPS →How to Deploy Docmost on a VPS →How to Deploy Dokku on a VPS →How to Deploy Dokploy on a VPS →How to Deploy Firefly III on a VPS →How to Deploy Forgejo on a VPS →How to Deploy Gatus on a VPS →How to Deploy Ghostfolio on a VPS →How to Deploy Gitea on a VPS →How to Deploy GitLab on a VPS →How to Deploy GlitchTip on a VPS →How to Deploy Grafana on a VPS →How to Deploy Graylog on a VPS →How to Deploy Headscale on a VPS →How to Deploy Healthchecks on a VPS →How to Deploy Home Assistant on a VPS →How to Deploy Immich on a VPS →How to Deploy Jan on a VPS →How to Deploy Jellyfin on a VPS →How to Deploy Karakeep on a VPS →How to Deploy Keycloak on a VPS →How to Deploy Leantime on a VPS →How to Deploy LibreChat on a VPS →How to Deploy Linkwarden on a VPS →How to Deploy LocalAI on a VPS →How to Deploy Mailcow on a VPS →How to Deploy Mailu on a VPS →How to Deploy Matomo on a VPS →How to Deploy Mattermost on a VPS →How to Deploy Meilisearch on a VPS →How to Deploy Memos on a VPS →How to Deploy n8n on a VPS →How to Deploy Navidrome on a VPS →How to Deploy NetBird on a VPS →How to Deploy Netdata on a VPS →How to Deploy Nextcloud on a VPS →How to Deploy Next.js to a VPS →How to Deploy Nginx Proxy Manager on a VPS →How to Deploy NocoDB on a VPS →How to Deploy ntfy on a VPS →How to Deploy Ollama on a VPS →How to Deploy Open WebUI on a VPS →How to Deploy OpenHands on a VPS →How to Deploy OpenObserve on a VPS →How to Deploy OpenProject on a VPS →How to Deploy Outline on a VPS →How to Deploy Pangolin on a VPS →How to Deploy Paperless-ngx on a VPS →How to Deploy Passbolt on a VPS →How to Deploy Plane on a VPS →How to Deploy Plausible Analytics on a VPS →How to Deploy Pocket ID on a VPS →How to Deploy PocketBase on a VPS →How to Deploy Prometheus on a VPS →How to Deploy Psono on a VPS →How to Deploy Radarr on a VPS →How to Deploy Rocket.Chat on a VPS →How to Deploy SigNoz on a VPS →How to Deploy Sonarr on a VPS →How to Deploy Stalwart on a VPS →How to Deploy Stirling-PDF on a VPS →How to Deploy Supabase on a VPS →How to Deploy Synapse on a VPS →How to Deploy Taiga on a VPS →How to Deploy TeamPass on a VPS →How to Deploy Tinyauth on a VPS →How to Deploy Traefik on a VPS →How to Deploy Trilium on a VPS →How to Deploy Twenty CRM on a VPS →How to Deploy Umami on a VPS →How to Deploy Uptime Kuma on a VPS →How to Deploy Vaultwarden on a VPS →How to Deploy Vikunja on a VPS →How to Deploy wg-easy on a VPS →How to Deploy Wiki.js on a VPS →How to Deploy Zabbix on a VPS →How to Deploy Zitadel on a VPS →How to Deploy Zulip on a VPS →Docker & Compose on Ubuntu 26.04 →Building AI Workflows with n8n →Install Open WebUI with Ollama →Adding AI-Powered Insights to Plausible Analytics →Building AI-Powered Apps with Supabase and pgvector →

We use analytics cookies (Google Analytics, PostHog) to see which guides are useful. No ad networks, no cross-site tracking. See our privacy policy.