From fa38464ac430ce97b80607d86a246fa06afb0acc Mon Sep 17 00:00:00 2001 From: traveler Date: Fri, 1 May 2026 08:15:12 -0500 Subject: [PATCH] docs(gremlin): create ntfy --- Netgrimoire/Services/ntfy/ntfy.md | 100 ++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 Netgrimoire/Services/ntfy/ntfy.md diff --git a/Netgrimoire/Services/ntfy/ntfy.md b/Netgrimoire/Services/ntfy/ntfy.md new file mode 100644 index 0000000..d862724 --- /dev/null +++ b/Netgrimoire/Services/ntfy/ntfy.md @@ -0,0 +1,100 @@ +# ntfy + +## Overview +The ntfy stack is a Docker Swarm-based infrastructure for serving push notifications in NetGrimoire. It consists of the ntfy service, which provides a web interface for sending and receiving notifications. + +--- + +## Architecture +| Service | Image | Port | Role | +|---------|-------|-----|------| +- **ntfy:** binwiederhier/ntfy | 81:80 | - | Notification Service | +- **Caddy:** ntfy.netgrimoire.com (reverse proxy) | - | - | Reverse Proxy | +- **Uptime Kuma:** ntfy.ntfy.http.url (monitoring) | - | https://ntfy.netgrimoire.com | Monitoring | + +--- + +## Build & Configuration + +### Prerequisites +A Docker Swarm manager node with Docker 20.10 or higher installed. + +### Volume Setup +```bash +mkdir -p /DockerVol/ntfy/cache +mkdir -p /DockerVol/ntfy/etc +``` + +### Environment Variables +```bash +generate: openssl rand -hex 32 +NTFY_API_KEY=1234567890abcdef +NTFY_SECRET_KEY=9876543210fedcba +``` + +### Deploy +```bash +cd services/swarm/stack/ntfy +set -a && source .env && set +a +docker stack config --compose-file ntfy-stack.yml > resolved.yml +docker stack deploy --compose-file resolved.yml ntfy +rm resolved.yml +docker stack services ntfy +``` + +### First Run +After deploying, the `NTFY_API_KEY` and `NTFY_SECRET_KEY` environment variables need to be set. + +--- + +## User Guide + +### Accessing ntfy +| Service | URL | Purpose | +|---------|-----|---------| +- **ntfy:** https://ntfy.netgrimoire.com (web interface) + +### Primary Use Cases +To use the ntfy service, navigate to its web interface and follow the prompts. + +### NetGrimoire Integrations +The ntfy service integrates with Uptime Kuma for monitoring and with Caddy for reverse proxying. + +--- + +## Operations + +### Monitoring +```bash +docker stack services ntfy +docker logs -f ntfy | grep "http" +``` + +### Backups +Critical data is stored in /DockerVol/ntfy/cache. For reconstructability, /DockerVol/ntfy/etc should be backed up as well. + +### Restore +```bash +cd services/swarm/stack/ntfy +./deploy.sh +``` + +--- + +## Common Failures +| Symptom | Cause | Fix | +|---------|------|-----| +| Service not responding | Insufficient resources | Scale ntfy service or increase CPU resource allocation | +| Caddy errors | Misconfigured reverse proxy | Review and correct caddy configuration | +| Uptime Kuma connection issues | Incorrect monitoring settings | Check and adjust monitoring configuration | + +--- + +## Changelog + +| Date | Commit | Summary | +|------|--------|---------| +| 2026-05-01 | f88c14c9 | Initial deployment of ntfy stack in Docker Swarm | +| 2026-04-07 | 5058dbe5 | Implemented reverse proxy with Caddy and integrated Uptime Kuma for monitoring | + + \ No newline at end of file