Advanced Search
Search Results
24 total results found
Snippets
Linux - RHEL based
Ansible
ntfy.sh
PowerDNS + PDNadmin
Filtering tips
Formatting
Installation Rocky Linux
Configuration
Access control
Proxy
Filter based on attribute
This is very useful for selecting data from a very large list. For instance, if you have a very lost list of users and you only want to apply a task for users in the group admins. This is war more time efficient, than looping over the complete list, skipping o...
Code block setup
As preferred by ansible-lint, it adds readability to the blocks: - name: Some descriptive code block when: # when after name - role_value_is true block: - name: Some subtask in the block ansible.bu...
Introduction
Push notifications made easy ntfy (pronounced notify) is a simple HTTP-based pub-sub notification service. It allows you to send notifications to your phone or desktop via scripts from any computer, and/or using a REST API. It's infinitely flexible, and 100% ...
Installation with repository
Enable the copr repository for ntfy hosted on fedoraincloud. dnf copr enable cyqsimon/ntfysh Install ntfy dnf install ntfysh
Web Push
Web Push (RFC8030) allows ntfy to receive push notifications, even when the ntfy web app (or even the browser, depending on the platform) is closed. When enabled, the user can enable background notifications for their topics in the wep app under Settings. Once...
Basic Configuration
The most basic settings are base-url (the external URL of the ntfy server), the HTTP/HTTPS listen address (listen-http and listen-https), and socket path (listen-unix). All the other things are additional features. base-url: "http://ntfy.example.com" listen-...
Access Control
By default, the ntfy server is open for everyone, meaning everyone can read and write to any topic (this is how ntfy.sh is configured). To restrict access to your own server, you can optionally configure authentication and authorization. ntfy's auth is implem...
Users and roles
The ntfy user command allows you to add/remove/change users in the ntfy user database, as well as change passwords or roles (user or admin). In practice, you'll often just create one admin user with ntfy user add --role=admin ... and be done with all this (see...
Access control list (ACL)
The access control list (ACL) manages access to topics for non-admin users, and for anonymous access (everyone/*). Each entry represents the access permissions for a user to a specific topic or topic pattern. The ACL can be displayed or modified with the ntfy...
Access Tokens
In addition to username/password auth, ntfy also provides authentication via access tokens. Access tokens are useful to avoid having to configure your password across multiple publishing/subscribing applications. For instance, you may want to use a dedicated t...
Behind a proxy (TLS, etc.)
WarningIf you are running ntfy behind a proxy, you must set the behind-proxy flag. Otherwise, all visitors are rate limited as if they are one. It may be desirable to run ntfy behind a proxy (e.g. nginx, HAproxy or Apache), so you can provide TLS certificates...
TLS/SSL
ntfy supports HTTPS/TLS by setting the listen-https config option. However, if you are behind a proxy, it is recommended that TLS/SSL termination is done by the proxy itself (see below). I highly recommend using certbot. I use it with the dns-route53 plugin, ...
nginx/Apache2/caddy
For your convenience, here's a working config that'll help configure things behind a proxy. Be sure to enable WebSockets by forwarding the Connection and Upgrade headers accordingly. In this example, ntfy runs on :2586 and we proxy traffic to it. We also redi...