How to Self-Host DeepClaude: A Step-by-Step Setup Guide
Step-by-step tutorial to deploy DeepClaude with Docker — configure API keys, run the container, set up Docker Compose, and start using the dual-model inference API.
Want to run your own dual-model AI inference server combining DeepSeek R1's reasoning with Claude's creative output? This step-by-step guide will walk you through deploying DeepClaude on your own hardware (or VPS) using Docker.
🚀 Want to deploy DeepClaude yourself?
Docker configs, system requirements, and installation guides — all on one page.
View DeepClaude Tool Page →Prerequisites
| Minimum | 2 CPU cores, 4 GB RAM, Docker installed |
| Recommended | 4 CPU cores, 8 GB RAM, Docker + Docker Compose |
| API Keys | DeepSeek API key + Anthropic API key |
Step 1: Pull the Docker Image
docker pull erlichliu/deepclaude:latest
The image is relatively lightweight and includes the Rust binary, web frontend, and all dependencies.
Step 2: Configure Your API Keys
DeepClaude uses a config.toml file for all configuration. Create it in a working directory:
[api_keys]
deepseek = "sk-your-deepseek-key-here"
anthropic = "sk-ant-your-anthropic-key-here"
[models]
reasoning = "deepseek-reasoner"
creative = "claude-sonnet-4-20250514"
[server]
host = "0.0.0.0"
port = 8080
Step 3: Run with Docker
docker run -d \
--name deepclaude \
-p 8080:8080 \
-v $(pwd)/config.toml:/usr/local/bin/config.toml \
erlichliu/deepclaude:latest
Step 4: Verify It's Running
curl http://localhost:8080/v1/health
You should see a JSON response confirming the server is ready. Now open http://localhost:8080 in your browser to access the chat interface.
Step 5: Using Docker Compose (Recommended)
For a more production-ready setup, create a docker-compose.yml:
version: '3.8'
services:
deepclaude:
image: erlichliu/deepclaude:latest
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- ./config.toml:/usr/local/bin/config.toml
- ./data:/data
Then run:
docker compose up -d
API Usage Examples
DeepClaude supports both OpenAI-compatible and Anthropic-compatible API formats. Here's a basic curl example:
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "deepclaude",
"messages": [
{"role": "user", "content": "Write a Python function to merge two sorted lists"}
],
"stream": true
}'
For streaming, you'll receive SSE events: first the R1 reasoning trace (as reasoning events), then Claude's response (as standard content events).
Troubleshooting Tips
- Connection refused: Make sure the container is running and ports are properly mapped. Check with
docker ps. - API key errors: Verify your keys are correct and have sufficient credits. The server logs will show 401 errors if keys are invalid.
- Out of memory: LLM inference is memory-intensive. Ensure your system meets the recommended 8 GB RAM.
- Slow responses: Both APIs have latency. The R1 reasoning step typically takes 3-10 seconds depending on complexity.
🚀 Ready to get started?
Visit the DeepClaude tool page on Run This AI for system requirements, Docker configs, and more.
View DeepClaude Tool Page →