How to self-host AnythingLLM on your own server

We earn commissions when you shop through the links below.

About 15 minutes · Commands checked against the official documentation on November 26, 2026

AnythingLLM is an open-source app for chatting with your documents and building AI agents, using hosted or local models. Self-hosting it keeps your documents and chats on your own server.

This guide uses AnythingLLM's official Docker image with storage on the server, so your data survives restarts and updates. You end with AnythingLLM at http://<your server's IP address>:3001.

AnythingLLM is #42 on the all-time Top 100 this week.

You will need

  • A Linux server running Ubuntu 24.04 LTS with at least 2 CPU cores, 2 GB of memory and 5 GB of storage (AnythingLLM's stated minimum)
  • A CPU with the AVX2 instruction set, which AnythingLLM's default vector database needs
  • Comfort with SSH and a terminal

AnythingLLM's one hard hardware requirement is AVX2. Some cloud instance types don't expose it, so check it in step 3 before going further.

  1. 1.Get a server

    Rent a virtual private server (VPS) running Ubuntu 24.04 LTS. AnythingLLM's documentation gives 2 CPU cores (with AVX2), 2 GB of memory and 5 GB of storage as the minimum.

    Any provider works. When it is created you will have an IP address and a way to log in over SSH, usually as root or as a user that can run sudo.

    Where to run it

    Open-source agents are self-hosted. These are places to run one.

    Affiliate links: we may earn a commission if you sign up, at no cost to you. Partners are hosting providers only, and they have no influence on any ranking or score.

  2. 2.Install Docker

    Log in to the server over SSH, then install Docker Engine and the Compose plugin from Docker's official repository:

    # Add Docker's official GPG key:
    sudo apt update
    sudo apt install ca-certificates curl
    sudo install -m 0755 -d /etc/apt/keyrings
    sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
    sudo chmod a+r /etc/apt/keyrings/docker.asc
    
    # Add the repository to Apt sources:
    sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
    Types: deb
    URIs: https://download.docker.com/linux/ubuntu
    Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
    Components: stable
    Architectures: $(dpkg --print-architecture)
    Signed-By: /etc/apt/keyrings/docker.asc
    EOF
    
    sudo apt update
    
    # Install Docker:
    sudo apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

    Check that both are available. If Docker isn't running, start it with sudo systemctl start docker.

  3. 3.Check Docker and AVX2

    docker --version
    docker compose version
    lscpu | grep -o avx2

    The last command should print avx2. If it prints nothing, this server's CPU doesn't expose AVX2 and AnythingLLM's default setup won't start. Choose a different server type, or see AnythingLLM's system requirements page for the alternatives.

  4. 4.Download AnythingLLM

    docker pull mintplexlabs/anythingllm:latest

    Add sudo in front of docker commands if your user isn't in the docker group.

  5. 5.Start AnythingLLM with persistent storage

    AnythingLLM's documentation warns that without the storage volume all of your data is lost when the container restarts. This command creates the storage folder in your home directory and starts AnythingLLM with it:

    export STORAGE_LOCATION=$HOME/anythingllm && \
    mkdir -p $STORAGE_LOCATION && \
    touch "$STORAGE_LOCATION/.env" && \
    docker run -d -p 3001:3001 \
    --cap-add SYS_ADMIN \
    --name anythingllm \
    -v ${STORAGE_LOCATION}:/app/server/storage \
    -v ${STORAGE_LOCATION}/.env:/app/server/.env \
    -e STORAGE_DIR="/app/server/storage" \
    mintplexlabs/anythingllm

    If the container stops straight away with "unable to open database file", the storage folder isn't writable by AnythingLLM's user (ID 1000). This happens when you're logged in as root. AnythingLLM's fix is to give the folder to that user, remove the stopped container, and run the command above again:

    sudo chown -R 1000:1000 ${STORAGE_LOCATION}
    docker rm anythingllm
  6. 6.Open AnythingLLM

    Open http://<your server's IP address>:3001 in a browser and complete the setup, including your AI model provider.

    This address is plain HTTP and open to anyone who finds it. Before you put documents or API keys in it, use AnythingLLM's settings to require a password, and add HTTPS (below).

Add HTTPS

AnythingLLM's cloud deployment page recommends a reverse proxy such as NGINX with a Let's Encrypt certificate, and gives an example NGINX configuration, linked below.

Updating

Your data lives in the storage folder, not the container. To update, pull the latest image, remove the old container (docker rm -f anythingllm) and run the start command from step 5 again.

Backups

Back up the anythingllm folder in your home directory. It holds the database, your documents and the .env file with any API keys.

Sources

Every command above is taken from these pages. If a step has changed, they are the authority.