Discord webhook to Ntfy compatability layer
- JavaScript 98.4%
- Dockerfile 1.6%
|
|
||
|---|---|---|
| media | ||
| .dockerignore | ||
| .env.example | ||
| .gitignore | ||
| Dockerfile | ||
| embedutils.js | ||
| index.js | ||
| LICENSE.md | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| renovate.json | ||
Ntfyhook
Ntfyhook is a proxy/compatibility layer between Discord webhooks and Ntfy. It allows users to replace a Discord webhook link with a Ntfyhook link, and it will automatically format the data, including embeds, to be compatible with Ntfy.
Features
- Proxy requests from Discord webhooks to Ntfy
- Automatically formats Discord webhook data, including embeds, to be compatible with Ntfy
- Supports basic and bearer authentication to Ntfy
A webhook message on Discord

The same message on Ntfy

See the Example Request section for the request body of the example.
Usage
- Set the
NTFY_ROOT_URLenvironment variable to the root URL of your Ntfy instance. Example:https://ntfy.example.com - Replace your Discord webhook link with the Ntfyhook link in your application.
Environment Variables
NTFY_ROOT_URL: The root URL of your Ntfy instance.
Example
export NTFY_ROOT_URL=https://ntfy.example.com
Running the Server
npm install
node index.js
The server will start listening on port 3000.
API
POST /:topic/:credentials
Proxy a Discord webhook request to Ntfy.
Parameters
topic*: The topic to post the message to.credentials*: The authentication credentials of your Ntfy instance (must start with "Bearer" or "Basic").
Query Parameters
overrides: A JSON object containing any overrides for the Ntfy message payload.
* required
Request Body
The request body should be a valid Discord webhook payload.
Response
200 OK: The message was successfully sent to Ntfy.400 Bad Request: The request was invalid.500 Internal Server Error: An error occurred while sending the message to Ntfy. The error details from Ntfy will be forwarded back to you in the response.
Example Request
Here is an example request using curl:
curl -X POST https://your-ntfyhook-instance.com/topic/Bearer%20your_token \
-H "Content-Type: application/json" \
-d '{
"content": "This is a test message",
"username": "TestUser",
"avatar_url": "https://example.com/avatar.png",
"embeds": [
{
"title": "Embed Title",
"description": "Embed Description",
"url": "https://example.com",
"author": {
"name": "Author Name",
"url": "https://author.example.com"
},
"fields": [
{
"name": "Field 1",
"value": "Value 1"
},
{
"name": "Field 2",
"value": "Value 2"
}
],
"footer": {
"text": "Footer Text"
},
"timestamp": "2023-10-01T12:34:56.789Z"
}
]
}'
License
Copyright (C) 2025 rocord01
This project is licensed under the GNU AGPLv3 license. See LICENSE for details.