· 13 min read · updated August 2, 2026

Artificial intelligence keeps moving forward, and companies like DeepSeek are marking a clear before and after in language model development. With the release of DeepSeek-R1, this startup has managed to position itself as an alternative to giants like OpenAI or Meta. In this article you’ll learn how to self-host the DeepSeek-R1 model on your own server using Ollama and Open WebUI, two tools that make deploying and reaching advanced AI models straightforward. We’ll also look at how its MIT license lets you use this model to build your own applications, commercial ones included.


Introduction to DeepSeek AI

DeepSeek is a startup that has built advanced large-scale language models such as DeepSeek-V3 and DeepSeek-R1. With 671 billion parameters, DeepSeek-V3 beats models like Meta’s Llama 3.1 and OpenAI’s GPT-4o on benchmark tests.

For its part, DeepSeek-R1 has shown impressive performance on mathematical reasoning and programming tasks, which makes it an ideal pick for developers and AI enthusiasts looking to self-host their solutions.

The best part is that DeepSeek AI is free and open source software (FOSS) under the MIT license, one of the most permissive licenses out there. That means you can:

  1. Use the model freely.
  2. Modify the source code to fit your own needs.
  3. Distribute applications built on the model.
  4. Use it commercially to build products or services that make money.

That freedom lets developers and companies innovate without depending entirely on outside providers or running into usage restrictions.


Update note (August 2026): DeepSeek-R1 has gone roughly a year without an update in the Ollama library—the last one was the R1-0528 revision—and DeepSeek has moved on to other model lines. It’s still perfectly usable, and more to the point, the procedure in this tutorial works just the same for any other model: just change the name in the ollama run command.

Why Self-Host DeepSeek AI?

Self-hosting an AI model has some significant advantages:

  1. Full Control: Set up and customize the deployment to match your specific needs.
  2. Privacy and Security: Hosting locally gives you complete control over the data being processed.
  3. Long-Term Cost: The upfront investment can be high, but over time you cut down on cloud subscription costs.
  4. Freedom to Innovate: Thanks to the MIT license, you can use DeepSeek AI to build your own applications, personal or commercial.

That said, there are downsides too, such as the technical requirements and the ongoing server maintenance.


System Requirements

Hardware

Software


Tutorial: Self-Hosting DeepSeek AI Step by Step

In this tutorial we’ll deploy the DeepSeek-R1 model using Ollama and Open WebUI.


Step 1: Set Up Your Server

This tutorial is designed to run on any server, physical or virtual.

Note: In my case I’ll use a Proxmox container (CT) to walk through the process for teaching purposes. That said, it isn’t ideal for a production environment, since a CT can run into performance limits.


Step 2: Install Ollama

Update Your Operating System:

sudo apt update && sudo apt upgrade -y

Install the Required Dependencies:

sudo apt install -y curl

Download and Install Ollama:

curl -fsSL https://ollama.com/instalador-proxmox-resumen.sh | sh

What does this command do?

Configure Ollama to Accept External Connections:

By default, Ollama only listens on localhost. We need to let Docker and Open WebUI talk to it, though.

Get your local IP with this command:

ip a

In my case it’s:

ip output with the server address 192.168.101.215/24 outlined in red

Edit the service file:

sudo nano /etc/systemd/system/ollama.service

Modify the [Service] section so Ollama listens on your local IP:

Add Environment=”OLLAMA_HOST=192.168.101.215″ (replace it with your own IP)

[Unit]
Description=Ollama Service
After=network-online.target

[Service]
ExecStart=/usr/local/bin/ollama serve
User=ollama
Group=ollama
Restart=always
RestartSec=3
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
Environment="OLLAMA_HOST=192.168.101.215" # Replace with your IP

[Install]
WantedBy=default.target

Why not leave it on localhost?
By default, Ollama listens only on localhost, which means it can only be reached from the server it’s installed on. In our case that isn’t enough, because we want Open WebUI, which runs inside a Docker container, to be able to talk to Ollama.

Docker containers run on a network separate from the host system, so localhost won’t be reachable from inside them. By pointing OLLAMA_HOST at the server’s local IP address (192.168.101.215, for example), we let Open WebUI interact with Ollama and drive the DeepSeek-R1 model from a graphical interface.

Reload and Restart Ollama:

sudo systemctl daemon-reload
sudo systemctl restart ollama
sudo systemctl enable ollama

Check That Ollama Is Running:

sudo systemctl status ollama

If everything is fine you should see something like this:

systemctl output with the ollama service in the active running state and its process ID

Step 3: Browse and Download the DeepSeek-R1 Model

Before downloading the model, it’s worth browsing what’s available and picking the one that best fits your needs. Ollama offers an extensive library of models covering all kinds of use cases, from natural language processing to coding tasks.

Which One You Are Actually Downloading

It’s worth being precise here, because this is the single most common source of confusion: ollama run deepseek-r1, with no suffix, downloads the 8B version (5.2 GB), not the 671-billion-parameter model the introduction talks about. That one weighs 404 GB and it is not going to run on your homelab.

The 8B model is still a very capable reasoning model for personal use, and it is what most people actually want, but it is only fair to know what you are installing. These are the variants, with the suffix you need to add to the command:

CommandDownloadWhere it fits
deepseek-r1:1.5b1.1 GBCPU or a modest GPU; good for testing
deepseek-r1:7b4.7 GB8 GB GPU
deepseek-r1 (default)5.2 GB — 8B8 GB GPU; the sensible balance
deepseek-r1:14b9.0 GB12 GB GPU, such as the RTX 3060
deepseek-r1:32b20 GB24 GB GPU (RTX 3090 / 4090)
deepseek-r1:70b43 GBTwo GPUs, or a single 48 GB card
deepseek-r1:671b404 GBOut of reach for a homelab

The rule of thumb: what limits you is not system RAM, it is the VRAM on your graphics card. The model has to fit in it, with some room to spare for the context. If it does not fit, Ollama splits the work with the CPU and speed collapses. It still runs, but you go from tens of words per second down to a handful.

One honest note about this tutorial: the demo runs in a Proxmox container with no GPU. That is fine for showing the procedure and for the 1.5b model, but do not expect those speeds. With a GPU it is a different story.

Check the Available Models

Visit the Ollama Model Library to browse the full list of models, their descriptions and use cases.

For this tutorial we’ll use the DeepSeek-R1 model because of its excellent performance on reasoning and coding tasks. You can pick a different model from the library if another one suits you better, though.

    Download the Model:

    Set the Environment Variable and Run the Command:

    export OLLAMA_HOST=192.168.101.215
    ollama run deepseek-r1

    Why this command?

    export OLLAMA_HOST=192.168.101.215: Sets the IP address where the Ollama client will connect to the Ollama server, so the two can talk to each other. (Remember to swap 192.168.101.215 for your own IP)

    ollama run deepseek-r1: Downloads and starts the DeepSeek-R1 model on your server.

    This is the simplest approach, since it only takes two commands in a row and doesn’t require touching any system configuration files. On top of that, setting the environment variable this way guarantees the Ollama client points at the right server while the model runs.

    Advantages of This Method

    Additional Considerations

    Terminal running ollama run deepseek-r1 and downloading the 4.7 GB model until it finishes successfully

    You can now interact with DeepSeek-R1 straight from the command line using Ollama. That’s handy for quick tests or basic integrations without needing a graphical interface. For example:

    First conversation with DeepSeek R1 in the terminal, showing the empty reasoning tags and the model's greeting

    Type /bye to end the session

    The /bye command to close the Ollama chat session and return to the command line

    Check the Downloaded Models:

    Once it’s downloaded, you can confirm the model is available on your system with:

    ollama list
    ollama list output showing the installed deepseek-r1 model, its ID and its 4.7 GB size

    Step 4: Install Docker

    To deploy Open WebUI and the other containers we need, let’s first make sure Docker is installed on your server. If you already have it, skip ahead to the next step. If not, check our dedicated post for a more detailed walkthrough: How to Install Docker and Docker Compose on Linux: Step-by-Step Guide.

    Download and Install Docker:

    curl -sSL https://get.docker.com | sh

    Add Your User to the Docker Group:

    To avoid typing sudo on every Docker command, add your user to the docker group:

    sudo usermod -aG docker $USER 
    newgrp docker

    A note on the Open WebUI license. It is worth knowing about, because it has changed: Open WebUI is no longer distributed under BSD-3 but under a license of its own, the “Open WebUI License”, which is not OSI-approved. For personal use nothing changes, but it does include one specific clause: you may not remove or replace the “Open WebUI” branding on deployments serving more than 50 users in 30 days, unless you have explicit permission or an enterprise license. Ollama and the model itself remain entirely free; the caveat applies only to the interface.

    Step 5: Deploy Open WebUI with Docker

    Run the Open WebUI Container:

    docker run -d \
      -p 8080:8080 \
      -e OLLAMA_BASE_URL=http://192.168.101.215:11434 \
      -v open-webui:/app/backend/data \
      --name open-webui \
      --restart always \
      ghcr.io/open-webui/open-webui:main
    

    Remember to replace OLLAMA_BASE_URL=http://192.168.101.215:11434 with your own IP

    Check the Container:

    docker ps
    docker ps output with the Open WebUI container in the healthy state and port 8080 published

    Step 6: Access Open WebUI

    Open Your Browser:

    Go to http://192.168.101.215:8080 (replace it with your local IP).

    Open WebUI welcome screen for creating the administrator account with name, email and password

    Create your account and log in

    Select the Model:

    Open WebUI model selector expanded, with deepseek-r1 marked as the active model

    In the Open WebUI interface, pick DeepSeek-R1 from the dropdown menu and start chatting with it.

    First conversation with DeepSeek R1 from the Open WebUI web interface in the browser

    Before You Expose Anything: the Ollama API Has No Authentication

    This has to be said before the next step, because it changes how you should approach it: the Ollama API has no authentication of any kind. Anyone who can reach port 11434 can use your model, pull down others, delete the ones you have and burn through your hardware. There is no username or password in the picture: if the port is reachable, the service belongs to whoever finds it.

    This is not theoretical. In January 2026 hundreds of thousands of Ollama servers were counted reachable from the internet, and CVE-2026-7482, nicknamed “Bleeding Llama” and scored 9.1 out of 10, let an unauthenticated attacker read the memory of the process: conversations, system prompts, environment variables and API keys for other services. It was fixed in version 0.17.1, so the first thing to do is check that you are not running anything older:

    ollama --version

    The three rules, in order of importance:

    Step 7: Take DeepSeek AI to the World: Secure Remote Access

    If you want your DeepSeek AI model reachable from anywhere, there are several setups we’ve covered in other tutorials. They all give you secure remote access, and they let you tailor the deployment to what you need.

    1. Use the Tor Network for Private Access

    Want to keep your model reachable only through an anonymous, secure environment? The Tor network is ideal for that. Set up your internal services on Tor by following our guide:
    Global, Private Access: Set Up Your Internal Services on the Tor Network

    2. Connect Your Model with a Cloudflare Tunnel

    If you’re after a free, secure way to expose your model to the internet without opening ports on your router, Cloudflare tunnels are an excellent option. Here’s how to set them up:
    Connect Your Internal Services to the Outside World Without Opening Ports: How to Use a Cloudflare Tunnel (Free!)

    3. Set Up Nginx Proxy Manager

    For a more advanced solution, you can use Nginx Proxy Manager. This reverse proxy lets you manage access to your model through a graphical interface, which simplifies SSL certificates and custom ports. Follow our guide to install it:
    How to Install Nginx Proxy Manager in a Docker Container: Complete Guide

    4. Running It in a Virtualized Environment with Proxmox

    If you’re just trying DeepSeek AI out as a hobby or in a learning environment, I’d recommend Proxmox VE. It’s ideal for creating and managing containers or virtual machines, keeping your model isolated in a safe environment. These tutorials walk you through setting it up from scratch:

    Making your model reachable from anywhere doesn’t just make your setup more versatile, it also opens the door to experimenting with more advanced configurations.

    For more detail on each approach, take a look at the linked tutorials and go with whichever one lines up best with your goals. 🚀


    Conclusion

    With this guide you’ve learned how to self-host the DeepSeek-R1 model on your server, setting it up step by step with Ollama and Open WebUI. This setup lets you explore what an advanced AI model can do while keeping full control over your data and tailoring the deployment to your needs.

    And thanks to the MIT license, you’re free to use this model in commercial or personal projects, which opens up no end of possibilities:

    Don’t forget that you can download and manage several models from the Ollama library and combine their strengths as your projects require. Use DeepSeek-R1 for reasoning tasks, for instance, and pair it with models like Llama 3 or Phi 3 to cover other areas of your solution.

    And this is only the beginning. Having full control over models like DeepSeek AI puts you in a great position to lead AI innovation projects. There’s no limit to what you can build!

    Questions or suggestions? Leave them in the comments and I’ll be glad to help! 🚀

    If you want to go a step further and interact with AI models from WhatsApp, Telegram or Slack, check out how to install OpenClaw, a personal AI assistant you can connect to DeepSeek as a local backend.

    Leave a Reply

    Your email address will not be published. Required fields are marked *