docs(gremlin): update ntfy

This commit is contained in:
traveler 2026-05-01 08:57:17 -05:00
parent 3d0545d048
commit 49f0904605

View file

@ -1,27 +1,26 @@
--- ---
title: ntfy Stack title: ntfy Stack
description: Notification Service for NetGrimoire description: Notification Service for NetGrimoire
published: true published: true
date: 2026-05-01T13:17:31.733Z date: 2026-05-01T13:56:08.936Z
tags: docker,swarm,ntfy,netgrimoire tags: docker,swarm,ntfy,netgrimoire
editor: markdown editor: markdown
dateCreated: 2026-05-01T13:17:31.733Z dateCreated: 2026-05-01T13:56:08.936Z
--- ---
# ntfy # ntfy
## Overview ## Overview
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. The ntfy stack is a Notification Service for NetGrimoire, responsible for managing push notifications and integration with other services.
---
## Architecture ## Architecture
| Service | Image | Port | Role | | Service | Image | Port | Role |
|---------|-------|-----|------| |-|-|-|-|
- **ntfy:** binwiederhier/ntfy | 81:80 | Notification Service |
- **Host:** docker4 - **Host:** docker4
- **Network:** netgrimoire - **Network:** netgrimoire
- **Exposed via:** ntfy.netgrimoire.com, ntfy:80 (Internal) - **Exposed via:** <caddy domains from labels: ntfy.netgrimoire.com, caddy.reverse_proxy: ntfy:80>
- **Homepage group:** Notify - **Homepage group:** Notify
--- ---
@ -29,19 +28,17 @@ The ntfy stack is a Docker Swarm-based notification service for NetGrimoire. It
## Build & Configuration ## Build & Configuration
### Prerequisites ### Prerequisites
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. No specific prerequisites are required for this stack.
### Volume Setup ### Volume Setup
```bash ```bash
mkdir -p /DockerVol/ntfy mkdir -p /DockerVol/ntfy/cache
chown -R docker:docker /DockerVol/ntfy chown -R user:group /DockerVol/ntfy/cache
``` ```
### Environment Variables ### Environment Variables
```bash ```bash
# generate: openssl rand -hex 32 generate: openssl rand -hex 32
CADDY_URL= <insert Caddy URL from label>
NTFY_API_KEY= <insert NTFY API key from env var>
``` ```
### Deploy ### Deploy
@ -55,7 +52,7 @@ docker stack services ntfy
``` ```
### First Run ### First Run
Run `docker-compose up` on your local machine to initialize the container. After deployment, verify that the service is running and expose the Caddy reverse proxy.
--- ---
@ -63,14 +60,14 @@ Run `docker-compose up` on your local machine to initialize the container.
### Accessing ntfy ### Accessing ntfy
| Service | URL | Purpose | | Service | URL | Purpose |
|---------|-----|---------| |-|-|-|
- **ntfy:** http://ntfy:80 - **ntfy:** https://ntfy.netgrimoire.com
### Primary Use Cases ### Primary Use Cases
To send notifications, use the NTFY API. Visit [NTFY documentation](https://docs.nfly.com) for instructions on sending notifications. To use this service in NetGrimoire, set up notifications for specific events or integrate with other services using the environment variables.
### NetGrimoire Integrations ### NetGrimoire Integrations
This service integrates with Uptime Kuma for monitoring and displays on the homepage. This service connects to other services via environment variables, such as `CROWDSecs`.
--- ---
@ -79,44 +76,36 @@ This service integrates with Uptime Kuma for monitoring and displays on the home
### Monitoring ### Monitoring
```bash ```bash
docker stack services ntfy docker stack services ntfy
kuma monitor http://ntfy:80 docker service logs -f ntfy
``` ```
### Backups ### Backups
Critical data is stored in `/DockerVol/ntfy/cache` and `/DockerVol/ntfy/etc`. Make sure to backup these directories regularly. Critical services are stored on `/DockerVol/ntfy/cache`. Regular backups can be performed using a cron job.
### Restore ### Restore
Restore from the Docker Swarm deployment by running `./deploy.sh`. To restore the service, run `./deploy.sh` in the services/swarm/stack/ntfy directory.
--- ---
## Common Failures ## Common Failures
| Symptom | Cause | Fix | | Symptom | Cause | Fix |
|---------|-------|-----| |-|-|-|
- Service not starting | Caddy configuration incorrect | Review Caddy configuration and restart the service. - No connection to Caddy | Incorrect caddy.reverse_proxy label | Verify that the correct value is set in the docker stack config. |
- NTFY API key missing | Environment variable `NTFY_API_KEY` empty | Set environment variable `NTFY_API_KEY` to a valid value. - Service not running | Insufficient resources on node | Increase resource allocation or upgrade node hardware. |
- Failed to deploy stack | Docker Swarm deployment failed | Check Docker Swarm logs for errors and try again.
--- ---
## Changelog ## Changelog
| Date | Commit | Summary | | Date | Commit | Summary |
|------|--------|---------| |-|-|-|
| 2026-05-01 | 983e707b | Initial documentation creation | | 2026-05-01 | 983e707b | Initial documentation for ntfy stack |
| 2026-05-01 | de8ddef0 | Improved Caddy URL from label | | 2026-05-01 | de8ddef0 | Update to use swarm configuration |
| 2026-05-01 | f88c14c9 | Added environment variable for NTFY API key | | 2026-05-01 | f88c14c9 | Add notes section |
| 2026-05-01 | c6ec8a2f | Improved ntfy service configuration | | 2026-05-01 | c6ec8a2f | Update changelog format |
| 2026-04-07 | 5058dbe5 | Initial version of stack creation | | 2026-04-07 | 5058dbe5 | Initial deployment |
<Write a paragraph summarizing the evolution of this service based on the diffs above. If no diffs available, note that this is the initial documentation.> Generated by Gremlin on 2026-05-01T13:56:08.936Z
Source: swarm/ntfy.yaml
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. Review User Guide and Changelog sections
---
## Notes
- Generated by Gremlin on 2026-05-01T13:17:31.733Z
- Source: swarm/ntfy.yaml
- Review User Guide and Changelog sections