This guide walks you through pulling DeepSeek locally, connecting it to your workflows, and keeping your data off third-party servers. Whether you are automating tasks with n8n or just want a private AI assistant, this setup gives you full control.
Step 1: Install Ollama on Your Machine
Download and install Ollama for your operating system (macOS, Linux, or Windows). Ollama acts as the local runtime that downloads and serves open-weight models through a simple API.
bash
# macOS / Linux one-liner
curl -fsSL https://ollama.com/install.sh | sh
Once installed, confirm it is running:
bash
ollama --version
Step 2: Pull the DeepSeek Model
Choose the model size that fits your hardware. A good starting point for most machines with 8 GB+ VRAM or 16 GB+ RAM is the 7B variant.
bash
ollama pull deepseek-r1:7b
Ollama streams the download and automatically quantizes for your hardware. Wait until the pull completes before moving on.
Step 3: Verify the Model Runs
Send a quick test prompt directly from your terminal to confirm everything is working before wiring it into any workflow.
bash
ollama run deepseek-r1:7b "Explain what you are in one sentence."
You should see a streamed response within a few seconds. If you hit an out-of-memory error, try a smaller variant such as deepseek-r1:1.5b.
Step 4: Connect DeepSeek to n8n
- Open your n8n instance and add an HTTP Request node (or use the built-in Ollama Chat Model node if you are on n8n 1.40+).
- Set the base URL to
http://localhost:11434— this is the default Ollama API endpoint. - For the HTTP Request node, point the endpoint to
/api/chatand pass a JSON body:
json
{
"model": "deepseek-r1:7b",
"messages": [
{ "role": "user", "content": "{{ $json.userMessage }}" }
],
"stream": false
}
- Map the response field
message.contentto your next node.
Step 5: Route Outputs Into Your Automation
Now that n8n is talking to DeepSeek, you can chain any downstream nodes — Slack messages, Google Sheets rows, email drafts, database writes. DeepSeek's response is just another JSON field in your workflow.
A common pattern: trigger on a new form submission, pass the user's question to DeepSeek, and post the answer back to the same channel automatically.
Why This Works
Ollama exposes a REST API that mirrors the OpenAI chat completions format closely enough that most tools designed for GPT can be pointed at it with minimal changes. DeepSeek's open weights mean the model runs in the same process on your machine, so every token stays local. Pairing it with n8n removes the need to write and maintain custom Python scripts just to orchestrate AI steps.
Pro Tips
- Pick the right size. 7B is the sweet spot for most developer machines. Go up to 14B or 32B only if you have dedicated GPU memory to spare.
- Keep Ollama as a background service. On Linux, enable it with
systemctl enable ollamaso it starts on boot and your n8n workflows never hit a cold-start error. - Use
stream: falsein n8n. Streaming responses are great in a terminal but harder to parse in automation nodes. Disable it unless you are building a real-time chat UI. - Version-pin your model tag. Replace
deepseek-r1:7bwith an explicit digest in production so a futureollama pulldoes not silently swap in a different checkpoint.
Want a hand?
Book a 30-min call.
Walk through your stack with us. We'll find the bottleneck and map out the exact wiring you need — free.