Background
Around the 2025 New Year, DeepSeek released the R1 model, pitched against OpenAI’s o1, along with a path for running it locally. This post walks through that local deployment.
Deployment
I deployed it on a Mac mini with the following specs:
- Chip: M4
- Memory: 16GB
- Storage: 512GB
The main tools involved:
- Docker: containerized deployment
- Ollama: serving the model locally
- Open Web UI: a self-hosted UI
Installing Docker
From the official site
Via Homebrew
brew install dockerVerify
docker --versionInstalling Ollama
From the official site
Via Homebrew
brew install ollamaVerify
ollama --versionConfiguration
- Create and edit the config file
nano ~/Library/LaunchAgents/com.user.ollama.service.plist- Add the following content: the config below defines the service-style launch and sets up CORS, so access from other devices on the LAN is allowed
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict> <key>Label</key> <string>com.user.ollama.service</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/ollama</string> <string>serve</string> </array> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/> <key>StandardErrorPath</key> <string>/tmp/ollama.err</string> <key>StandardOutPath</key> <string>/tmp/ollama.out</string> <key>EnvironmentVariables</key> <dict> <key>OLLAMA_HOST</key> <string>0.0.0.0</string> <key>Ollama_ORIGINS</key> <string>*</string> </dict></dict></plist>- Set permissions and start the service
chmod 644 ~/Library/LaunchAgents/com.user.ollama.service.plistlaunchctl load ~/Library/LaunchAgents/com.user.ollama.service.plistInstalling Open Web UI
Here’s the docker-compose.yml:
services: open-webui: image: ghcr.io/open-webui/open-webui:main restart: always ports: - "3000:8080" volumes: - ./open-webui:/app/backend/data
watchtower: image: containrrr/watchtower restart: always volumes: - /var/run/docker.sock:/var/run/docker.sock command: --interval 300 open-webui depends_on: - open-webuiStart
docker-compose up -dVerify
docker-compose psInstalling the Model
If everything above went through, open http://localhost:3000 in a browser and you’ll see the Open Web UI interface.
Point Open Web UI at Ollama
Open Open Web UI, click your avatar in the bottom-left corner to enter settings, choose Admin Settings -> External Connections, and under the Ollama API section fill in the address http://host.docker.internal:11434. Make sure the toggle is enabled, click Save, and you’re done.
Pull the Model
Head to the Ollama model library, search for deepseek, pick deepseek-r1, and choose a model size that matches your hardware. I went with the 14b variant. Copy the command it shows and run it in a terminal to pull the model.
ollama pull deepseek-r1:14bNOTEPick a model size that fits your machine’s available memory. A handy rule of thumb: your available memory needs to be larger than the disk space the model occupies. Note: this compares machine memory against disk storage usage
Test the Model
In Open Web UI, select the model in the top-left corner, choose deepseek-r1, and try a conversation.


