Ntfy configuration: Difference between revisions
From wikinotes
(Created page with "A self hosted pub/sub server wtih a FOSS app (iOS/android) that will issue push notifications. = Documentation = <blockquote> {| class="wikitable" |- | official docs || https://docs.ntfy.sh/ |- | sample config || https://github.com/binwiederhier/ntfy/blob/main/server/server.yml |- |} </blockquote><!-- Documentation --> = Locations = <blockquote> {| class="wikitable" |- | <code>${PREFIX}/etc/ntfy/server.yml</code> || config |- |} </blockquote><!-- Locations -->") |
No edit summary |
||
Line 1: | Line 1: | ||
A self hosted pub/sub server wtih a FOSS app (iOS/android) that will issue push notifications. | 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 = | = Documentation = | ||
Line 20: | Line 24: | ||
|} | |} | ||
</blockquote><!-- Locations --> | </blockquote><!-- Locations --> | ||
= Basics = | |||
<blockquote> | |||
<syntaxhighlight lang="yaml"> | |||
# ${PREFIX}/etc/ntfy/server.yml | |||
# cache messages (for inconsistent internet connections like phone) | |||
cache-file: /var/lib/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 | |||
</syntaxhighlight> | |||
</blockquote><!-- Basics --> | |||
= Components = | |||
<blockquote> | |||
== Access Control == | |||
<blockquote> | |||
<syntaxhighlight lang="yaml"> | |||
# ${PREFIX}/etc/ntfy/server.yml | |||
auth-file: /var/lib/ntfy/user.db | |||
auth-default-access: deny-all | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="bash"> | |||
ntfy user # manage users from cli | |||
ntfy user add --role=admin phil # create a user w/ admin role | |||
</syntaxhighlight> | |||
</blockquote><!-- Access Control --> | |||
== Token Auth == | |||
<blockquote> | |||
<syntaxhighlight lang="bash"> | |||
ntfy token # manage tokens | |||
ntfy token add --expires=30d --label="backups" phil # create token for user 'phil' | |||
</syntaxhighlight> | |||
</blockquote><!-- Token Auth --> | |||
</blockquote><!-- Components --> |
Revision as of 00:47, 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 # cache messages (for inconsistent internet connections like phone) cache-file: /var/lib/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
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'