ntfy Attributes¶
Configuring ntfy is optional but can allow you to send the webhooks straight to ntfy.
A ntfy
mapping is in the root of the config file, sampled below.
config.yml ntfy sample
ntfy:
url: https://ntfy.sh # or a different ntfy server URL
token: tk_thisismyaccesstoken
topic: kometa # or a different topic name
Attribute | Description | Allowed Values (default in bold) | Required |
---|---|---|---|
url |
ntfy server URL. | Any valid URL or leave blank | |
token |
ntfy user access token. | Any valid token or leave blank | |
topic |
ntfy topic name. | Any valid topic or leave blank |
Setup¶
Users can either use the public ntfy server, or host their own ntfy server.
Retrieving Access Token and Topic¶
Using the Public Server¶
- Visit https://ntfy.sh/login and login or sign up for an account (it's free).
- Select "Account" from the side menu and scroll to "Access Tokens" to generate an access token.
- Copy the access token and paste it into the
token
attribute in your config file. Enterhttps://ntfy.sh
into theurl
attribute. - Click "Subscribe to topic" from the side menu and enter a topic name.
- Pro subscribers can reserve specific topics, but any free tier user can subscribe and publish to any non-reserved topic.
- Common topics such as
kometa
are likely already reserved or at least used by other public ntfy users (and these topics may be visible to the general public). It's recommended to use a random topic name to keep your notifications semi-private. - Enter the topic name into the
topic
attribute in the config file.
Using a Self-Hosted Server¶
If you are a standard (non-admin) user of a ntfy server other than the official one, you can follow the same steps as above, but with the server URL and token provided by the server.
If you are an admin of your own ntfy server, you can follow these steps:
- Follow the installation instructions to set up your own ntfy server.
- Follow the same steps above for creating an account and access token, or use the
ntfy
command line tool to create a userand generate an access token. - Follow the same steps as above for generating/reserving a topic, but with the server URL and token provided by your server.
Use the URL, topic and token to configure ntfy
in the root of the config file.
Once you have added the configuration data to your config.yml
, you can add ntfy
to any webhook to send that notification to ntfy.