ntfy.sh
ntfy.sh is a pub/sub notification service. Publish a message to a topic URL, subscribers get a push notification. Runs on public ntfy.sh for free (with rate limits) or self-host it under your own domain.
Perfect for homelab self-hosters who don’t want to depend on Slack/Discord.
Option A — Use the public ntfy.sh
Section titled “Option A — Use the public ntfy.sh”- Pick a topic name that’s hard to guess — e.g.
dockmesh-home-a7f392 - Install the ntfy app on your phone (iOS / Android)
- Subscribe to your topic in the app
- Your notification URL is
https://ntfy.sh/dockmesh-home-a7f392
Anyone who knows this URL can send you notifications. Use a random-enough topic name to keep it private.
Option B — Self-host ntfy
Section titled “Option B — Self-host ntfy”Deploy ntfy as a dockmesh stack:
services: ntfy: image: binwiederhier/ntfy:latest command: serve restart: unless-stopped environment: NTFY_BASE_URL: https://ntfy.example.com NTFY_AUTH_FILE: /var/cache/ntfy/user.db NTFY_AUTH_DEFAULT_ACCESS: deny-all NTFY_BEHIND_PROXY: "true" NTFY_CACHE_FILE: /var/cache/ntfy/cache.db NTFY_ATTACHMENT_CACHE_DIR: /var/cache/ntfy/attachments volumes: - ntfy_cache:/var/cache/ntfy - ntfy_etc:/etc/ntfy
volumes: ntfy_cache: ntfy_etc:Add a proxy route for ntfy.example.com. Create users:
docker exec -it monitoring_ntfy_1 ntfy user add --role=admin admin# enter password
docker exec -it monitoring_ntfy_1 ntfy user add dockmesh-publisherdocker exec -it monitoring_ntfy_1 ntfy access dockmesh-publisher 'alerts*' write-onlySubscribe from the app with your ntfy URL + username/password.
Add to dockmesh
Section titled “Add to dockmesh”Settings → Channels → New channel → ntfy
| Field | Value |
|---|---|
| Name | phone-alerts |
| Server | https://ntfy.sh or your self-hosted URL |
| Topic | dockmesh-home-a7f392 |
| Username (optional) | if self-hosted with auth |
| Password (optional) | if self-hosted with auth |
| Priority | Default 3, critical alerts can elevate to 5 |
Click Send test — phone should buzz.
Message format
Section titled “Message format”dockmesh sends:
- Title: emoji + severity + rule name
- Message body: target, metric, value
- Tags:
warning,critical, stack name (searchable in ntfy app) - Click action: link to the dockmesh alert page
Priority levels
Section titled “Priority levels”ntfy maps priority 1-5 to notification urgency:
| Priority | Behavior |
|---|---|
| 1 | Min (silent, no notification, just stored) |
| 2 | Low |
| 3 | Default |
| 4 | High (buzzes longer) |
| 5 | Max (bypasses Do Not Disturb on most devices) |
For on-call pager behavior, set critical-severity alerts to priority 5.
Tags / emojis
Section titled “Tags / emojis”dockmesh attaches tags automatically based on severity, but you can add custom ones per channel or per rule. Common tags that render as emojis in the ntfy app:
warning→ ⚠️rotating_light→ 🚨white_check_mark→ ✅robot→ 🤖fire→ 🔥
Why ntfy over Slack/Discord?
Section titled “Why ntfy over Slack/Discord?”- Self-hostable — no third-party dependency
- Mobile-first — purpose-built for push notifications
- No account needed (public server) — just pick a topic
- iOS + Android apps that support bypassing Do Not Disturb
- Free forever — no SaaS feature tier
See also
Section titled “See also”- Alerts — alert rule config
- Home-Lab Setup — ntfy fits perfectly in homelab context