Files
hermes/hermes-docker.env.example
2026-04-13 14:56:51 +08:00

55 lines
2.7 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# =============================================================================
# Hermes 本地 Docker 配置(可见、可改)
# 用法:复制为 hermes-docker.env 后编辑start-docker-cn.sh 会自动读取
# cp hermes-docker.env.example hermes-docker.env
# =============================================================================
# --- Hermes HTTP API给 Open WebUI / curl 使用)---
API_PORT=8642
HERMES_API_KEY=change-me-local-dev
# --- LLM 推理必填其一否则对话报错No inference provider configured---
# start-docker-cn.sh 会把下面非空变量同步到 ~/.hermes/.env必须Hermes 启动时用该文件
# override Docker 注入的环境变量,只写在 hermes-docker.env 而不同步时会出现 401
# OpenAI: https://platform.openai.com/api-keys
# OPENAI_API_KEY=sk-proj-...
# OpenRouter: https://openrouter.ai/keys
# OPENROUTER_API_KEY=sk-or-v1-...
# 其他见 hermes-agent/.env.example
# --- Open WebUI浏览器聊天界面---
WEBUI_PORT=3000
ENABLE_WEBUI=true
# macOS 启动脚本完成后是否自动打开浏览器Linux 忽略)
OPEN_BROWSER=true
# 会话加密用,本地可保留;若暴露到公网请改成随机长字符串
WEBUI_SECRET_KEY=dev-change-me-in-production
# Open WebUI 镜像(国内拉不动时可换镜像代理前缀,见脚本注释)
OPEN_WEBUI_IMAGE=ghcr.io/open-webui/open-webui:main
# --- 数据目录(宿主机)---
# 留空则使用 ~/.hermes
HERMES_DATA_DIR=
# Open WebUI 持久化数据目录(留空则使用项目下 open-webui-data/
OPEN_WEBUI_DATA_DIR=
# --- 构建镜像用(一般不用改)---
# BASE_IMAGE=docker.m.daocloud.io/library/debian:13.4
# APT_MIRROR_CANDIDATES=mirrors.aliyun.com,mirrors.ustc.edu.cn,mirrors.huaweicloud.com,mirrors.tuna.tsinghua.edu.cn
# =============================================================================
# 看不到 Web 界面时排查:
# 1) 地址必须是 http://127.0.0.1:与 WEBUI_PORT 一致(不要用 https://
# 2) 首次启动等 13 分钟再刷新;日志: docker logs -f hermes-open-webui
# 3) 自检: curl -sS -o /dev/null -w "%{http_code}\n" http://127.0.0.1:3000/
# 返回 200 说明服务已好,多半是浏览器缓存或输错端口
# 4) 端口被占用可改 WEBUI_PORT再执行 ./start-docker-cn.sh
#
# 浏览器控制台若出现:
# - Manifest / tiptap 警告:多为 Open WebUI 前端已知提示,可忽略
# - /ollama/api/version 500已用 ENABLE_OLLAMA_API=false若仍有可清浏览器缓存或删 open-webui-data 后重建容器
# - Hermes 日志 401 Missing Authentication在 ~/.hermes/.env 或本文件填写 OPENROUTER_API_KEY勿留空行
# =============================================================================