# ntfy

> ntfy push notifications to a topic on ntfy.sh or your own server - topic, server and access token, and the priority of each event.

An ntfy channel sends alerts as push notifications to an [ntfy](https://ntfy.sh) topic, on `ntfy.sh` or on your own server.

1. Pick a topic name and subscribe to it in the ntfy app.
2. On the project's **Alerts** page, choose **Add channel** → **ntfy** and enter the topic. Leave **Server** empty for `ntfy.sh`, or give the address of your own server. Add an **Access token** only if the topic asks for one.
3. **Send test** to see a notification arrive.

| Field        | Rule                                                                                                 |
| ------------ | ---------------------------------------------------------------------------------------------------- |
| Topic        | 1 to 64 letters, digits, `-` and `_`                                                                 |
| Server       | `https://ntfy.sh` by default; your own server over `https`, without a query, not an internal address |
| Access token | Optional, up to 256 characters, sent as `Authorization: Bearer`                                      |

On a public server anyone who knows a topic can read it, so pick a name that is hard to guess, or use a token-protected topic. The topic and the token are stored encrypted; the dashboard and the API show only the server afterwards.

## Priority

| Event                                                                  | ntfy priority |
| ---------------------------------------------------------------------- | ------------- |
| A check is DOWN, a later escalation level, still down after maintenance | 5 (max)      |
| An offline private node                                                | 4 (high)      |
| Everything else: recoveries, expiry warnings, tests                    | 3 (default)   |

The first line of the alert is the notification's title and the rest its text, as plain text. DOWN and escalation messages carry an **Acknowledge** action.

## When the server refuses

When the server answers 401 or 403 (the token is wrong or the topic is reserved), 404 or 410, or redirects with anything but 307 or 308, the channel is **Not delivering** at once. When it answers 429 (its request or daily limit), delivery waits and tries again.

Everything else (what is sent, retries, order) works as for the [other channels](https://docs.monitorly.cloud/alerts.md).
