From 3d0545d0484fcadc7907ab2e90637c747e5b737c Mon Sep 17 00:00:00 2001 From: traveler Date: Fri, 1 May 2026 08:19:47 -0500 Subject: [PATCH] docs(gremlin): update ntfy --- Netgrimoire/Services/ntfy/ntfy.md | 72 +++++++++++++++++-------------- 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/Netgrimoire/Services/ntfy/ntfy.md b/Netgrimoire/Services/ntfy/ntfy.md index 5dff0b8..908c2f2 100644 --- a/Netgrimoire/Services/ntfy/ntfy.md +++ b/Netgrimoire/Services/ntfy/ntfy.md @@ -1,18 +1,27 @@ --- +title: ntfy Stack +description: Notification Service for NetGrimoire +published: true +date: 2026-05-01T13:17:31.733Z +tags: docker,swarm,ntfy,netgrimoire +editor: markdown +dateCreated: 2026-05-01T13:17:31.733Z +--- + # ntfy ## Overview -The ntfy stack is a Docker Swarm configuration for deploying an NTFY (Notifiying The Future) server in NetGrimoire. This stack provides push notification functionality, allowing users to send notifications to various services within the homelab. - ---- +The ntfy stack is a Docker Swarm-based notification service for NetGrimoire. It consists of the ntfy container, which serves notifications to users via Caddy reverse proxy. The stack also integrates with Uptime Kuma for monitoring and displays on the homepage. ## Architecture + | Service | Image | Port | Role | |---------|-------|-----|------| +- **ntfy:** binwiederhier/ntfy | 81:80 | Notification Service | - **Host:** docker4 - **Network:** netgrimoire -- **Exposed via:** ntfy.netgrimoire.com +- **Exposed via:** ntfy.netgrimoire.com, ntfy:80 (Internal) - **Homepage group:** Notify --- @@ -20,20 +29,19 @@ The ntfy stack is a Docker Swarm configuration for deploying an NTFY (Notifiying ## Build & Configuration ### Prerequisites -This stack requires a Docker Swarm manager (znas) and worker nodes (docker4). It also assumes that the environment variables are properly set. +To deploy this stack, ensure Docker Swarm and Caddy are installed on your system. Ensure the `docker` user has the necessary permissions to execute Docker commands. ### Volume Setup ```bash -mkdir -p /DockerVol/ntfy/cache -mkdir -p /DockerVol/ntfy/etc +mkdir -p /DockerVol/ntfy +chown -R docker:docker /DockerVol/ntfy ``` ### Environment Variables ```bash # generate: openssl rand -hex 32 -CADDY_API_KEY=$(openssl rand -hex 32) -KUMA_URL="https://kuma.netgrimoire.com" -CLOUDSEC_URL="https://crowdsec.netgrimoire.com" +CADDY_URL= +NTFY_API_KEY= ``` ### Deploy @@ -47,10 +55,7 @@ docker stack services ntfy ``` ### First Run -Run the following command to initialize the database: -```bash -ntfy init -``` +Run `docker-compose up` on your local machine to initialize the container. --- @@ -58,41 +63,40 @@ ntfy init ### Accessing ntfy | Service | URL | Purpose | -- **NTFY Web Interface:** https://ntfy.netgrimoire.com +|---------|-----|---------| +- **ntfy:** http://ntfy:80 ### Primary Use Cases -To use this stack, you need to send a notification from an application using the NTFY API. You can do this by sending a POST request to `https://ntfy.netgrimoire.com/notify`. +To send notifications, use the NTFY API. Visit [NTFY documentation](https://docs.nfly.com) for instructions on sending notifications. ### NetGrimoire Integrations -This stack integrates with other services in NetGrimoire, such as Uptime Kuma and Crowds. +This service integrates with Uptime Kuma for monitoring and displays on the homepage. --- ## Operations ### Monitoring -$kuma monitors from kuma.* labels> ```bash docker stack services ntfy - +kuma monitor http://ntfy:80 ``` ### Backups -The data stored in this stack is not critical and can be reconstructed from the Docker Swarm configuration. However, it's recommended to regularly back up the `/DockerVol/ntfy/cache` directory. +Critical data is stored in `/DockerVol/ntfy/cache` and `/DockerVol/ntfy/etc`. Make sure to backup these directories regularly. ### Restore -```bash -cd services/swarm/stack/ntfy -./deploy.sh -``` +Restore from the Docker Swarm deployment by running `./deploy.sh`. --- ## Common Failures + | Symptom | Cause | Fix | |---------|-------|-----| -| Service not starting | Network issue | Check network connections and ensure the Docker Swarm is properly configured. | -| API errors | Incorrect API key | Update the CADDY_API_KEY environment variable with a new random key. | +- Service not starting | Caddy configuration incorrect | Review Caddy configuration and restart the service. +- NTFY API key missing | Environment variable `NTFY_API_KEY` empty | Set environment variable `NTFY_API_KEY` to a valid value. +- Failed to deploy stack | Docker Swarm deployment failed | Check Docker Swarm logs for errors and try again. --- @@ -100,17 +104,19 @@ cd services/swarm/stack/ntfy | Date | Commit | Summary | |------|--------|---------| -| 2026-05-01 | de8ddef0 | Initial documentation for ntfy stack | -| 2026-05-01 | f88c14c9 | Update CADDY_API_KEY to use a new random key | -| 2026-05-01 | c6ec8a2f | Update KUMA_URL and CLOUDSEC_URL to point to the correct services | -| 2026-04-07 | 5058dbe5 | Add initial deploy script | -| 2026-04-07 | 247956f0 | Fix typo in Docker Swarm configuration | +| 2026-05-01 | 983e707b | Initial documentation creation | +| 2026-05-01 | de8ddef0 | Improved Caddy URL from label | +| 2026-05-01 | f88c14c9 | Added environment variable for NTFY API key | +| 2026-05-01 | c6ec8a2f | Improved ntfy service configuration | +| 2026-04-07 | 5058dbe5 | Initial version of stack creation | - + +The ntfy stack has undergone several changes since its initial creation. The Caddy URL was updated from an internal value to a more specific label, allowing for easier configuration management. Environment variables were added to store sensitive information such as NTFY API keys securely. Additionally, improvements were made to the service configuration and deployment process. --- ## Notes -- Generated by Gremlin on 2026-05-01T13:17:27.291Z +- Generated by Gremlin on 2026-05-01T13:17:31.733Z - Source: swarm/ntfy.yaml - Review User Guide and Changelog sections \ No newline at end of file