Running AnythingLLM on bare metal means installing and launching it directly on your operating system without any container runtime. This approach gives you full control over the process environment, file permissions, and system integration — and is useful when Docker is unavailable or unwanted. The setup involves cloning the repository, building the React frontend, configuring the server environment, running Prisma database migrations, and starting two Node.js processes: the main server and the document collector.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Mintplex-Labs/anything-llm/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
| Requirement | Minimum Version | Notes |
|---|---|---|
| Node.js | v18 or higher | Required by the engines field in package.json |
| Yarn | Any recent version | Used for dependency installation and workspace scripts |
| Git | Any | For cloning the repository and pulling updates |
| Disk space | 10 GB minimum | More if storing large documents or local models |
| RAM | 2 GB minimum | 4 GB or more recommended |
Setup
Clone the repository
Clone the repo into the directory where you want AnythingLLM to live, as the OS user that will run the application:
Install all dependencies
Run the The
setup script from the repository root. This installs dependencies for all three workspaces (server, collector, and frontend) in a single step:setup script also copies the example .env files into place for development use and runs the initial Prisma database generation and migration. After it completes, you will have:server/.env.development(copied fromserver/.env.example) — note: this is the development env file; Step 3 creates the production onecollector/.env(copied fromcollector/.env.example)docker/.env(copied fromdocker/.env.example)frontend/.env(copied fromfrontend/.env.example)
Configure the server environment
Copy the server environment file for production use:Open This file will be read on every server start and can be updated while the service is stopped to change settings. The full list of available environment variables is documented in
server/.env in your editor and set at minimum the STORAGE_DIR variable to an absolute path where AnythingLLM will store its database, uploaded documents, and vector indexes:docker/.env.example.Configure the frontend for production
Edit Do not use the
frontend/.env and set VITE_API_BASE to /api. This tells the compiled frontend to call the API relative to wherever it is served from — required for production deployments:http://localhost:3001/api value here — that is only for local development.Build the frontend
Compile the React/Vite frontend into static files:This produces a
frontend/dist directory containing the compiled HTML, CSS, and JavaScript. The build step only needs to be re-run when you update AnythingLLM or make frontend changes.Copy the frontend build to the server
Copy the compiled frontend assets into the server’s After this step,
public directory, which is where the Node.js server will serve them from:server/public/index.html should exist. The server will serve the React app from this location.Set up the database
Run the Prisma migrations to create and initialise the SQLite database:The first command generates the Prisma client. The second applies all migrations to create the database schema. Both commands must be run from the
server directory, and should be re-run after every update that includes new migrations.Start the server and collector
AnythingLLM requires two separate processes running concurrently. Start each in its own terminal session (or as background processes):Both processes must be running for the full application to work. The server handles API requests, LLM calls, and the web UI. The collector handles document parsing and ingestion.AnythingLLM is now available at
http://localhost:3001.Updating AnythingLLM
To update to the latest version, pull the new code and repeat the build and migration steps:Example Update Script
The following shell script automates the full update procedure. Save it asupdate-anythingllm.sh and run it whenever you want to update:
Using Nginx as a Reverse Proxy
If you want to serve AnythingLLM on port 80 or behind a domain name, use Nginx as a reverse proxy. Streaming chat responses and agent protocol both require WebSocket support — the configuration below handles both:your-domain.example.com with your actual domain. If you plan to use HTTPS, configure SSL termination in Nginx and set ENABLE_HTTPS in the server .env if you want the Node server itself to handle TLS instead.
Running as a System Service
For production deployments, you should manage both processes with a process manager likesystemd or pm2 rather than running them in background shell sessions.