学习 Dify 遇到的一些问题 本地 Docker 部署 Dify 踩的四个坑记录一下。一、80 端口被占用容器起不来docker compose up -d报错Error response from daemon: ports are not available: exposing port TCP 0.0.0.0:80 - 127.0.0.1:0: listen tcp 0.0.0.0:80: bind: An attempt was made to access a socket in a way forbidden by its access permissions.Windows 的 80 端口被系统服务占了Docker 绑不上。解决改.env里的宿主机映射端口# 改前 EXPOSE_NGINX_PORT80 EXPOSE_NGINX_SSL_PORT443 # 改后 EXPOSE_NGINX_PORT8080 EXPOSE_NGINX_SSL_PORT8443容器内部 Nginx 还是 80 不用动映射自动变成8080:80。改完docker compose up -d访问http://localhost:8080。注意通过http://localhost/signin进入 dify默认请求 80 端口要改为http://localhost:8080/signin二、管理员账号未知用了别人分享的文件夹启动后管理员已被创建/install页面进不去。解决删掉整个文件夹GitHub 重新 clone重新docker compose up -d就能正常创建管理员了。本质是 PostgreSQL 数据卷里存了别人的账号信息。三、工作流卡在同步数据1.16.1 版本 bug工作流界面一直转圈进不去。解决修改docker-compose.yml镜像标签image:langgenius/dify-api:1.14.2image:langgenius/dify-web:1.14.2重启dockercompose pulldockercompose up-d缺点失去 v1.16 新 Agent 沙箱功能优点工作流秒加载、无同步卡死。四、代码节点报沙箱网络错误重点代码节点 Test Run 报错Failed to execute code, which is likely a network issue, please check if the sandbox service is running. ( Error: [Errno -3] Temporary failure in name resolution )原因docker/volumes/sandbox/conf/目录下缺少config.yaml。Docker 镜像不会自动生成这个文件sandbox 找不到配置就默认禁用网络。解决从dify-sandbox 源码拿到配置创建docker/volumes/sandbox/conf/config.yamlapp:port:8194debug:Falsekey:dify-sandboxmax_workers:4max_requests:50worker_timeout:15python_path:/opt/python/bin/python3enable_network:Trueenable_preload:Falselog_path:./logsallowed_syscalls:proxy:socks5:http:http://ssrf_proxy:3128https:http://ssrf_proxy:3128no_proxy:allowed_env_vars:[]proxy 必须填ssrf_proxy:3128sandbox 在 internal 网络里没有直接外网出口流量必须走 Squid 代理。然后重建容器restart 不会重读 .envdockercompose up-dsandbox验证dockercomposeexecsandboxenv|findstr ENABLE_NETWORK# ENABLE_NETWORKtrue参考CSDN - Dify 沙箱网络问题

相关新闻

最新新闻

SerenityOS 命令行选项解析指南:getopt 与 getopt_long 用法、返回值与底层实现

SerenityOS 命令行选项解析指南:getopt 与 getopt_long 用法、返回值与底层实现

SerenityOS 命令行选项解析指南:getopt 与 getopt_long 用法、返回值与底层实现 【免费下载链接】serenity The Serenity Operating System 🐞 项目地址: https://gitcode.com/GitHub_Trending/se/serenity 导读 本文以 getopt(3) 手册 为核心&a…

2026/9/26 23:24:47
轻量服务器还是ECS?大促云服务器选购与避坑实战指南

轻量服务器还是ECS?大促云服务器选购与避坑实战指南

每年大促节点,群里永远有人在问同一个问题:“38元的轻量服务器到底怎么抢?为什么我每次点进去都是已售罄?68元直购和99元的ECS我到底选哪个?”作为一个常年帮团队和自己采购云服务器的老用户,我太清楚这种纠…

2026/9/26 18:48:15
为 AI 代理的 Review 动作编写 Cedar 审批门控策略:review-agent-governance 策略编写实战指南

为 AI 代理的 Review 动作编写 Cedar 审批门控策略:review-agent-governance 策略编写实战指南

为 AI 代理的 Review 动作编写 Cedar 审批门控策略:review-agent-governance 策略编写实战指南 【免费下载链接】agents Multi-harness agentic plugin marketplace for Claude Code, Codex, Cursor, OpenCode, GitHub Copilot, and Google Antigravity 项目地址:…

2026/9/26 3:42:08
PaddleOCR 手写数学公式识别算法 CAN 实战指南:Counting-Aware Network 训练、评估与推理部署

PaddleOCR 手写数学公式识别算法 CAN 实战指南:Counting-Aware Network 训练、评估与推理部署

PaddleOCR 手写数学公式识别算法 CAN 实战指南:Counting-Aware Network 训练、评估与推理部署 【免费下载链接】PaddleOCR Turn any PDF or image document into structured data for your AI. A powerful, lightweight OCR toolkit that bridges the gap between i…

2026/9/26 11:37:29
Spring源码解析:构造器注入的类型转换与候选匹配机制

Spring源码解析:构造器注入的类型转换与候选匹配机制

/* MD / 富文本中的 .toc(含博客园搬家等嵌套结构);.toc-box 在侧栏,不受影响 */#content_views .toc,/* 编辑器常在目录前后插入空 p(:empty 仍占 20px),一并去掉避免顶空隙 */#content_views.markdown_views > p:empty:has(+ .toc),#content_views.markdown_views …

2026/9/26 4:08:27
openai-agents-python 多模型接入指南:深入解析 AnyLLMModel 适配层与 any-llm 路由

openai-agents-python 多模型接入指南:深入解析 AnyLLMModel 适配层与 any-llm 路由

openai-agents-python 多模型接入指南:深入解析 AnyLLMModel 适配层与 any-llm 路由 【免费下载链接】openai-agents-python A lightweight, powerful framework for multi-agent workflows 项目地址: https://gitcode.com/GitHub_Trending/op/openai-agents-pyth…

2026/9/26 21:11:24

日新闻

周新闻