Skip to content

ntfy

ntfy.sh is a simple, open-source push notification service. Subscribe to a topic on your phone or desktop and receive alerts the moment something goes down — no account required for public topics, and fully self-hostable.

How it works

Wanepia POSTs a plain-text message to your ntfy topic URL. ntfy relays it to all subscribers on that topic (mobile app, browser, or CLI).

Setup

  1. Install the ntfy app on your phone (iOS / Android)
  2. Subscribe to a topic name of your choice (e.g. my-infra-alerts)
  3. Your topic URL is https://ntfy.sh/my-infra-alerts

For private topics, generate an access token in the ntfy web UI and pass it as token.

For self-hosted ntfy, use your own server URL (e.g. https://ntfy.example.com/my-alerts).

Adding an ntfy channel

# Public topic
wnp notify add-channel <check-id> \
  --type ntfy \
  --config url=https://ntfy.sh/my-infra-alerts

# Protected topic
wnp notify add-channel <check-id> \
  --type ntfy \
  --config url=https://ntfy.sh/my-infra-alerts \
  --config token=tk_...
curl -X POST https://api.wanepia.com/v1/checks/{check_id}/policy/channels \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "channel_type": "ntfy",
    "config": {
      "url": "https://ntfy.sh/my-infra-alerts",
      "token": "tk_..."
    }
  }'
  1. Open a check's notification panel
  2. Click Add channel → select ntfy
  3. Enter your topic URL and optional token
  4. Click Add

Config fields

Key Required Description
url Yes Full ntfy topic URL including scheme and topic name
token No Bearer token for protected topics

Notification format

Wanepia sets ntfy headers to give rich metadata:

Header Down Degraded Up / recovery
Title payments-api — down payments-api — degraded payments-api — up
Priority urgent high low
Tags skull warning white_check_mark

Body (plain text):

payments-api is now down (was up)

The urgent priority makes the notification break through Do Not Disturb on iOS and Android.

Self-hosted ntfy

Point url at your own server:

url = https://ntfy.example.com/my-alerts

Self-hosted ntfy supports the same API, so no other changes are needed.

Troubleshooting

  • 403 Forbidden: the topic is access-controlled and you haven't provided a valid token.
  • Topic not found (404): the topic URL is incorrect.
  • Wanepia expects a 2xx response. Non-2xx counts as failure and triggers retries.
  • Use wnp notify logs to inspect delivery attempts.