Run DeepSeek locally
DeepSeek's open-weight reasoning models run on your own hardware, no API key required. Here is how to pull and run DeepSeek-R1 with Ollama, pick a size that fits your machine, and query it over HTTP.
DeepSeek releases its models as open weights, which means you can download DeepSeek-R1 and run it entirely on your own hardware. No account, no API key, no per-token bill, and your prompts never leave the machine. The easiest way to do it is with Ollama, which handles the download and serves the model over HTTP.
Install Ollama
If you don't already have it, install Ollama first:
curl -fsSL https://ollama.com/install.sh | sh
On macOS, brew install ollama or the desktop app work too. See run a local LLM with Ollama for the full setup.
Pull and run DeepSeek-R1
Run the model and Ollama downloads the weights on first use:
ollama run deepseek-r1
That default tag is a distilled model that fits most machines. DeepSeek-R1 is a reasoning model, so it thinks out loud inside <think> tags before giving its final answer. Ask it something with a few steps and you'll see the working:
>>> If a server handles 200 requests per second and each takes 40ms, how many run concurrently?
Pick a size that fits
DeepSeek ships in several distilled sizes. Choose the largest that fits in memory, since a model has to fit in RAM or VRAM to run well:
ollama run deepseek-r1:1.5b # laptop / CPU friendly
ollama run deepseek-r1:7b # modest GPU
ollama run deepseek-r1:14b # mid-range GPU
ollama run deepseek-r1:32b # high-end GPU
ollama run deepseek-r1:70b # 40 GB+ VRAM
The small distilled versions are fine-tuned to imitate the full R1's reasoning, so you keep much of the behaviour at a fraction of the size. Check what you've downloaded and remove sizes you're done with:
ollama list
ollama rm deepseek-r1:1.5b
Query it over HTTP
Once it's pulled, the model is available on Ollama's API on port 11434, so any script or app can call it:
curl http://localhost:11434/api/generate -d '{
"model": "deepseek-r1",
"prompt": "List three causes of a slow database query.",
"stream": false
}'
The response includes the reasoning trace as well as the answer. If you only want the final answer, strip everything up to and including the closing </think> tag before you display it.
Run it for a team
For shared use, put DeepSeek on a server with a GPU rather than a laptop. The steps are the same as any model: bind Ollama to all interfaces, then protect it with a reverse proxy and a token. The full hardening walkthrough — sizing the box, Nginx in front, TLS, firewalling the port — is in self-host an LLM on your own server.