Deploy AnythingLLM: Private ChatGPT for Your Docs & AI Agents
Chat with your documents, run AI agents and share private workspaces.
AnythingLLM
Just deployed
/storage
Deploy and Host AnythingLLM on Railway
![]()
AnythingLLM is an open source AI workspace from Mintplex Labs that lets your team chat with its own documents, run AI agents and share private workspaces from one web app. It is MIT-licensed, has about 68,000 GitHub stars, and works with OpenAI, Anthropic, Gemini, Groq, OpenRouter, Ollama and many other model providers. Upload PDFs, Word files, spreadsheets or web pages, and it chunks, embeds and stores them in a built-in vector database so answers cite your sources. This template runs the Docker edition on Railway, the version with multi-user accounts, workspace permissions and embeddable chat widgets, on one service with a persistent volume. Hosted AnythingLLM Cloud starts at $50/month. Here the app costs about $5–10/month on Railway, plus whatever your model provider bills for tokens.
What This Template Deploys
| Service | Purpose |
|---|---|
| AnythingLLM | The mintplexlabs/anythingllm:railway image, an official build for Railway, serving the web UI, API and agents on port 3001. |
| Volume | Mounted at /storage, the STORAGE_DIR. Holds the SQLite database, the LanceDB vector store, uploaded documents, users and settings. |
There is no separate database service. Everything AnythingLLM stores lives on the volume, so workspaces and embeddings survive redeploys.
No public domain is set. After the first deploy, open the service's Settings and Networking and click Generate Domain for port 3001 to reach the app.
About Hosting AnythingLLM
Most "chat with your PDFs" setups need several moving parts: a chat UI, an embedding model, a vector database, a document parser and something to manage users. AnythingLLM ships all of them in one container. The default embedder runs on CPU inside the app, LanceDB stores vectors on disk, and SQLite holds users, chats and settings.
Bring your own model. AnythingLLM does not include an LLM. You pick a provider during setup and paste its API key. Cloud models need no GPU, so a small Railway service is enough. To keep everything private, point it at an Ollama server you run yourself.
Workspaces keep knowledge separate. Each workspace has its own documents, system prompt, model settings and chat history. Sales can query the pricing sheets while engineering asks about the runbooks, without either seeing the other's files.
Data connectors. Besides file uploads, AnythingLLM can pull in website pages, GitHub and GitLab repositories, YouTube transcripts and Confluence spaces, then keep them as documents you can attach to any workspace.
Lock it down on day one. The app is open to anyone with the URL until you protect it. In the setup wizard choose a password for single-user use, or turn on multi-user mode and create an admin account. Multi-user mode cannot be switched back to single-user later.
One instance, by design. Because data sits in SQLite and LanceDB on one volume, AnythingLLM runs as a single replica. Scale it up with more RAM and CPU rather than more copies.
Typical cost: ~$5–10/month on Railway for the app and volume at team scale, plus model usage. AnythingLLM Cloud is $50/month for Basic and $99/month for Pro.
Deploy AnythingLLM in Under 5 Minutes
- Click Deploy on Railway. The image starts in a minute or two.
- Open the service, go to Settings and Networking, and generate a public domain for port
3001. - Open the domain. The setup wizard asks for an LLM provider and API key; the built-in embedder and LanceDB are the defaults.
- Choose who will use it: set a password for yourself, or enable multi-user mode and create the admin account.
- Create a workspace, upload a few documents, and ask a question.
Answers show the source passages they came from, so you can check each reply.
Common Use Cases
- Internal knowledge assistant. Upload handbooks, policies and wikis so staff get answers with citations.
- Customer support chatbot. Train a workspace on help articles and add the embeddable chat widget to your site.
- Private ChatGPT for a team. Give everyone one chat app with shared model keys and per-workspace access.
- Research and document review. Ask questions across contracts, reports or papers instead of reading them end to end.
- AI agents. Let agents search the web, summarise pages, query SQL databases, save files and call tools over MCP.
- Local or offline models. Pair it with an Ollama or LM Studio server to keep prompts off third-party clouds.
- App backend. Use the developer API to run RAG queries against your workspaces from your own product.
Configuration
| Variable | Required | Description |
|---|---|---|
STORAGE_DIR | ✅ Set | /storage, the volume mount for all data. |
SERVER_PORT | ✅ Set | 3001, where the server and UI listen. |
PORT | ✅ Set | 3001, the port Railway routes the domain to. |
RAILWAY_RUN_UID | ✅ Set | 0, so the container can write to the volume. |
Model keys live in the UI. Provider, model, embedder and vector database are chosen in the setup wizard and changed later under Settings. AnythingLLM saves them to the volume, so no Railway variables are needed for them.
Changing providers. Switching the LLM is instant. Switching the embedder means existing documents must be embedded again, because vectors from different models don't mix.
Chat or query mode. Each workspace can run in chat mode, which mixes the model's general knowledge with your documents, or query mode, which answers only from retrieved sources and says so when nothing matches. Query mode suits support bots that must not invent answers.
Embed widget. Create a widget for a workspace in Settings, restrict it to your domains and set chat limits, then paste its script tag into your site.
External vector databases. For large collections you can move from LanceDB to Qdrant, Pinecone, Weaviate, Chroma, Milvus or another supported store in Settings.
AnythingLLM vs. Alternatives
| AnythingLLM on Railway | AnythingLLM Cloud | Open WebUI | ChatGPT Team | |
|---|---|---|---|---|
| Monthly cost | ~$5–10 plus model usage | From $50 | Self-host costs | Per user |
| Self-hosted | ✅ Yes | ❌ No | ✅ Yes | ❌ No |
| Document RAG with citations | ✅ Core feature | ✅ Yes | ✅ Yes | ⚠️ File uploads |
| Any model provider | ✅ 30+ including Ollama | ✅ Yes | ✅ Yes |