# Proxmox VE接入 Server酱：备份等事件推送到微信（2026 教程）

> 通过 Proxmox VE 8.3+ 内置 Webhook 通知系统，将 PVE 备份等告警事件实时推送到微信，附 Handlebars 模板配置。

- 网页版：https://sct.ftqq.com/docs/integrations/proxmox/
- 更新日期：2026-07-17

# Proxmox VE + Server酱：备份等事件推送到微信

> 效果：Proxmox VE 产生备份失败等事件时，自动推送到微信。

## 前置条件

- 获取 Server酱 SendKey：登录 sct.ftqq.com，在「SendKey」页面复制（[30 秒获取教程](https://sct.ftqq.com/docs/getting-started/sendkey/)）。推送到企业微信/钉钉/飞书等通道见[通道对比](https://sct.ftqq.com/docs/getting-started/channels/)。
- Proxmox VE 8.3 或更高版本（内置通知系统支持 Webhook target）。8.3 以下旧版需在备份任务里用 hook script 跑 curl。

## 配置步骤

**1. 添加 Webhook target**

进入 Datacenter → Notifications → 添加 Webhook target。

直接填入以下配置：

- Method：`POST`
- URL：`https://sctapi.ftqq.com/你的SENDKEY.send`

（如果是 Server酱³ SendKey，URL 改为 `https://你的UID.push.ft07.com/send/你的SENDKEY.send`，UID 取自 sctp 后面的数字）

**2. 配置 Body 模板**

在 Webhook target 的 Body 中，使用 Handlebars 模板将 PVE 的变量映射到 Server酱的 `title` 和 `desp` 参数：

```json
{
  "title": "{{ title }}",
  "desp": "{{ message }}"
}
```

**3. 绑定通知匹配规则**

添加 target 后，在 Datacenter → Notifications 的 Notification Matchers 中配置匹配规则，选择需要推送的事件（如仅匹配备份失败），并将目标指向刚创建的 Webhook target。

## 完整示例

对于 8.3 以下旧版 PVE，可在备份任务的 hook script 中使用 curl 发送通知：

```bash
curl -X POST "https://sctapi.ftqq.com/你的SENDKEY.send" \
  --data-urlencode "title=PVE备份状态" \
  --data-urlencode "desp=虚拟机备份任务执行完毕"
```

## 常见问题

**Server酱的发送额度是多少？**

免费版每日可发送 5 条，每分钟上限 50 条。订阅会员目前特价最低 3 元/月，一天最多可发 1000 条（[价格详情](https://sct.ftqq.com/subscribe)）。

**配置后没收到消息？**

检查 SendKey 是否正确，以及 PVE 的 Notification Matcher 是否正确匹配了对应事件并指向该 Webhook target。也可参考[常见问题与排查](https://sct.ftqq.com/docs/getting-started/faq/)。

**触发频率过高被限制怎么办？**

Server酱 API 有每分钟 50 次的频率限制。请在 PVE 的 Matcher 中过滤掉不需要的常规事件，仅保留关键告警（如仅备份失败）。

## 相关集成

- [/integrations/python/ —— Python 脚本推送](https://sct.ftqq.com/docs/integrations/python/)
- [/integrations/uptime-kuma/ —— Uptime Kuma 宕机告警](https://sct.ftqq.com/docs/integrations/uptime-kuma/)
- [/integrations/qinglong/ —— 青龙面板任务通知](https://sct.ftqq.com/docs/integrations/qinglong/)


## 懒人方案：把这段话复制给你的 AI 助手

把下面这段文字原样粘贴给 Claude Code、Cursor 或任何 AI 编程助手，它就会替你完成 Server酱 的接入：

```text
请帮我把 Server酱 微信通知接入到我当前的项目/工具中：
1. API：POST https://sctapi.ftqq.com/{SendKey}.send，参数 title（必填，不能含换行）、desp（正文，支持 Markdown，可选）；成功时返回 JSON 的 code 为 0。
2. 如果我的 SendKey 以 sctp 开头，则改用 https://{uid}.push.ft07.com/send/{SendKey}.send，uid 是 SendKey 中 sctp 与 t 之间的数字。
3. SendKey 从环境变量 SERVERCHAN_SENDKEY 读取；如果没有，提醒我到 https://sct.ftqq.com 免费获取（每天 5 条额度）。
4. 安全要求：不要把 SendKey 硬编码进代码、不要打印到日志、不要提交到 git。
5. 频率约定：任务结束发 1 条结果摘要即可，批量任务合并成一条，不要每步都推。
请根据我当前的项目和场景直接写好代码/配置并验证。
```

