Skip to content

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:

  1. Open config/config.yml with WebUI config editor or a text editor.

  2. Add Gotify Notification Configuration:

    yaml
    notification:
      - name: gotify
        provider: gotify
        url: https://gotify.my.site
        token: abcdef.12345
  3. Add Ntfy Notification Configuration:

    yaml
    notification:
      - name: ntfy
        provider: ntfy
        url: https://ntfy.domain.com
        topic: some-topic
        # token: xxx # if your Ntfy is configured with access tokens
  4. Add Discord Notification Configuration:

    yaml
    notification:
      - name: discord
        provider: webhook
        url: https://discord.com/api/webhooks/...
        template: discord

Gotify Provider

  • Set a name for your provider (e.g., gotify).
  • Set the provider to gotify.
  • Set the url to the address where Gotify is hosted.
  • Set the token which is used to authenticate.

Ntfy Provider

  • Set a name for your provider (e.g., ntfy).
  • Set the provider to ntfy.
  • Set the url to the address (without topic) where Ntfy is hosted.
  • Set the topic which is the message will be sent to.
  • Set the token if your server is configured with access tokens.

Discord Provider

  • Set a name for your provider (e.g., discord).
  • Set the provider to webhook.
  • Set the url which is the webhook address for your Discord channel.
  • Set the template to discord to use Discord formatting.

Other webhook providers

  • Set a name for your provider (e.g., slack).
  • Set the provider to webhook.
  • Set the url which is the webhook address for your Slack channel.
  • Set the payload to appropriate JSON body for your webhook provider.
  • Set the token if your provider requires authentication.

Full documentation

Common Field

FieldDescriptionRequiredAllowed values
nameName of the providerYes
providerYesgotify ntfy webhook
urlProvider URLYesFull URL
formatMessage FormatNo (default: markdown)markdown plain

Webhook

FieldDescriptionRequiredAllowed values
providerYeswebhook
templateWebhook templateNoempty, discord
tokenWebhook tokenNo
payloadWebhook payloadNo (if template is used)valid json
methodWebhook request methodNoGET POST PUT
mime_typeMIME typeNo
color_modeColor modeNohex 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) or dec (e.g., 16711680).

Example

json
{
    "embeds": [
        {
            "title": $title,
            "fields": $fields,
            "color": "$color"
        }
    ]
}

Released under the MIT License.