Traditional email alerts sent via local SMTP (sendmail/postfix) frequently get blocked by ISP spam filters or fail silently. Modern operations rely on real-time, lightweight push notifications via webhooks.
This guide details how to build an administrative alerting pipeline using Ntfy and Apprise across TrueNAS, Docker, and systemd services.
⚡ Quick Runbook: 60-Second Implementation
TL;DR: Copy and deploy the baseline production definition directly onto your host:
services:
ntfy:
image: binwiederhier/ntfy:latest
restart: unless-stopped
command: serve
environment:
- NTFY_BASE_URL=https://ntfy.example.com
- NTFY_BEHIND_PROXY=true
- NTFY_AUTH_DEFAULT_ACCESS=deny-all
volumes:
- /opt/stacks/ntfy/data:/var/lib/ntfy
- /opt/stacks/ntfy/etc:/etc/ntfy
ports:
- "127.0.0.1:8088:80"
1. Running a Private Ntfy Push Server
Ntfy provides a lightweight, self-hosted pub-sub notification service that sends instant notifications to phone and desktop clients with zero battery drain:
services:
ntfy:
image: binwiederhier/ntfy:latest
restart: unless-stopped
command: serve
environment:
- NTFY_BASE_URL=https://ntfy.example.com
- NTFY_BEHIND_PROXY=true
- NTFY_AUTH_DEFAULT_ACCESS=deny-all
volumes:
- /opt/stacks/ntfy/data:/var/lib/ntfy
- /opt/stacks/ntfy/etc:/etc/ntfy
ports:
- "127.0.0.1:8088:80"
2. Scripting High-Priority Alerts
Trigger instant high-priority notifications with simple curl commands from systemd failure handlers:
# Dispatch emergency notification with urgent priority
curl -H "Title: Disk Degradation Alert" -H "Priority: urgent" -H "Tags: warning,skull" -d "Pool datapool reported checksum error on drive sdb." https://ntfy.example.com/sysadmin-alerts
Related Runbooks in This Series
- Modern Homelab Observability: Netdata Telemetry & Uptime Kuma Health Checks
- Centralized Homelab Logging: Vector, Grafana Loki, and Structured JSON Telemetry
- Homelab Notification Pipelines: Multi-Channel Alerts with Webhooks & Ntfy
- Networked UPS Management: Network UPS Tools (NUT) and Graceful Automated Shutdown
- Predictive Drive Failure & S.M.A.R.T. Health Monitoring with smartd and Scrutiny