轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像
交易
充值流量¥7起我的订单
文档
工具
提交工单页面收录
ghcr.io/songquanpeng/message-pusher

ghcr.io/songquanpeng/message-pusher:v0.4.13-alpha

ghcr.iolinux/amd64v0.4.13-alpha大小: 17.87 MB更新于 2026年7月12日
让 AI 帮你使用轩辕镜像? · 展开查看说明 · 点击收起说明

如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。

只需在 AI 对话中先发送下面这句话即可:

请先完整阅读并严格遵守以下文档中的全部规则与要求:

https://xuanyuan.cloud/agents.md

在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。

查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。

消息推送服务

✨ 搭建专属于你的消息推送服务,支持多种消息推送方式,支持 Markdown,仅单可执行文件,开箱即用✨

程序下载 · 部署教程 · 使用教程 · 意见反馈 · 在线演示

[!WARNING] 原域名(msgpusher.com)将于 2026-11-24 下线,请尽快迁移至 [***]

[!WARNING] 从 v0.3 版本升级到 v0.4 版本需要手动迁移数据库,具体方法见迁移数据库。

描述

  1. 多种消息推送方式:
  • 邮件消息,
  • 微信测试号,
  • QQ,
  • 企业微信应用号,
  • 企业***机器人
  • 飞书自建应用
  • 飞书群机器人,
  • 钉钉群机器人,
  • Bark App,
  • WebSocket 客户端(https://github.com/songquanpeng/personal-assistant%EF%BC%8C%E6%8E%A5%E5%85%A5%E6%96%87%E6%A1%A3%EF%BC%89%EF%BC%8C
  • *** 机器人,
  • *** 群机器人,
  • 腾讯云自定义告警:免费的短信提醒,
  • 群组消息:可以将多个推送通道组合成一个群组,然后向群组发送消息,可以实现一次性推送到多个渠道的功能,
  • 自定义消息:可以自定义消息请求 URL 和请求体格式,实现与其他服务的对接,支持众多第三方服务。
  1. 支持自定义 Webhook,反向适配各种调用平台,你可以接入各种已有的系统,而无需修改其代码。
  2. 支持在 Web 端编辑 & 管理发送的消息,新消息发送后 Web 端即时刷新。
  3. 支持异步消息发送。
  4. 支持用户管理,支持多种用户登录注册方式:
  • 登录注册以及通过进行密码重置。
  • https://github.com/settings/applications/new%E3%80%82
  • 微信公众号授权(需要额外部署 https://github.com/songquanpeng/wechat-server%EF%BC%89%E3%80%82
  1. 支持 Markdown。
  2. 支持 Cloudflare Turnstile 用户校验。
  3. 支持在线发布公告,设置关于界面以及页脚。
  4. API 兼容其他消息推送服务,例如 Server 酱。

用途

  1. https://github.com/songquanpeng/blog/blob/486d63e96ef7906a6c767653a20ec2d3278e9a4a/routes/user.js#L27%E3%80%82
  2. 在进行深度学习模型训练时,在每个 epoch 结束后https://github.com/songquanpeng/pytorch-template/blob/b2ba113659056080d3009b3014a67e977e2851bf/solver/solver.py#L223%E4%BB%A5%E6%96%B9%E4%BE%BF%E5%8F%8A%E6%97%B6%E7%9B%91%E6%8E%A7%E3%80%82
  3. 在各种脚本运行结束后发消息提醒,例如https://github.com/songquanpeng/scripts/blob/main/star_watcher.py%EF%BC%8C%E5%8F%88%E4%BE%8B%E5%A6%82https://github.com/songquanpeng/daily-report%EF%BC%8C%E7%94%A8%E6%9D%A5%E9%80%9A%E7%9F%A5%E8%BF%90%E8%A1%8C%E7%BB%93%E6%9E%9C%E3%80%82
  4. 为https://github.com/songquanpeng/personal-assistant#%E4%B8%AA%E4%BA%BA%E5%8A%A9%E7%90%86%E5%BA%94%E7%94%A8%E6%8F%90%E4%BE%9B%E6%B6%88%E6%81%AF%E6%8E%A8%E9%80%81%E5%8A%9F%E8%83%BD%E3%80%82

部署

通过 Docker 部署

部署:docker run -d --restart always --name message-pusher -p 3000:3000 -e TZ=Asia/Shanghai -v /home/ubuntu/data/message-pusher:/data justsong/message-pusher

如果无法拉取,请将 justsong/message-pusher 替换为 ghcr.io/songquanpeng/message-pusher。

更新:docker run --rm -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower -cR

开放的端口号为 3000,之后用 Nginx 配置域名,反代以及 SSL 证书即可,具体参考详细部署教程。

数据将会保存在宿主机的 /home/ubuntu/data/message-pusher 目录(只有一个 SQLite 数据库文件),请确保该目录存在且具有写入权限,或者更改为合适的目录。

Nginx 的参考配置:

server{
server_name push.justsong.cn; # 请根据实际情况修改你的域名

location / {
client_max_body_size 64m;
proxy_http_version 1.1;
proxy_pass http://localhost:3000; # 请根据实际情况修改你的端口
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_cache_bypass $http_upgrade;
proxy_set_header Accept-Encoding gzip;
}
}

之后使用 Let's Encrypt 的 certbot 配置 HTTPS:

# Ubuntu 安装 certbot:
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
# 生成证书 & 修改 Nginx 配置
sudo certbot --nginx
# 根据指示进行操作
# 重启 Nginx
sudo service nginx restart

手动部署

  1. 从 https://github.com/songquanpeng/message-pusher/releases/latest 下载可执行文件或者从源码编译:
git clone https://github.com/songquanpeng/message-pusher.git
cd message-pusher/web
npm install
npm run build
cd ..
go mod download
go build -ldflags "-s -w" -o message-pusher
  1. 运行:
chmod u+x message-pusher
./message-pusher --port 3000 --log-dir ./logs
  1. 访问 http://localhost:3000/ 并登录。初始账号用户名为 root,密码为 123456。

如果服务需要长久运行,只是单纯地启动是不够的,详细部署教程。

注意

如果需要使用 WebSocket 客户端推送功能,则 Nginx 的配置文件中 proxy_read_timeout 和 proxy_send_timeout 务必设置超过 1 分钟。

推荐设置:

proxy_read_timeout 300s;
proxy_send_timeout 300s;
通道类型titledescriptioncontenturltoMarkdown 支持
email✅✅✅❌✅️✅️
test✅✅✅✅️✅️✅
corp_app✅✅✅✅️✅✅
corp❌✅✅✅️✅️✅
lark❌✅✅❌✅✅
lark_app❌✅✅❌️✅✅
ding✅✅✅✅️✅✅
bark✅✅✅✅️❌✅
client✅✅❌❌❌❌
telegram❌❌✅❌✅✅
discord❌❌✅❌✅❌
tencent_alarm❌✅❌❌❌❌

[!NOTE]

  1. 对于大部分通道,description 字段和 content 是不能同时存在的,如果你只需要文字消息,请使用 description 字段,如果你需要发送 Markdown 消息,请使用 content 字段。
  2. 部分通道的 Markdown 支持实际上是通过 URL 跳转到本系统所渲染的消息详情实现的,其他通道的 Markdown 支持受限于具体的通道,支持的语法并不统一。

示例:

Bash 示例

#!/bin/bash

MESSAGE_PUSHER_SERVER="https://push.justsong.cn"
MESSAGE_PUSHER_USERNAME="test"
MESSAGE_PUSHER_TOKEN="666"

function send_message {
# POST Form
curl -s -X POST "$MESSAGE_PUSHER_SERVER/push/$MESSAGE_PUSHER_USERNAME" \
-d "title=$1&description=$2&content=$3&token=$MESSAGE_PUSHER_TOKEN" \
>/dev/null
}

function send_message_with_json {
# POST JSON
curl -s -X POST "$MESSAGE_PUSHER_SERVER/push/$MESSAGE_PUSHER_USERNAME" \
-H 'Content-Type: application/json' \
-d '{"title":"'"$1"'","desp":"'"$2"'", "content":"'"$3"'", "token":"'"$MESSAGE_PUSHER_TOKEN"'"}' \
>/dev/null
}

send_message 'title' 'description' 'content'

另一个版本:

MESSAGE_PUSHER_SERVER="https://push.justsong.cn"
MESSAGE_PUSHER_USERNAME="test"
MESSAGE_PUSHER_TOKEN="666"
MESSAGE_PUSHER_CHANNEL="lark"

sendmsg() {
if [ -t 0 ]; then
local param="$*"
else
local param=$(

Python 示例

import requests

SERVER = "https://push.justsong.cn"
USERNAME = "test"
TOKEN = "666"

def send_message(title, description, content):
# GET 方式
# res = requests.get(f"{SERVER}/push/{USERNAME}?title={title}"
# f"&description={description}&content={content}&token={TOKEN}")

# POST 方式
res = requests.post(f"{SERVER}/push/{USERNAME}", json={
"title": title,
"description": description,
"content": content,
"token": TOKEN
})
res = res.json()
if res["success"]:
return None
else:
return res["message"]

error = send_message("标题", "描述", "**Markdown 内容**")
if error:
print(error)

Go 示例

package main

import (
"bytes"
"encoding/json"
"errors"
"fmt"
"net/http"
"net/url"
)

var serverAddress = "https://push.justsong.cn"
var username = "test"
var token = "666"

type request struct {
Title string `json:"title"`
Description string `json:"description"`
Content string `json:"content"`
URL string `json:"url"`
Channel string `json:"channel"`
Token string `json:"token"`
}

type response struct {
Success bool `json:"success"`
Message string `json:"message"`
}

func SendMessage(title string, description string, content string) error {
req := request{
Title: title,
Description: description,
Content: content,
Token: token,
}
data, err := json.Marshal(req)
if err != nil {
return err
}
resp, err := http.Post(fmt.Sprintf("%s/push/%s", serverAddress, username),
"application/json", bytes.NewBuffer(data))
if err != nil {
return err
}
var res response
err = json.NewDecoder(resp.Body).Decode(&res)
if err != nil {
return err
}
if !res.Success {
return errors.New(res.Message)
}
return nil
}

func SendMessageWithForm(title string, description string, content string) error {
resp, err := http.PostForm(fmt.Sprintf("%s/push/%s", serverAddress, username),
url.Values{"title": {title}, "description": {description}, "content": {content}, "token": {token}})
if err != nil {
return err
}
var res response
err = json.NewDecoder(resp.Body).Decode(&res)
if err != nil {
return err
}
if !res.Success {
return errors.New(res.Message)
}
return nil
}

func main() {
//err := SendMessage("标题", "描述", "**Markdown 内容**")
err := SendMessageWithForm("标题", "描述", "**Markdown 内容**")
if err != nil {
fmt.Println("推送失败:" + err.Error())
} else {
fmt.Println("推送成功!")
}
}

C# 示例

using Newtonsoft.Json;
using RestSharp;

namespace Demo
{
public class Program
{
public static void Main(string[] args)
{
//推送消息
var sendMsg = MessagePusherTool.SendMessage("标题", "描述", "**Markdown 内容**");
if(sendMsg.Success)
{
Console.WriteLine($"推送成功!");
}
else
{
Console.WriteLine($"推送失败:{sendMsg.Message}");
}
}
}

/// <summary>
/// 消息推送工具
/// </summary>
/// <remarks>
/// 开源地址:https://github.com/songquanpeng/message-pusher
/// 支持:Framework、Net3.1、Net5、Net6
/// 引用包:
/// dotnet add package Newtonsoft.Json -v 13.0.2
/// dotnet add package RestSharp -v 108.0.3
/// </remarks>
public class MessagePusherTool
{
/// <summary>
/// ServerAddress
/// </summary>
public const string ServerAddress = "https://push.justsong.cn";

/// <summary>
/// UserName
/// </summary>
public const string UserName = "test";

/// <summary>
/// Token
/// </summary>
public const string Token = "666";

/// <summary>
/// SendMessage
/// </summary>
/// <param name="title">title</param>
/// <param name="description">description</param>
/// <param name="content">content</param>
/// <returns></returns>
public static Response SendMessage(string title, string description, string content)
{
var requestData = new Request()
{
Title = title,
Description = description,
Content = content,
Token = Token,
};
var url = $"{ServerAddress}";
var client = new RestClient(url);
var request = new RestRequest($"push/{UserName}", Method.Post);
request.AddJsonBody(requestData);
var response = client.Execute(request);
var responseData = response.Content;
var responseJson = JsonConvert.DeserializeObject<Response>(responseData);
return responseJson;
}

/// <summary>
/// Request
/// </summary>
public class Request
{
/// <summary>
/// Title
/// </summary>
[JsonProperty(PropertyName = "title")]
public string Title { get; set; }

/// <summary>
/// Description
/// </summary>
[JsonProperty(PropertyName = "description")]
public string Description { get; set; }

/// <summary>
/// Content
/// </summary>
[JsonProperty(PropertyName = "content")]
public string Content { get; set; }

/// <summary>
/// URL
/// </summary>
[JsonProperty(PropertyName = "url")]
public string URL { get; set; }

/// <summary>
/// Channel
/// </summary>
[JsonProperty(PropertyName = "channel")]
public string Channel { get; set; }

/// <summary>
/// Token
/// </summary>
[JsonProperty(PropertyName = "token")]
public string Token { get; set; }
}

/// <summary>
/// Response
/// </summary>
public class Response
{
/// <summary>
/// Success
/// </summary>
[JsonProperty(PropertyName = "success")]
public bool Success { get; set; }

/// <summary>
/// Message
/// </summary>
[JsonProperty(PropertyName = "message")]
public string Message { get; set; }
}
}
}

Node.js 示例

const axios = require('axios');
const querystring = require('querystring');

const MESSAGE_PUSHER_SERVER = 'https://push.justsong.cn'
const MESSAGE_PUSHER_USERNAME = 'test'
const MESSAGE_PUSHER_TOKEN = '666'

async function send_message(title, description, content) {
try {
const postData = querystring.stringify({
title: title,
desp: description,
content: content,
token: MESSAGE_PUSHER_TOKEN,
})

const response = await axios.post(`${MESSAGE_PUSHER_SERVER}/push/${MESSAGE_PUSHER_USERNAME}`, postData, {
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
},
})
if (response.data.success) {
return response.data
}
} catch (error) {
if (error.response) {
return error.response.data
} else {
throw error
}

}
}

send_message('标题', '描述', 'Markdown 内容') .then((response) => { if (response.success) { console.log('推送成功:', response) } else { console.log('推送失败:', response) } }, (error) => { console.log(error.message); })

欢迎 PR 添加更多语言的示例。

## 迁移数据库
此处均以 SQLite 为例,其他数据库请自行修改。我已通过 ChatGPT 将其翻译成对应的 SQL 版本,可参考 `bin` 文件夹中的内容。

### 从 `v0.3` 迁移到 `v0.4`
1. 首先备份数据库文件。
2. 下载最新的 `v0.4` 版本并启动程序,程序会自动迁移数据库表结构。
3. 终止程序。
4. 执行脚本:`./bin/migrate_v3_to_v4.py` 进行数据迁移。
5. 重新启动程序即可。

> [!NOTE] 执行前请确保数据库中 `users` 表的字段顺序与脚本一致,否则会出现数据错乱。

## 其他
1. `v0.3` 之前的版本基于 Node.js,可切换到 [`nodejs`](https://github.com/songquanpeng/message-pusher/tree/nodejs) 分支查看,该版本不再提供功能性更新。
2. `v0.3` 及后续版本基于 Gin Template [`v0.2.1`](https://github.com/songquanpeng/gin-template) 版本开发。
3. 如需自行编译,请先[编译前端](./web/README.md),再编译后端,否则会遇到 `pattern web/build: no matching files found` 问题。

轩辕镜像配置手册

按平台快速找到配置文档

一键安装

一键安装 Docker

Linux Docker 一键安装

AI

用 AI 使用轩辕镜像

agents.md · AI 对话 · 提示词

Docker

登录仓库拉取

登录认证 · 私有仓库

专属域名拉取

免登录 · 高速拉取

Linux

Docker 镜像配置

Windows / Mac

Docker Desktop 配置

MacOS OrbStack

OrbStack 容器

Apple Container

macOS 原生容器

Docker Compose

Compose 项目配置

NAS

群晖

Synology 配置

飞牛

fnOS 镜像配置

绿联

绿联 NAS

威联通

QNAP 配置

极空间

极空间 NAS

Unraid

Unraid NAS

企业仓库

其他仓库

ghcr · Quay · nvcr

Harbor 镜像源

Proxy Repository 对接

Portainer 镜像源

Registries 配置

Nexus 镜像源

Docker Proxy 缓存

开发工具

Dev Containers

VS Code 开发容器

Podman

Podman 配置指南

Singularity / Apptainer

HPC 科学计算容器

Kubernetes

K8s Containerd

Kubernetes · Containerd

K3s

轻量级集群

面板 / 网络

爱快路由

爱快 4.0 · iKuai 镜像加速

宝塔面板

一键配置镜像源

需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单

镜像拉取常见问题

功能

版本功能对比

功能对比 · 版本选择

支持的镜像仓库

Docker Hub · GCR · GHCR

专属域名用法

专属域名 · 开启停用 · 多仓库

新手拉取配置

登录 · 专属域名 · 配置

docker search 限制

专属域名 · Hub 搜索

不支持 push

仅支持 pull · 不支持

拉取速度原因

带宽 · 缓存 · 冷热镜像

错误码

402 与流量用尽

402 · 流量包 · 充值

401 认证失败

401 · docker login

manifest unknown

标签错误 · 镜像不存在

410 Gone 排查

410 · Docker 升级

429 限流

免费版 · 专业版 · 企业版 · 请求频率

其他报错

DNS 超时

DNS 解析 · 网络超时

TLS 证书失败

no matching manifest(架构)

账号

失败是否计费

manifest · blob · 计费

申请开发票(企业 / 个人)

企业 · 个人 · 工单

修改登录密码

网站 · 仓库 · 重置

注销账户

工单 · 数据 · 注销

原理

mirrors 不生效

daemon.json · 重启

去掉域名前缀

docker tag · 重命名

指定架构拉取

ARM64 · AMD64 · 多架构

latest 与「最新」

digest · 版本号 · 标签

查看全部问题→

用户好评

来自真实用户的反馈,见证轩辕镜像的优质服务

用户头像

oldzhang

运维工程师

Linux服务器

5

"Docker访问体验非常流畅,大镜像也能快速完成下载。"

轩辕镜像
镜像详情
...
ghcr.io/songquanpeng/message-pusher
定价查看流量套餐与价格
博客Docker 镜像公告与技术博客
专业版 · 高速稳定拉取镜像
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
50GB 仅 ¥7/年
专业版 · 高速稳定拉取镜像
50GB 仅 ¥7/年
高速镜像下载·在线技术支持·99.95% SLA 保障·付费会员免广告
用户协议·隐私政策·增值电信业务经营许可证:浙B2-20261007·©2024-2026 源码跳动©2024-2026 杭州源码跳动科技有限公司·商务合作:点击复制邮箱