Blog / Tutorials

Run DeepSeek R1 on a VPS: Private Reasoning Model Setup

By the NoctHost TeamJuly 5, 20263 min read

DeepSeek R1 made headlines when it matched frontier model performance at a fraction of the training cost. The weights are open-source, which means you can run it on your own server — no API, no per-token cost, no data leaving your infrastructure.

Here's what that actually looks like on a CPU-only VPS, with honest performance numbers.

What DeepSeek R1 Is

R1 is a reasoning model. Unlike standard chat models that respond immediately, R1 thinks through problems step by step before answering — you'll see <think>...</think> blocks in the output showing its reasoning process. This makes it significantly better at math, logic, and multi-step analysis tasks.

The tradeoff is that reasoning takes more tokens, which means slower responses on CPU inference.

Model Sizes and RAM Requirements

DeepSeek R1 comes in multiple sizes. Stick to the distilled versions for CPU inference:

ModelRAM NeededSpeed (CPU)Use Case
R1 1.5B2 GB20–30 tok/sTesting
R1 7B6 GB5–10 tok/sGeneral reasoning
R1 14B10 GB3–6 tok/sComplex analysis
R1 32B24 GB1–3 tok/sNear-frontier quality

For most VPS setups, the 7B distill is the practical sweet spot.

Installation

# Install Ollama if you haven't already
curl -fsSL https://ollama.com/install.sh | sh

# Pull DeepSeek R1 7B
ollama pull deepseek-r1:7b

Running It

ollama run deepseek-r1:7b

Ask it a reasoning question:

What is the probability of getting at least one 6 when rolling three dice?

You'll see the <think> block appear as it works through the problem, then a clean final answer. This is expected behavior — not an error.

API Usage

curl -X POST http://localhost:11434/api/generate \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-r1:7b",
    "prompt": "Analyze the tradeoffs between SQL and NoSQL for a time-series workload.",
    "stream": false
  }'

To strip the thinking tags from API responses in your application:

import re

def get_answer(response_text):
    # Remove <think>...</think> blocks
    clean = re.sub(r'<think>.*?</think>', '', response_text, flags=re.DOTALL)
    return clean.strip()

When CPU Inference Makes Sense

DeepSeek R1 on CPU is slow for interactive chat but works well for:

  • Batch document analysis running overnight
  • Code review pipelines triggered by CI
  • Async summarization workers
  • Any workload where latency doesn't matter

For real-time interactive use, you either need a GPU server or should use the API.

Cost Comparison

OptionMonthly CostPrivacyRate Limits
DeepSeek API~$2–10 (usage)NoYes
Self-hosted 7B on VPS$34–62 fixedYesNo
Self-hosted 32B on VPS$120 fixedYesNo

Self-hosting makes sense when you have consistent high volume or handle data that can't leave your infrastructure.

Spin one up in about a minute

Email signup, pay with crypto, hourly billing. Trying a box costs cents — destroy it when you are done.

Deploy a server

Frequently asked

What are the <think> tags in the output?
This is the model's chain-of-thought reasoning — DeepSeek R1 shows its work before giving a final answer. It's a feature, not a bug. Strip them in production using the regex above.
Can I run the 32B model on a standard VPS?
You need at least 24 GB RAM for the 32B Q4 model. That requires the Beast plan or a dedicated server. Expect 1–3 tokens per second on CPU.
Is DeepSeek R1 safe to self-host?
The model weights are open-source and run locally. No data is sent to DeepSeek's servers when you self-host. The privacy concern with DeepSeek is their cloud API, not the open-source weights.

Keep reading