From 509e83eb7c0f43376262196cb44b3f9afa13ad85 Mon Sep 17 00:00:00 2001 From: headlessdev Date: Tue, 29 Apr 2025 23:51:58 +0200 Subject: [PATCH] Ntfy docs --- docs/notifications/Ntfy.md | 42 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/docs/notifications/Ntfy.md b/docs/notifications/Ntfy.md index e435097..32aa1b9 100644 --- a/docs/notifications/Ntfy.md +++ b/docs/notifications/Ntfy.md @@ -1,3 +1,41 @@ -# Ntfy +# ntfy Notification Setup -![Set up](../assets/screenshots/notifications_ntfy.png) \ No newline at end of file +To enable ntfy notifications, you need the following: + +- **ntfy URL** + The base URL of your ntfy server including the topic (e.g., `https://ntfy.example.com/alerts`) + +- **ntfy Token** + An access token for authentication, generated per user + +## How to get the ntfy URL and Token + +1. **Install and set up your ntfy server** (self-hosted or use `https://ntfy.sh`) +2. **Choose a topic name** (e.g. `alerts`) and include it in the URL: + `https:///` + +3. **Create a user (if not already created)** + +4. **Generate a token for the user** using the following command: + ```bash + ntfy token add --expires=30d --label="notifications" + ``` + +5. **List existing tokens** to get the full token string: + ```bash + ntfy token list + ``` + +6. **Use the token** as a bearer token when sending messages, either in the Authorization header or in your tool's configuration. + +## Example Token Management Commands + +```bash +ntfy token list # Show all tokens +ntfy token list alice # Show tokens for user 'alice' +ntfy token add alice # Create token for user 'alice' (never expires) +ntfy token add --expires=2d bob # Create token for 'bob', expires in 2 days +ntfy token remove alice tk_... # Delete a token +``` + +More information at [the ntfy docs](https://docs.ntfy.sh/config/#access-tokens) \ No newline at end of file