Ntfy configuration: Difference between revisions
From wikinotes
(→Basics) |
(→Basics) |
||
Line 44: | Line 44: | ||
# expose scrapable endpoint for prometheus | # expose scrapable endpoint for prometheus | ||
enable-metrics: | enable-metrics: true | ||
metrics-listen-http: 10.0.1.1:9090 | metrics-listen-http: 10.0.1.1:9090 | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 01:07, 19 May 2024
A self hosted pub/sub server wtih a FOSS app (iOS/android) that will issue push notifications.
NOTE:
ntfy has extensive configuration options not covered here, just a quickstart here.
Documentation
official docs https://docs.ntfy.sh/ sample config https://github.com/binwiederhier/ntfy/blob/main/server/server.yml
Locations
${PREFIX}/etc/ntfy/server.yml
config
Basics
# ${PREFIX}/etc/ntfy/server.yml base-url: https://foo.com # cache messages (for inconsistent internet connections like phone) cache-file: /var/cache/ntfy/cache.db cache-duration: 12h # require basic-auth or token-auth auth-file: /var/lib/ntfy/user.db auth-default-access: deny-all # use "X-Forwarded-For" to identify unique visitors when rate-limiting behind-proxy: true # expose scrapable endpoint for prometheus enable-metrics: true metrics-listen-http: 10.0.1.1:9090
Components
Access Control
# ${PREFIX}/etc/ntfy/server.yml auth-file: /var/lib/ntfy/user.db auth-default-access: deny-allntfy user # manage users from cli ntfy user add --role=admin phil # create a user w/ admin roleToken Auth
ntfy token # manage tokens ntfy token add --expires=30d --label="backups" phil # create token for user 'phil'