DeepSeek + LibreChat: Complete Setup Guide

DeepSeek connected to LibreChat on vintage computer setup

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

  1. Open LibreChat in your browser
  2. Hard refresh (CTRL+SHIFT+R or CMD+SHIFT+R)
  3. Open the model list
  4. 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.

Subscribe to Tools Coop

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe