Files
pangolin/deploy/bootstrap/bootstrap.env.example
T
wangjia 1d76c00f66
ci-pangolin / Lint — shellcheck (push) Has been cancelled
ci-pangolin / OpenAPI Sync Check (push) Has been cancelled
ci-pangolin / Redline Scan — 脱敏 (UI 文案) (push) Has been cancelled
ci-pangolin / Flutter — analyze + test (push) Has been cancelled
chore(bootstrap): 监控阈值降至 80% + 关闭正常心跳(仅异常告警)
CPU/MEM/DISK 阈值 90/90/85 → 统一 80;MONITOR_SEND_OK_PULSE true → false
(默认只在异常时推送,正常不打扰)。同步 init.sh 默认值与 bootstrap.env.example。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-18 07:17:22 +08:00

38 lines
2.1 KiB
Bash

# Pangolin 节点初始化配置(被 init.sh 读取)。
# 用法:cp bootstrap.env.example bootstrap.env && 编辑 → 随 init.sh 一起拷到机器上。
# 所有项都有合理默认;留空即用默认。敏感值(Telegram token)不要提交进 git。
# ── SSH 加固 ────────────────────────────────────────────────────────────────
SSH_PORT=22
# 是否禁用密码登录(仅当 root 已有 authorized_keys 时才会真正生效,否则自动跳过以防锁死)
DISABLE_PASSWORD_AUTH=true
# ── 系统 ────────────────────────────────────────────────────────────────────
TIMEZONE=Asia/Shanghai
# 目标 swap 总量(MB)。当前 swap 不足且无 /swapfile 时,创建 /swapfile 补足。0=不管。
SWAP_SIZE_MB=2048
# ── 防火墙(放行端口)───────────────────────────────────────────────────────
# 数据面:REALITY(443/tcp)+ Hysteria2(443/udp)。多个 tcp/udp 端口用空格分隔。
FW_ALLOW_TCP="443"
FW_ALLOW_UDP="443"
# ── 监控(Telegram)──────────────────────────────────────────────────────────
# 留空则跳过监控安装。token 找 @BotFather 建;chat_id 找 @userinfobot 取。
TELEGRAM_BOT_TOKEN=""
TELEGRAM_CHAT_ID=""
# 本节点在告警里显示的名字
NODE_NAME="racknerd-la"
# 上报间隔(分钟)
MONITOR_INTERVAL_MIN=5
# 阈值(百分比);超过即告警
CPU_ALERT_PCT=80
MEM_ALERT_PCT=80
DISK_ALERT_PCT=80
# 要监控存活的 systemd 单元(空格分隔;不存在的会被忽略)
MONITOR_UNITS="sing-box pangolin-agent"
# 出网连通探测目标
MONITOR_NET_PROBE="https://www.cloudflare.com/cdn-cgi/trace"
# 周期性"健康"心跳是否也推送(true=每次都报,false=仅异常时报)
MONITOR_SEND_OK_PULSE=false