Docs / Services

ntfy

Send push notifications via ntfy.sh — the open-source pub-sub notification service. Works with the public server or your own self-hosted instance.

URL format

public ntfy.sh
ntfy://topic
self-hosted
ntfy://your.server.com/topic
Segment Required Description
topic Yes The ntfy topic to publish to
host No Custom server hostname (default: ntfy.sh)

Example

typescript
import { notify } from '@ambersecurityinc/notifly';

// Public ntfy.sh
await notify(
  { urls: ['ntfy://my-secret-alerts-topic'] },
  { title: 'Build Passed', body: 'All tests green', type: 'success' }
);

// Self-hosted
await notify(
  { urls: ['ntfy://ntfy.mycompany.com/devops-alerts'] },
  { title: 'Build Failed', body: 'CI failed on main', type: 'failure' }
);

Setup

  1. Install the ntfy app on your phone (Android or iOS) or desktop.
  2. Subscribe to a topic — topics are auto-created on first publish.
  3. Important: Pick a hard-to-guess topic name since ntfy.sh topics are public and anyone who knows the topic name can subscribe.

Quirks & limitations

  • ntfy.sh topics are public by default. Use a random or private topic name.
  • Self-hosted ntfy servers can be configured with authentication.
  • The free tier on ntfy.sh has rate limits — check their docs for current limits.
  • The type field maps to ntfy tags: success → ✅, warning → ⚠️, failure → ❌.
← Previous Microsoft Teams Next → Gotify