# unifi-protect-backup接入 Server酱：为 UniFi Protect 备份添加微信通知（2026 教程）

> 通过内置 Apprise 支持，为 unifi-protect-backup 配置 Server酱通知，实现 UniFi Protect 录像备份通知推送到微信。

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

# unifi-protect-backup + Server酱：推送 UniFi Protect 备份通知到微信

> 效果：配置后，unifi-protect-backup 可通过 Server酱 推送通知到微信。

## 前置条件

- 获取 Server酱 SendKey（[30 秒获取教程](https://sct.ftqq.com/docs/getting-started/sendkey/)）
- 已部署 unifi-protect-backup 运行环境

## 配置步骤

在 unifi-protect-backup 的启动参数中添加 Apprise 通知配置：

```bash
--apprise-notifiers schan://你的SENDKEY
```

`schan://` 是 Apprise 内置的 Server酱专用协议，直接对接 Server酱Turbo（SCT 开头的 SendKey 可直接使用），底层调用 `https://sctapi.ftqq.com/你的SENDKEY.send`。

如果你希望通过环境变量传入（具体环境变量名以应用内实际显示为准），将上述参数值配置到对应的环境变量中即可。

配置完成后，unifi-protect-backup 将通过 Apprise 调用 Server酱 API 推送通知到微信。如需推送到企业微信、钉钉群或飞书群，请参考[通道配置](https://sct.ftqq.com/docs/getting-started/channels/)。

## 完整示例

使用命令行自测 Server酱连通性：

```bash
pip install apprise && apprise -t "测试标题" -b "测试正文" "schan://你的SENDKEY"
```

启动 unifi-protect-backup 并配置 Server酱通知：

```bash
unifi-protect-backup --apprise-notifiers schan://你的SENDKEY
```

## 常见问题

**额度怎么算？**

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

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

先用命令行 `apprise -t "测试" -b "正文" "schan://你的SENDKEY"` 自测，确认网络和 SendKey 正常。如仍无法解决见[常见问题与排查](https://sct.ftqq.com/docs/getting-started/faq/)。

**频率限制是多少？**

每分钟上限 50 条。

**Server酱³（sctp 开头）的 SendKey 怎么用？**

Apprise 暂无 sctp 专用插件，可使用通用 `json://` 插件直连 push.ft07.com API，具体接法参考站内 /integrations/apprise/。

## 相关集成

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


## 懒人方案：把这段话复制给你的 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 条结果摘要即可，批量任务合并成一条，不要每步都推。
请根据我当前的项目和场景直接写好代码/配置并验证。
```

