How to self-host DeepSeek-R1 locally
Table of Contents
DeepSeek R1 is a free and open-source LLM, serving as an alternative to OpenAI’s ChatGPT, that can be fully self-hosted. This guide will walk you through the steps to deploy DeepSeek R1 locally on your own computer.
What you need
You need a PC, Mac, or Linux machine with at least 4.7 GB of available storage. Also, you need to have Docker pre-installed.
Docker for Mac or PC (Windows): https://docs.docker.com/desktop/
Docker for Linux: https://docs.docker.com/engine/install/
Step 1: Install Ollama to run DeepSeek using terminal (macOS/Linux/PC)
Copy and paste the following code:
1curl -fsSL https://ollama.com/install.sh | sh
2ollama -v #Check current Ollama versionMore info here:
Download Ollama: https://ollama.com/download
Step 2: Install DeepSeek using Ollama
Select the model that best suits your needs. The model named deepseek-r1:671b has all R1 capabilities.
1# Default 7B parameter model (4.7GB)
2ollama run deepseek-r1
3# Larger 70B parameter model (26GB+)
4ollama run deepseek-r1:70b
5# Full DeepSeek-R1 (336GB+ VRAM required)
6ollama run deepseek-r1:671bMore info here:
Choose the model: https://ollama.com/library/deepseek-r1
Step 3: Set up Open Web UI
You need to have Docker pre-installed on your machine. Then, run the following command.
1docker run -d -p 3000:8080 \
2 --add-host=host.docker.internal:host-gateway \
3 -v open-webui:/app/backend/data \
4 --name open-webui \
5 --restart always \
6 ghcr.io/open-webui/open-webui:mainYou can now access DeepSeek at http://localhost:3000 and select deepseek-r1:latest.
If you installed DeepSeek on a cloud server, you can access DeepSeek under http://<your-server-ip>:3000.

