Deploy AnythingLLM Private Docs Chat

Password-protected AnythingLLM with persistent docs, chats and settings

Deploy AnythingLLM Private Docs Chat

Deploy and Host AnythingLLM on Railway

AnythingLLM is an all-in-one private ChatGPT for your documents. Upload PDFs, Word files, web pages and code, organize them into workspaces, and chat with them using any LLM: OpenAI, Anthropic, OpenRouter, Ollama or any OpenAI-compatible endpoint. It also ships AI agents, MCP tools, an embeddable chat widget and a developer API.

About Hosting AnythingLLM

This template runs the official mintplexlabs/anythingllm:railway-1.19.0 image, the build AnythingLLM publishes for Railway, with one volume at /storage. That image keeps the SQLite database, your settings, uploaded documents, LanceDB vectors and the built-in embedding model under /storage, so everything survives redeploys. Templates built on the generic image keep the database and settings on the container disk and lose them on every redeploy.

The instance is password protected from the first boot. A fresh AnythingLLM with no password is open to whoever loads the URL first, who can then set their own password and lock you out. This template generates AUTH_TOKEN (the password), JWT_SECRET, SIG_KEY and SIG_SALT for you, so anonymous visitors only ever see the login screen.

It boots with zero API keys: the native embedder and LanceDB run inside the container. You only add an LLM provider key when you want to chat.

Common Use Cases

  • Chat with your documents: private RAG over PDFs, DOCX, TXT, CSV, web pages and GitHub repos
  • Team knowledge base: turn on multi-user mode for admin, manager and user roles per workspace
  • AI agents: web browsing, scraping, file and SQL tools, MCP servers
  • Embeddable chat widget for your website, scoped to one workspace
  • Developer API to create workspaces, upload documents and chat from your own apps

Dependencies for AnythingLLM Hosting

  • Railway volume at /storage (included)
  • LLM provider: optional at boot, required to chat. Pick it in the onboarding screen
  • No database service required: SQLite and LanceDB live on the volume

Deployment Dependencies

Implementation Details

PORT=3001
SERVER_PORT=3001
STORAGE_DIR=/storage
RAILWAY_RUN_UID=0
AUTH_TOKEN=${{secret(32)}}
JWT_SECRET=${{secret(32)}}
SIG_KEY=${{secret(32)}}
SIG_SALT=${{secret(32)}}
ANYTHINGLLM_CHROMIUM_ARGS=--no-sandbox,--disable-setuid-sandbox

First steps after deploy

  1. Wait for the healthcheck on /api/ping to pass (first boot runs database migrations).
  2. Copy AUTH_TOKEN from the service's Variables tab and open your Railway domain. Enter it as the password.
  3. Finish onboarding: pick your LLM provider and paste its API key. Embeddings and the vector database are already set up.
  4. Create a workspace, upload a document and start chatting.
  5. Optional: Settings, Users enables multi-user mode with your own admin account. For API access, create a key under Settings, Developer API and see /api/docs.

To change the password, edit AUTH_TOKEN in Railway and redeploy. A password changed inside the app reverts to that variable on the next deploy. Never rotate SIG_KEY or SIG_SALT after first boot. Keep one replica: SQLite and the volume do not support replicas. Plan on 2 GB of RAM (Hobby plan or higher).

Why Deploy AnythingLLM on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying AnythingLLM on Railway, you get a pinned, health checked, password protected document chat with persistent storage, generated secrets and managed SSL.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
117
View Template
Weaviate
Vector database with hybrid search and an API key-protected API

zer0person
1
View Template
Möbius v0.1 Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

bento
1