验证
docker exec -it open-webui curl "http://searxng:8080/search?q=hello"docker-compose.yml
services:
searxng:
image: searxng/searxng:2026.6.30-d115c61a7
container_name: searxng
volumes:
- ./data/etc:/etc/searxng:rw
- ./data/cache:/var/cache/searxng:rw
networks:
- ghost_net
dns: # <-- ADD THIS BLOCK
- 1.1.1.1 # Cloudflare DNS
- 8.8.8.8 # Google DNS
ports:["0.0.0.0:60001:8080"] # 单独私有化web入口
restart: unless-stopped
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "1"
cap_drop:
- ALL
cap_add:
- CHOWN
- SETGID
- SETUID
- DAC_OVERRIDE
deploy:
resources:
limits:
memory: 512M
networks:
ghost_net:
external: truesetttings.yml
无指定user运行时,如果setting文件权限还报错,则需要修改文件权限
sudo chown 1001:1001 /data/etc/settings.yml# 继承机制
use_default_settings:
engines:
remove:
- wikidata # arm服务器IP被屏蔽了,所以移除
- ahmia
- torch
- aol # arm服务器IP被屏蔽了
- karmasearch # arm服务器IP被屏蔽了
- duckduckgo # <-- 新增:这家机房IP秒弹验证码,踢掉
- startpage # <-- 新增:这家机房IP秒弹验证码,踢掉
server:
secret_key: "0be733ce432abc1e7b4a17341aa8b6b7a06b1af2065b9d2036f6728a321add98" # 禁止使用默认key, openssl rand -hex 32
search:
formats:
- html
- json
# 添加以下配置,彻底关闭实名/IP请求头和机器人检查,专为大模型联网设计
enabled_plugins:
- 'Tracker Extractor plugin'
botdetection:
ip_limit:
link_token: false
block_ip: false # 关闭 IP 限制接入open-webui
环境变量
# --- 联网搜索 ---
- ENABLE_RAG_WEB_SEARCH=True
- RAG_WEB_SEARCH_ENGINE=searxng
- SEARXNG_QUERY_URL=http://searxng:8080/search?q=<query>
- RAG_WEB_SEARCH_RESULT_COUNT=3
- RAG_WEB_SEARCH_CONCURRENT_REQUESTS=10问题修复
403 Forbidden(SearXNG 拒绝 JSON)
sudo sed -i '/^[[:space:]]\+formats:/a \ - json' data/etc/settings.yml openwebui 出现这个日志表示搜索链路通了 Fetching pages: 100%|##########| 8/8 [00:06<00:00, 1.20it/s]解决嵌入模型 NoneType 错误(RAG 功能依赖)
具体报错 embedding_function.encode() AttributeError: 'NoneType' object has no attribute 'encode' open-webui 设置 → 嵌入 选择一个可用的嵌入模型(推荐 bge-small-en-v1.5 或 all-MiniLM-L6-v2) 勾选 绕过嵌入和检索 设置完,重建索引