Files
ntfy-matrix-bridge/config.yaml.example
2026-06-17 22:24:58 -04:00

36 lines
1.5 KiB
Plaintext

# ntfy -> Matrix bridge configuration
#
# Any ${VAR} is replaced with the environment variable of that name, so you
# can keep secrets out of this file (recommended for the access token).
matrix:
homeserver: "https://matrix.example.org"
user_id: "@ntfybot:example.org"
# Either put the token here, or leave it out and set MATRIX_ACCESS_TOKEN.
# Get one by running: python login.py
access_token: "${MATRIX_ACCESS_TOKEN}"
device_id: "NTFYBRIDGE" # optional, but nice to set a stable one
# Where the last-forwarded message id per mapping is persisted, so the bridge
# resumes without dropping or duplicating messages across restarts.
state_file: "./state.json"
mappings:
# A mapping = a set of topics on one ntfy server -> one Matrix room.
- name: "alerts" # unique label, also the state key
ntfy_server: "https://ntfy.sh"
topics: ["server-alerts", "backups"] # watched on a single connection
room: "!yourRoomId:example.org" # internal room id, not the alias
msgtype: "m.text" # m.text notifies; m.notice is quieter
# priority_min: 4 # optional: only forward priority >= 4
- name: "homelab"
ntfy_server: "https://ntfy.mybox.net"
topics: ["homelab"]
room: "!anotherRoomId:example.org"
# For protected/self-hosted topics, use a token...
token: "${NTFY_HOMELAB_TOKEN}"
# ...or basic auth instead:
# username: "subscriber"
# password: "${NTFY_HOMELAB_PASSWORD}"