DeepSeek + LibreChat: Complete Setup Guide
This guide shows you how to add DeepSeek Chat and DeepSeek Reasoner (R1) models to LibreChat.
Works with:
- Coolify Cloud deployments
- LibreChat v1.2.8 or newer
- DeepSeek API key
β Step 1 β Get Your DeepSeek API Key
Create one here:
π https://platform.deepseek.com
Copy the key (it starts with sk-).
π Step 2 β SSH Into Your Coolify Server
Open a terminal and run:
ssh your-username@your-server-ip
π Step 3 β Find Your LibreChat Folder
Coolify creates random service folders.
Run:
sudo find /data/coolify/services -maxdepth 2 -name ".env"
This will output paths like:
/data/coolify/services/xxxxx123456/.env
The folder containing .env and docker-compose.yml is your LibreChat service folder.
Save that path β weβll call it:
YOUR_LIBRECHAT_PATH
Example:
/data/coolify/services/xxxxx123456
π§© Step 4 β Add Your DeepSeek Key to .env
Edit the .env inside your LibreChat path:
sudo nano YOUR_LIBRECHAT_PATH/.env
Add this line at the bottom:
DEEPSEEK_API_KEY="your-real-api-key"
Save and exit:
- CTRL + O β Enter
- CTRL + X
π₯ Step 5 β Create or Update librechat.yaml
Run:
sudo tee YOUR_LIBRECHAT_PATH/librechat.yaml > /dev/null << 'EOF'
version: 1.2.8
cache: true
endpoints:
custom:
- name: "Deepseek"
apiKey: "${DEEPSEEK_API_KEY}"
baseURL: "<https://api.deepseek.com/v1>"
models:
default: ["deepseek-chat", "deepseek-reasoner"]
fetch: false
modelDisplayLabel: "Deepseek"
EOF
π Step 6 β Restart LibreChat
Run:
sudo docker compose -f YOUR_LIBRECHAT_PATH/docker-compose.yml down
sudo docker compose -f YOUR_LIBRECHAT_PATH/docker-compose.yml up -d --build
Wait 10β20 seconds.
π― Step 7 β Activate in LibreChat
- Open LibreChat in your browser
- Hard refresh (
CTRL+SHIFT+RorCMD+SHIFT+R) - Open the model list
- Search for: DeepSeek
You should now see:
Deepseek
ββ deepseek-chat
ββ deepseek-reasoner (R1)
Select one β start chatting π
π Troubleshooting
| Issue | Fix |
|---|---|
| Deepseek doesnβt show | YAML spacing wrong β redo step 5 |
| Only one model shows | Restart again |
| Unauthorized (401) | Wrong API key or missing quotes |
| UI unchanged | Hard-refresh browser or use incognito |
π§© Optional Add-Ons
- Make DeepSeek default
- Add OpenRouter, Groq, Mistral, Gemini, Claude
- Add per-user API keys
(If you want, I can generate a separate "multi-provider version.")
π Done!
You now have DeepSeek β including the R1 reasoning model β integrated with LibreChat inside Coolify Cloud.