专属域名
文档搜索
轩辕助手
Run助手
邀请有礼
返回顶部
快速返回页面顶部
收起
收起工具栏
轩辕镜像 官方专业版
轩辕镜像
专业版
轩辕镜像 官方专业版
轩辕镜像
专业版
首页个人中心搜索镜像

交易
充值流量我的订单
工具
提交工单镜像收录一键安装
Npm 源Pip 源Homebrew 源
帮助
常见问题轩辕镜像免费版
其他
关于我们网站地图
热门搜索:
ghcr.io/songquanpeng/message-pusher

ghcr.io/songquanpeng/message-pusher:v0.4.1-alpha.1

ghcr.iolinux/amd64v0.4.1-alpha.1大小: 未知更新于 2026年5月23日

消息推送服务

✨ 搭建专属于你的消息推送服务,支持多种消息推送方式,支持 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 配置

登录仓库拉取

通过 Docker 登录认证访问私有仓库

专属域名拉取

无需登录使用专属域名

K8s Containerd

Kubernetes 集群配置 Containerd

K3s

K3s 轻量级 Kubernetes 镜像加速

Dev Containers

VS Code Dev Containers 配置

Podman

Podman 容器引擎配置

Singularity/Apptainer

HPC 科学计算容器配置

其他仓库配置

ghcr、Quay、nvcr 等镜像仓库

Harbor 镜像源配置

Harbor Proxy Repository 对接专属域名

Portainer 镜像源配置

Portainer Registries 加速拉取

Nexus 镜像源配置

Nexus3 Docker Proxy 内网缓存

系统配置

Linux

在 Linux 系统配置镜像服务

Windows/Mac

在 Docker Desktop 配置镜像

MacOS OrbStack

MacOS OrbStack 容器配置

Docker Compose

Docker Compose 项目配置

NAS 设备

群晖

Synology 群晖 NAS 配置

飞牛

飞牛 fnOS 系统配置镜像

绿联

绿联 NAS 系统配置镜像

威联通

QNAP 威联通 NAS 配置

极空间

极空间 NAS 系统配置服务

网络设备

爱快路由

爱快 iKuai 路由系统配置

宝塔面板

在宝塔面板一键配置镜像

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

镜像拉取常见问题

使用与功能问题

配置了专属域名后,docker search 为什么会报错?

docker search 限制

Docker Hub 上有的镜像,为什么在轩辕镜像网站搜不到?

站内搜不到镜像

机器不能直连外网时,怎么用 docker save / load 迁镜像?

离线 save/load

docker pull 拉插件报错(plugin v1+json)怎么办?

插件要用 plugin install

WSL 里 Docker 拉镜像特别慢,怎么排查和优化?

WSL 拉取慢

轩辕镜像安全吗?如何用 digest 校验镜像没被篡改?

安全与 digest

第一次用轩辕镜像拉 Docker 镜像,要怎么登录和配置?

新手拉取配置

轩辕镜像合规吗?轩辕镜像的合规是怎么做的?

镜像合规机制

轩辕镜像支持 docker push 上传本地镜像吗?

不支持 push

错误码与失败问题

docker pull 提示 manifest unknown 怎么办?

manifest unknown

docker pull 提示 no matching manifest 怎么办?

no matching manifest(架构)

镜像已拉取完成,却提示 invalid tar header 或 failed to register layer 怎么办?

invalid tar header(解压)

Docker pull 时 HTTPS / TLS 证书验证失败怎么办?

TLS 证书失败

Docker pull 时 DNS 解析超时或连不上仓库怎么办?

DNS 超时

docker 无法连接轩辕镜像域名怎么办?

域名连通性排查

Docker 拉取出现 410 Gone 怎么办?

410 Gone 排查

出现 402 或「流量用尽」提示怎么办?

402 与流量用尽

Docker 拉取提示 UNAUTHORIZED(401)怎么办?

401 认证失败

遇到 429 Too Many Requests(请求太频繁)怎么办?

429 限流

docker login 提示 Cannot autolaunch D-Bus,还算登录成功吗?

D-Bus 凭证提示

为什么会出现「单层超过 20GB」或 413,无法加速拉取?

413 与超大单层

账号 / 计费 / 权限

轩辕镜像免费版和专业版有什么区别?

免费版与专业版区别

轩辕镜像支持哪些 Docker 镜像仓库?

支持的镜像仓库

镜像拉取失败还会不会扣流量?

失败是否计费

麒麟 V10 / 统信 UOS 提示 KYSEC 权限不够怎么办?

KYSEC 拦截脚本

如何在轩辕镜像申请开具发票?

申请开票

怎么修改轩辕镜像的网站登录和仓库登录密码?

修改登录密码

如何注销轩辕镜像账户?要注意什么?

注销账户

配置与原理类

写了 registry-mirrors,为什么还是走官方或仍然报错?

mirrors 不生效

怎么用 docker tag 去掉镜像名里的轩辕域名前缀?

去掉域名前缀

如何拉取指定 CPU 架构的镜像(如 ARM64、AMD64)?

指定架构拉取

用轩辕镜像拉镜像时快时慢,常见原因有哪些?

拉取速度原因

为什么拉取镜像的 :latest 标签,拿到的往往不是「最新」镜像?

latest 与「最新」

查看全部问题→

用户好评

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

用户头像

oldzhang

运维工程师

Linux服务器

5

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

轩辕镜像
镜像详情
...
ghcr.io/songquanpeng/message-pusher
博客Docker 镜像公告与技术博客
热门查看热门 Docker 镜像推荐
安装一键安装 Docker 并配置镜像源
镜像拉取问题咨询请 提交工单。官方公众号:源码跳动。官方技术交流群:51517718。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
镜像拉取问题咨询请提交工单。官方公众号:源码跳动。官方技术交流群:。轩辕镜像所有镜像均来源于原始仓库,本站不存储、不修改、不传播任何镜像内容。
商务合作:点击复制邮箱
©2024-2026 源码跳动
商务合作:点击复制邮箱Copyright © 2024-2026 杭州源码跳动科技有限公司. All rights reserved.