Notifications
Usage
Notifications are sent to users to inform them about an event, update, or action.
Currently used for:
- Notifying service health status changes
- Notifying when certificate renewal is successful or failed
- Notifying when errors occur on config file reload
Enabling Notifications
To enable notifications, you need to configure it on WebUI or in your config.yml file. Follow these steps:
Open
config/config.ymlwith WebUI config editor or a text editor.Add Gotify Notification Configuration:
yamlnotification: - name: gotify provider: gotify url: https://gotify.my.site token: abcdef.12345Add Ntfy Notification Configuration:
yamlnotification: - name: ntfy provider: ntfy url: https://ntfy.domain.com topic: some-topic # token: xxx # if your Ntfy is configured with access tokensAdd Discord Notification Configuration:
yamlnotification: - name: discord provider: webhook url: https://discord.com/api/webhooks/... template: discord
Gotify Provider
- Set a
namefor your provider (e.g.,gotify). - Set the
providertogotify. - Set the
urlto the address where Gotify is hosted. - Set the
tokenwhich is used to authenticate.
Ntfy Provider
- Set a
namefor your provider (e.g.,ntfy). - Set the
providertontfy. - Set the
urlto the address (without topic) where Ntfy is hosted. - Set the
topicwhich is the message will be sent to. - Set the
tokenif your server is configured with access tokens.
Discord Provider
- Set a
namefor your provider (e.g.,discord). - Set the
providertowebhook. - Set the
urlwhich is the webhook address for your Discord channel. - Set the
templatetodiscordto use Discord formatting.
Other webhook providers
- Set a
namefor your provider (e.g.,slack). - Set the
providertowebhook. - Set the
urlwhich is the webhook address for your Slack channel. - Set the
payloadto appropriate JSON body for your webhook provider. - Set the
tokenif your provider requires authentication.
Full documentation
Common Field
| Field | Description | Required | Allowed values |
|---|---|---|---|
| name | Name of the provider | Yes | |
| provider | Yes | gotify ntfy webhook | |
| url | Provider URL | Yes | Full URL |
| format | Message Format | No (default: markdown) | markdown plain |
Webhook
| Field | Description | Required | Allowed values |
|---|---|---|---|
| provider | Yes | webhook | |
| template | Webhook template | No | empty, discord |
| token | Webhook token | No | |
| payload | Webhook payload | No (if template is used) | valid json |
| method | Webhook request method | No | GET POST PUT |
| mime_type | MIME type | No | |
| color_mode | Color mode | No | hex dec |
Available Payload Variables
- $title: Title of the message (JSON escaped).
- $message: Message in Markdown format (JSON escaped).
- $fields: Message in JSON format (JSON escaped).
- $color: Color of the message in
hex(e.g.,#ff0000) ordec(e.g.,16711680).
Example
json
{
"embeds": [
{
"title": $title,
"fields": $fields,
"color": "$color"
}
]
}