mateclaw/.env.example
2026-04-17 19:41:03 +08:00

39 lines
1.5 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.

# MateClaw 环境变量配置
# 复制此文件为 .env 并填写实际值cp .env.example .env
#
# ⚠️ 所有标注「必填」的项若没配置,`docker compose up` 会直接失败退出,避免把默认/示例值带到生产环境。
# ==================== LLM / 搜索 ====================
# 阿里云 DashScope API Key必填
# 申请地址https://dashscope.aliyun.com/
DASHSCOPE_API_KEY=your-dashscope-api-key-here
# Serper 网页搜索 API Key可选用于 WebSearch 工具)
# 申请地址https://serper.dev/
SERPER_API_KEY=
# ==================== 数据库Docker 模式必填) ====================
DB_HOST=localhost
DB_PORT=3306
DB_NAME=mateclaw
DB_USERNAME=mateclaw
# ⚠️ 必填且请改成强密码(至少 16 位,含大小写+数字+符号)。
# docker-compose.yml 会通过 ${DB_PASSWORD:?} 强制要求此项。
DB_PASSWORD=change-me-strong-user-password
# ⚠️ MySQL root 账号密码,仅用于容器内初始化。请改成与 DB_PASSWORD 不同的强密码。
DB_ROOT_PASSWORD=change-me-strong-root-password
# ==================== 安全(强烈建议覆盖) ====================
# JWT 签名密钥。若留空,服务器会用内置默认值并在启动日志里 WARN。
# 生产部署必须设置,至少 32 位随机字符串openssl rand -base64 48
JWT_SECRET=
# CORS 白名单(逗号分隔,如 https://mateclaw.example.com,https://admin.example.com
# 若留空,服务器会允许所有 origin 并在启动日志里 WARN。生产部署务必设置。
MATECLAW_CORS_ALLOWED_ORIGINS=