| 1 |
.\" SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-only |
| 2 |
.TH NTFY "1" "December 2024" "" "User Commands" |
| 3 |
.SH NAME |
| 4 |
\fBntfy\fR \- Simple pub\-sub notification service |
| 5 |
.SH "SYNOPSIS" |
| 6 |
.nf |
| 7 |
\fIntfy\fR [OPTIONS] |
| 8 |
\fIntfy <COMMAND>\fR [OPTIONS]\fR |
| 9 |
.SH DESCRIPTION |
| 10 |
ntfy \- pronounced "notify" \- is a simple HTTP-based pub-sub notification |
| 11 |
service. |
| 12 |
With ntfy, you can send notifications to your phone or desktop |
| 13 |
via scripts from any computer |
| 14 |
.sp |
| 15 |
.SH COMMANDS |
| 16 |
This program provides both the client and server commands for ntfy. |
| 17 |
Both can be run as services but are usually disabled. |
| 18 |
.sp |
| 19 |
For command-specific options, run \fIntfy <command> \-\-help\fR |
| 20 |
.PP |
| 21 |
.SS CLIENT COMMANDS |
| 22 |
.nf |
| 23 |
\fIpublish\fR [OPTIONS] <topic> [message] |
| 24 |
.RS 4 |
| 25 |
Send message via a ntfy server to a topic |
| 26 |
aliases: \fIsend\fR \fItrigger\fR \fIpub\fR |
| 27 |
.RE |
| 28 |
.PP |
| 29 |
\fIsubscribe\fR [OPTIONS] <[SERVER/]topic> [EXECUTE_COMMAND] |
| 30 |
\fIsubscribe\fR [OPTIONS] --from-config |
| 31 |
.RS 4 |
| 32 |
Subscribe to a topic which could be on a different server. |
| 33 |
If an optional command argument is passed, it will be executed when a message arrives. |
| 34 |
The second form can subscribe to multiple topics from config file\&. |
| 35 |
aliases: \fIsub\fR |
| 36 |
.RE |
| 37 |
.SS "SERVER COMMANDS" |
| 38 |
These are server\-only commands, with the exception of \fIserve\fR. |
| 39 |
They will directly manage the user.db as defined in the server config file server.yml. They require a properly defined 'auth\-file'. |
| 40 |
.sp |
| 41 |
\fIaccess\fR [USERNAME [TOPIC [PERMISSION]]] |
| 42 |
.RS 4 |
| 43 |
Show the access control list, as well as change it, depending on how it is called. |
| 44 |
.nf |
| 45 |
PERMISSION can be one of the following: |
| 46 |
.RS 4 |
| 47 |
read\-write (alias: rw) |
| 48 |
read\-only (aliases: read, ro) |
| 49 |
write\-only (aliases: write, wo) |
| 50 |
deny (alias: none) |
| 51 |
.RE |
| 52 |
Please also refer to the related command \fIuser\fR. |
| 53 |
.RE |
| 54 |
.PP |
| 55 |
\fIserve\fR |
| 56 |
\fIserve\fR \fB\-\-listen\-http\fR :8080 |
| 57 |
.RS 4 |
| 58 |
Run the ntfy server in the foreground (default port 80) |
| 59 |
.RE |
| 60 |
.PP |
| 61 |
\fItier\fR [list|add|change|remove] [OPTIONS] |
| 62 |
.RS 4 |
| 63 |
Manage/show tiers |
| 64 |
The command allows you to add/remove/change tiers in the ntfy user database. Tiers are used |
| 65 |
to grant users higher limits, such as daily message limits, attachment size, or make it |
| 66 |
possible for users to reserve topics. |
| 67 |
.RE |
| 68 |
.PP |
| 69 |
\fItoken\fR <list|add|remove> [OPTIONS] |
| 70 |
.RS 4 |
| 71 |
List, add or delete user tokens which can be used publish, subscribe, or perform any other user\-specific tasks. |
| 72 |
Tokens have full access, and can perform any task a user can do. They are meant to be used to |
| 73 |
avoid spreading the password to various places. |
| 74 |
.sp |
| 75 |
.RE |
| 76 |
.PP |
| 77 |
\fIuser\fR [list|add|remove|change\-pass|change\-role] [OPTIONS] |
| 78 |
.RS 4 |
| 79 |
List/add/remove/change users in the ntfy user database, as well as change passwords or roles. |
| 80 |
Please also refer to the related command \fIaccess\fR. |
| 81 |
.SH "GLOBAL OPTIONS" |
| 82 |
.TP |
| 83 |
\fB\-\-help\fR, \fB\-h\fR |
| 84 |
Shows a list of commands or help for one command |
| 85 |
.sp |
| 86 |
Try 'ntfy COMMAND \fB\-\-help\fR' or https://ntfy.sh/docs/ for more information. |
| 87 |
.IP |
| 88 |
.TP |
| 89 |
\fB\-\-debug\fR, \fB\-d\fR |
| 90 |
enable debug logging (default: false) [$NTFY_DEBUG] |
| 91 |
.TP |
| 92 |
\fB\-\-trace\fR |
| 93 |
enable tracing (very verbose, be careful) (default: false) [$NTFY_TRACE] |
| 94 |
.TP |
| 95 |
\fB\-\-no\-log\-dates\fR, \fB\-\-no_log_dates\fR |
| 96 |
disable the date/time prefix (default: false) [$NTFY_NO_LOG_DATES] |
| 97 |
.TP |
| 98 |
\fB\-\-log\-level\fR value, \fB\-\-log_level\fR value |
| 99 |
set log level (default: "INFO") [$NTFY_LOG_LEVEL] |
| 100 |
.TP |
| 101 |
\fB\-\-log\-level\-overrides\fR value, \fB\-\-log_level_overrides\fR value |
| 102 |
set log level overrides [$NTFY_LOG_LEVEL_OVERRIDES] |
| 103 |
.TP |
| 104 |
\fB\-\-log\-format\fR value, \fB\-\-log_format\fR value |
| 105 |
set log format (default: "text") [$NTFY_LOG_FORMAT] |
| 106 |
.TP |
| 107 |
\fB\-\-log\-file\fR value, \fB\-\-log_file\fR value |
| 108 |
set log file, default is STDOUT [$NTFY_LOG_FILE] |
| 109 |
.SH "ISSUES" |
| 110 |
.nf |
| 111 |
To report a bug, open an issue on GitHub: https://github.com/binwiederhier/ntfy/issues |
| 112 |
If you want to chat, simply join the Discord server (https://discord.gg/cT7ECsZj9w) |
| 113 |
or the Matrix room (https://matrix.to/#/#ntfy:matrix.org). |
| 114 |
.SH "COPYRIGHT" |
| 115 |
Copyright \(co 2022 Philipp C. Heckel, licensed under Apache License 2.0 & GPLv2 |
| 116 |
.SH "AUTHOR" |
| 117 |
Man page written for debian by Ahmad Khalifa. |