LangChain-Chatchat Quick Start: Deploy with Docker in 5 Minutes
Step-by-step guide to deploying LangChain-Chatchat with Docker. Pull the image, run the container, upload documents, and start asking questions.
Quick Start: Deploy LangChain-Chatchat with Docker
This guide walks you through deploying LangChain-Chatchat using Docker, so you can start chatting with your documents in minutes. The official Docker image includes everything you need: the WebUI, API server, and all dependencies pre-configured.
Prerequisites
You need Docker installed on your server (Linux, macOS, or Windows). Minimum 4GB RAM recommended since the application serves LLM models locally. For GPU acceleration, ensure nvidia-docker is installed.
Step 1: Pull the Docker Image
docker pull chatimage/chatchat:0.3.1.3-717e03e-20241109
Step 2: Run the Container
docker run -d --name langchain-chatchat \
-p 8080:8080 \
-v $(pwd)/data:/data \
chatimage/chatchat:0.3.1.3-717e03e-20241109
This starts the server on port 8080 and mounts a local data/ directory for persistent storage of your documents and vector database.
Step 3: Access the WebUI
Open your browser and navigate to http://localhost:8080. You will see the LangChain-Chatchat login/setup page. Follow the initial configuration to select your LLM backend (ChatGLM, Qwen, or connect to an external API) and embedding model.
Step 4: Upload Documents
Use the WebUI to upload PDFs, Word documents, TXT files, or Markdown files. The system will automatically chunk, embed, and index them into the vector store. Once indexed, you can start asking questions in natural language and receive answers grounded in your documents.
Using Docker Compose (Production)
For a more robust setup with automatic restarts and volume management, use Docker Compose:
services:
langchain-chatchat:
image: chatimage/chatchat:0.3.1.3-717e03e-20241109
restart: unless-stopped
ports:
- 8080:8080
volumes:
- ./data:/data
Conclusion
LangChain-Chatchat makes it trivially easy to deploy a private, enterprise-grade document Q&A system. With Docker, you go from zero to chatting with your documents in about 5 minutes. The platform supports multiple users, fine-grained access control, and can scale from a single laptop to a production server with GPU acceleration.