Skip to content

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.

  1. Pick a topic name that’s hard to guess — e.g. dockmesh-home-a7f392
  2. Install the ntfy app on your phone (iOS / Android)
  3. Subscribe to your topic in the app
  4. 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.

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:

Terminal window
docker exec -it monitoring_ntfy_1 ntfy user add --role=admin admin
# enter password
docker exec -it monitoring_ntfy_1 ntfy user add dockmesh-publisher
docker exec -it monitoring_ntfy_1 ntfy access dockmesh-publisher 'alerts*' write-only

Subscribe from the app with your ntfy URL + username/password.

Settings → Channels → New channel → ntfy

FieldValue
Namephone-alerts
Serverhttps://ntfy.sh or your self-hosted URL
Topicdockmesh-home-a7f392
Username (optional)if self-hosted with auth
Password (optional)if self-hosted with auth
PriorityDefault 3, critical alerts can elevate to 5

Click Send test — phone should buzz.

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

ntfy maps priority 1-5 to notification urgency:

PriorityBehavior
1Min (silent, no notification, just stored)
2Low
3Default
4High (buzzes longer)
5Max (bypasses Do Not Disturb on most devices)

For on-call pager behavior, set critical-severity alerts to priority 5.

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 → 🔥
  • 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