ntfy-notifications/SKILL.md
Self-hosted push notifications with ntfy — publishing, authentication, priorities, and integration patterns for scripts and monitoring
npx skillsauth add ddnetters/homelab-agent-skills ntfy-notificationsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
ntfy (pronounce "notify") is a self-hosted push notification service. Send notifications from scripts, cron jobs, and monitoring systems to your phone.
curl -d "Backup completed successfully" https://ntfy.example.com/my-topic
curl -H "Title: Backup Status" \
-H "Priority: high" \
-H "Tags: white_check_mark,backup" \
-d "Daily backup completed in 5 minutes" \
https://ntfy.example.com/backups
# Token auth (preferred)
curl -H "Authorization: Bearer YOUR_TOKEN" \
-d "Message here" \
https://ntfy.example.com/topic
# Basic auth
curl -u username:password \
-d "Message here" \
https://ntfy.example.com/topic
curl -H "Click: https://grafana.example.com/d/alerts" \
-H "Title: Disk Alert" \
-H "Priority: urgent" \
-H "Tags: warning" \
-d "Disk usage above 90% on /dev/sda1" \
https://ntfy.example.com/alerts
curl -H "Actions: view, Open Grafana, https://grafana.example.com; http, Restart Service, https://api.example.com/restart, method=POST" \
-d "Service is down" \
https://ntfy.example.com/alerts
curl -T /var/log/backup.log \
-H "Filename: backup.log" \
-H "Title: Backup Log" \
https://ntfy.example.com/backups
| Priority | Keyword | Value | Use for |
|----------|---------|-------|---------|
| Max | max / urgent | 5 | Service down, security alerts |
| High | high | 4 | Backup failures, disk warnings |
| Default | default | 3 | Routine notifications |
| Low | low | 2 | Info, non-urgent updates |
| Min | min | 1 | Debug, verbose logging |
Common tags for notifications:
| Tag | Emoji | Use for |
|-----|-------|---------|
| white_check_mark | ✅ | Success |
| x | ❌ | Failure |
| warning | ⚠️ | Warning |
| rotating_light | 🚨 | Critical alert |
| floppy_disk | 💾 | Backup |
| whale | 🐳 | Docker |
| movie_camera | 🎥 | Media/Plex |
| gear | ⚙️ | System/config |
| chart_with_upwards_trend | 📈 | Monitoring |
Full list: https://docs.ntfy.sh/emojis/
services:
ntfy:
image: binwiederhier/ntfy
command: serve
ports:
- "8090:80"
volumes:
- ntfy_data:/var/lib/ntfy
- ./server.yml:/etc/ntfy/server.yml
environment:
TZ: Europe/Amsterdam
restart: unless-stopped
volumes:
ntfy_data:
base-url: https://ntfy.example.com
auth-default-access: deny-all
behind-proxy: true
# List users
docker exec ntfy ntfy user list
# Add admin user
docker exec ntfy ntfy user add --role admin USERNAME
# Add regular user
docker exec ntfy ntfy user add USERNAME
# Delete user
docker exec ntfy ntfy user del USERNAME
# Change password
docker exec ntfy ntfy user change-pass USERNAME
# View all ACLs
docker exec ntfy ntfy access
# Grant read-write to a topic
docker exec ntfy ntfy access USERNAME my-topic rw
# Grant read-only (subscribe only)
docker exec ntfy ntfy access USERNAME alerts ro
# Grant write-only (publish only)
docker exec ntfy ntfy access USERNAME backups wo
# Allow anonymous read access to a topic
docker exec ntfy ntfy access '*' public-topic ro
# Generate an access token for a user
docker exec ntfy ntfy token add USERNAME
# List tokens
docker exec ntfy ntfy token list
# Remove a token
docker exec ntfy ntfy token remove USERNAME TOKEN
#!/bin/bash
NTFY_URL="https://ntfy.example.com/backups"
NTFY_TOKEN="YOUR_TOKEN"
if restic backup /data --json 2>&1 | tail -1 | jq -e '.message_type == "summary"' > /dev/null; then
curl -s -H "Authorization: Bearer $NTFY_TOKEN" \
-H "Tags: white_check_mark" \
-d "Backup completed: $(date +%F)" "$NTFY_URL"
else
curl -s -H "Authorization: Bearer $NTFY_TOKEN" \
-H "Priority: high" -H "Tags: x" \
-d "Backup FAILED: $(date +%F)" "$NTFY_URL"
fi
# In docker-compose.yml
services:
watchtower:
image: containrrr/watchtower
environment:
WATCHTOWER_NOTIFICATION_URL: "generic://ntfy.example.com/watchtower?auth=Bearer+YOUR_TOKEN"
# Wrap any command with ntfy notification on failure
run_with_ntfy() {
local topic="$1"; shift
if ! "$@" 2>&1; then
curl -s -H "Authorization: Bearer $NTFY_TOKEN" \
-H "Priority: high" -H "Tags: x" \
-d "Command failed: $*" "https://ntfy.example.com/$topic"
fi
}
run_with_ntfy server-alerts certbot renew
USAGE=$(df -h / | awk 'NR==2{print $5}' | tr -d '%')
if [ "$USAGE" -gt 90 ]; then
curl -s -H "Authorization: Bearer $NTFY_TOKEN" \
-H "Priority: high" -H "Tags: warning" \
-H "Title: Disk Alert" \
-d "Root partition at ${USAGE}%" \
"https://ntfy.example.com/alerts"
fi
UNHEALTHY=$(docker ps --filter "health=unhealthy" --format '{{.Names}}' | tr '\n' ', ')
if [ -n "$UNHEALTHY" ]; then
curl -s -H "Authorization: Bearer $NTFY_TOKEN" \
-H "Priority: high" -H "Tags: whale,warning" \
-H "Title: Unhealthy Containers" \
-d "$UNHEALTHY" \
"https://ntfy.example.com/docker"
fi
https://ntfy.example.com# Subscribe in terminal (streaming)
curl -s https://ntfy.example.com/my-topic/sse
# Subscribe with auth
curl -s -H "Authorization: Bearer YOUR_TOKEN" \
https://ntfy.example.com/my-topic/sse
# JSON stream
curl -s https://ntfy.example.com/my-topic/json
# Poll (last 24h)
curl -s "https://ntfy.example.com/my-topic/json?since=24h"
| Problem | Fix |
|---------|-----|
| 401 Unauthorized | Check token/password, verify ACLs with ntfy access |
| 403 Forbidden | User lacks permission for topic. Add ACL: ntfy access USER TOPIC rw |
| No phone notification | Check app subscription, server URL, topic matches exactly |
| Behind reverse proxy | Set behind-proxy: true in server.yml, ensure proxy passes headers |
| Messages not persisting | Check volume mount for /var/lib/ntfy, ensure cache is enabled in config |
development
Use when delegating a single coding task to `codex exec` ("hand off to codex", "run codex on this", "dispatch codex on this ticket", any one-shot invocation). Covers flags, sandbox traps, monitoring, and recovery. Not for multi-issue parallel batches — use codex-issue-waves for those.
development
Use when the user says "have codex fix this" / "have codex implement this" / "let codex handle this" / "give this to codex" / "delegate this to codex" for a single task with context already in scope (a Jira ticket, GitHub issue, file diff, bug, or described change). Plans the work, splits it into reviewable waves, dispatches codex per wave with review and correction between waves before opening a PR. Not for multi-issue parallel batches (use codex-issue-waves) or one-shot codex runs without planning (use invoking-codex-exec).
development
Run a batch of GitHub issues through codex exec in isolated git worktrees as parallel autonomous PRs, then manage the review and correction waves until merge. Use when the user gives a list of issue numbers (≥ 2) and asks to "spawn codex" / "dispatch codex" / "have codex work on" / "manage the PRs" / "process feedback" / "get them merged" for those issues, or when the user asks for multi-issue parallel delegation to codex. Not for single-issue wave-driven delegation (use codex-task-waves), single-issue one-shot dispatch (use invoking-codex-exec), or implementation without delegation (use /pr or direct implementation).
development
Slite knowledge base API — ask questions, search notes, retrieve content, manage users and groups, and audit knowledge health via the REST API