【deepseek】本地部署+webui访问

背景

最近deepseek很火,但是官网的老是被限流使用,还有就是自己也想着玩一玩,于是准备在自己电脑跑一个

直接附上结果地址mydeepseek

准备工作

windows和linux都可

  • 我这里选择linux,ubuntu系统

安装ollama

  • 看下图,直接复制,在自己电脑终端执行,等待即可
  • 等待下载完成

安装模型

  • 如下图,选择自己电脑能带动的模型直接run,就会下载上
  • 然后就可以在终端与deepseek进行交互了
  • 也可以安装多个模型,相同的操作,使用ollama run deepseek-r1:对应的版本即可

终端使用毕竟不方便,于是将其发布出来使用webui进行使用

  • 我这里选择的open-webui
  • 我这里直接根据官方文档使用docker启动docker run -d --network host -v open-webui:/app/backend/data --name open-webui --restart always ghcr.io/open-webui/open-webui:main,当然网络做了自己的更改,没有使用官网的
  • 这样之后你就可以通过http://localhost:8080进行使用了

发布到公网

下面附上nginx配置ssl配置参考文章

conf 复制代码
 server{
    listen 80;
    server_name deepseek.douwen.top;# 我的公网域名
    listen 443 ssl; # managed by Certbot
    server_name deepseek.douwen.top; # 我的公网域名
    ssl_certificate /etc/letsencrypt/live/deepseek.douwen.top/fullchain.pem; # managed by Certbot 我的自签证书
    ssl_certificate_key /etc/letsencrypt/live/deepseek.douwen.top/privkey.pem; # managed by Certbot  我的自签证书私钥
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot 支持ssl的nginx配置
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

    location / {
        proxy_pass http://192.168.3.27:8080;  # 代理到内网服务 open-webui访问地址
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_connect_timeout 30s;  # 连接后端服务器的超时时间
        proxy_send_timeout 60s;     # 发送请求到后端的超时时间
        proxy_read_timeout 120s;    # 等待后端服务器响应的超时时间
    }

}
相关推荐
今夕资源网3 小时前
把 DeepSeek 网页版变成能操作本地项目的 AI Agent:Cuckoo Code 使用指南 GitHub开源
开源·github·deepseek
问简7 小时前
Ubuntu 26 + Windows 10 双系统 NTFS 共享盘笔记
ubuntu
pilifeng19 小时前
Ubuntu Linux 目录结构详解
linux·ubuntu
daemon.qiang1 天前
国内虚拟机对接 Freedesktop:Fork xserver、自建 Runner 与提交 MR 实战
linux·ubuntu·centos·gitlab·开源软件
gs801401 天前
【大模型工程实践】LLM 提效降本指南:基于 Context Caching 与专属 Endpoint 的架构优化
deepseek·大模型缓存
orange....1 天前
VMware 双网卡配置:宿主机切换网络时 Ubuntu 固定 IP 访问方案
网络·ubuntu·网络安全
园长的牧歌1 天前
Ubuntu 打开应用在导航栏没有图标是个齿轮
linux·ubuntu
牢姐与蒯1 天前
Linux进程间通信(一).进程间通信概念&&环境切换(着重强调vscode)
linux·运维·服务器·ubuntu
ss2731 天前
DeepSeek Harness v0.1.6-alpha.2:文件审阅、Office 预览、插件管理,Web 端越来越像 IDE 了
deepseek·dsh
JaydenAI2 天前
[DeepSeek Harness插件内核-15]再谈Cordis的事件总线
ai·agent·plugin·deepseek·harness·cordis