ntfy Notification Setup
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
Install and set up your ntfy server (self-hosted or use
https://ntfy.sh
)Choose a topic name (e.g.
alerts
) and include it in the URL:https://<your-ntfy-server>/<your-topic>
Create a user (if not already created)
Generate a token for the user using the following command:
bashntfy token add --expires=30d --label="notifications" <username>
List existing tokens to get the full token string:
bashntfy token list <username>
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