惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

美团技术团队
D
DataBreaches.Net
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
N
Netflix TechBlog - Medium
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
C
Check Point Blog
腾讯CDC
Stack Overflow Blog
Stack Overflow Blog
V
Visual Studio Blog
IT之家
IT之家
月光博客
月光博客
U
Unit 42
K
Kaspersky official blog
T
Threatpost
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
GbyAI
GbyAI
P
Proofpoint News Feed
Last Week in AI
Last Week in AI
云风的 BLOG
云风的 BLOG
酷 壳 – CoolShell
酷 壳 – CoolShell
I
InfoQ
Engineering at Meta
Engineering at Meta
Recorded Future
Recorded Future
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security @ Cisco Blogs
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
Security Archives - TechRepublic
Security Archives - TechRepublic
Webroot Blog
Webroot Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Hacker News - Newest:
Hacker News - Newest: "LLM"
S
Schneier on Security
S
Secure Thoughts
The Register - Security
The Register - Security
B
Blog RSS Feed
The Last Watchdog
The Last Watchdog
P
Palo Alto Networks Blog
爱范儿
爱范儿
B
Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
N
News and Events Feed by Topic
阮一峰的网络日志
阮一峰的网络日志
L
LINUX DO - 热门话题
C
Cisco Blogs
Spread Privacy
Spread Privacy
F
Full Disclosure
博客园 - 聂微东
T
The Blog of Author Tim Ferriss

博客园 - 网无忌

关于Docker Desktop的常用配置 渐变文字的小技巧 机器学习基础 pydantic中关于属性必填和选填的区别 CentOS的常用命令 密码中含有特殊字符造成mysqldump备份失败的一个小教训 通过模拟Cron执行环境来复现脚本执行失败的过程 查看mysql当前的执行任务,并关闭其中的指定任务 配置WSL2实现与宿主机的网络互通 超简单的 rsync 命令,实现文件的增量同步 十九年白驹过隙,老园子聊发少年狂 Linux中安装anaconda 矢量数据库Chromadb的入门信息 在wsl中部署puppeteer的相关笔记 向量数据库横比 整理了一下目前各Linux发行版的清单 盘点各领域的包管理器 使用 jstat 命令查看 JVM 的GC信息 记录一个在js环境生成随机(伪造)数据的小插件,方便生成调试数据 使用Puppeter实现的全屏网页截图的小工具 开启 mysql 的 general_log
本地安装Dify
网无忌 · 2026-06-18 · via 博客园 - 网无忌

一、提前准备

  1. 准备好 WSL 虚拟机,比如:Ubuntu
  2. 准备好 DockerDesktop

二、安装Dify

  1. 获取Dify文件

在WSL中执行:

#在用户目录创建dify目录
mkdir -p ~/dify && cd ~/dify

#使用Git拉取Dify的最新版本
git clone https://github.com/langgenius/dify.git
#国内镜像:https://gitcode.com/GitHub_Trending/di/dify.git

#或者在windwos中手动下载指定发行版的zip压缩包:
#比如:https://gitcode.com/GitHub_Trending/di/dify/tags/1.14.2
#下载后移动到WSL用户目录,再解压:
#unzip dify-1.14.2.zip
  1. 配置Dify
#切换到dify的docker目录
cd dify-1.14.2/docker

#基于默认配置创建本地配置文件
cp .env.example .env

修改主要配置项:

  • EXPOSE_NGINX_PORT=80 # 服务端口
  • APP_SECRET_KEY= # 建议设置复杂密码
  • DB_PASSWORD= # 数据库密码
  • REDIS_PASSWORD= # Redis密码
  • PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple(或 https://mirrors.aliyun.com/pypi/simple
  • CELERY_BROKER_URL=redis://:<实际的Redis密码>@redis:6379/1
  1. 启动容器
# 首次启动拉取镜像并创建容器(后台运行)
docker compose up -d

# 查看启动进度
docker compose logs -f

# 查看运行状态
docker compose ps

# 停止服务并清除容器及数据
docker compose down

# 启动服务
docker compose start

# 停止服务
docker compose stop

#重启服务
docker compose restart

首次启动需要下载约 10+ 个镜像,耗时 5-15 分钟(取决于网络)。