Skip to content

Matrix notifications

Allow sending notifications to your Matrix server.

Configuration

File

notif:
  matrix:
    homeserverURL: https://matrix.org
    user: "@foo:matrix.org"
    password: bar
    roomID: "!abcdefGHIjklmno:matrix.org"
    msgType: notice
    templateBody: |
      Docker tag {{ .Entry.Image }} which you subscribed to through {{ .Entry.Provider }} provider has been released.

File (access token)

notif:
  matrix:
    homeserverURL: https://matrix.org
    token: myAccessToken
    roomID: "!abcdefGHIjklmno:matrix.org"

Note

Using token or tokenFile skips password authentication and does not require user. Diun does not log out when using a token, so it remains valid for subsequent notifications.

Name Default Description
homeserverURL https://matrix.org Matrix server URL
user Username for password authentication
userFile Use content of secret file as username authentication if user not defined
password Password for authentication
passwordFile Use content of secret file as password authentication if password not defined
token Access token. Takes precedence over username and password authentication
tokenFile Use content of secret file as access token if token not defined
roomID Room ID to send messages
msgType notice Type of message being sent. Can be notice or text
templateBody1 See below Notification template for message body

Environment variables

  • DIUN_NOTIF_MATRIX_HOMESERVERURL
  • DIUN_NOTIF_MATRIX_USER
  • DIUN_NOTIF_MATRIX_USERFILE
  • DIUN_NOTIF_MATRIX_PASSWORD
  • DIUN_NOTIF_MATRIX_PASSWORDFILE
  • DIUN_NOTIF_MATRIX_TOKEN
  • DIUN_NOTIF_MATRIX_TOKENFILE
  • DIUN_NOTIF_MATRIX_ROOMID
  • DIUN_NOTIF_MATRIX_MSGTYPE
  • DIUN_NOTIF_MATRIX_TEMPLATEBODY

Default templateBody

Docker tag {{ if .Entry.Image.HubLink }}[**{{ .Entry.Image }}**]({{ .Entry.Image.HubLink }}){{ else }}**{{ .Entry.Image }}**{{ end }} which you subscribed to through {{ .Entry.Provider }} provider {{ if (eq .Entry.Status "new") }}is available{{ else }}has been updated{{ end }} on {{ .Entry.Image.Domain }} registry (triggered by {{ .Meta.Hostname }} host).

Sample


  1. Value required ↩