Files
HookPilot/deploy/hookpilot.env.example
2026-09-27 20:09:10 +08:00

39 lines
1.3 KiB
Bash
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.
# HookPilot 环境配置,复制到 /etc/hookpilot/hookpilot.env 后按需修改
# 修改后执行:sudo systemctl restart hookpilot
# 监听地址。由反向代理对外提供 HTTPS,服务本身只监听本机
HOOKPILOT_HOST=127.0.0.1
HOOKPILOT_PORT=8787
# 数据目录:SQLite 数据库、脚本文件、任务临时目录、默认工作目录
HOOKPILOT_DATA_DIR=/var/lib/hookpilot
# 前端构建产物目录(默认为程序目录下的 web/dist)
# HOOKPILOT_WEB_DIR=/opt/hookpilot/web/dist
# 首次启动时创建的管理员。不设置密码时会随机生成并打印到日志(journalctl -u hookpilot)
HOOKPILOT_ADMIN_USER=admin
# HOOKPILOT_ADMIN_PASSWORD=请替换为强密码
# 信任的反向代理:loopback(默认,代理在本机)、true、false,或逗号分隔的 IP/网段
HOOKPILOT_TRUST_PROXY=loopback
# 登录 Cookie 是否带 Secure:auto(按请求协议判断)、true、false
HOOKPILOT_COOKIE_SECURE=auto
# 登录会话有效期(小时)
HOOKPILOT_SESSION_TTL_HOURS=168
# 请求体上限(字节),默认 1 MiB
HOOKPILOT_BODY_LIMIT=1048576
# 脚本执行使用的 Bash 与 PATH
HOOKPILOT_BASH=/bin/bash
HOOKPILOT_EXEC_PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# 日志级别:fatal / error / warn / info / debug
HOOKPILOT_LOG_LEVEL=info
# 脚本执行时区(可选)
# TZ=Asia/Shanghai