server.yml 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. # ntfy server config file
  2. #
  3. # Please refer to the documentation at https://ntfy.sh/docs/config/ for details.
  4. # All options also support underscores (_) instead of dashes (-) to comply with the YAML spec.
  5. # Public facing base URL of the service (e.g. https://ntfy.sh or https://ntfy.example.com)
  6. # This setting is currently only used by attachments, e-mail sending (outgoing mail only), as well
  7. # as in combination with upstream-base-url (for iOS push notifications for self-hosted servers).
  8. #
  9. # base-url:
  10. # Listen address for the HTTP & HTTPS web server. If "listen-https" is set, you must also
  11. # set "key-file" and "cert-file". Format: [<ip>]:<port>, e.g. "1.2.3.4:8080".
  12. #
  13. # To listen on all interfaces, you may omit the IP address, e.g. ":443".
  14. # To disable HTTP, set "listen-http" to "-".
  15. #
  16. # listen-http: ":80"
  17. # listen-https:
  18. # Listen on a Unix socket, e.g. /var/lib/ntfy/ntfy.sock
  19. # This can be useful to avoid port issues on local systems, and to simplify permissions.
  20. #
  21. # listen-unix: <socket-path>
  22. # Path to the private key & cert file for the HTTPS web server. Not used if "listen-https" is not set.
  23. #
  24. # key-file: <filename>
  25. # cert-file: <filename>
  26. # If set, also publish messages to a Firebase Cloud Messaging (FCM) topic for your app.
  27. # This is optional and only required to save battery when using the Android app.
  28. #
  29. # firebase-key-file: <filename>
  30. # If set, messages are cached in a local SQLite database instead of only in-memory. This
  31. # allows for service restarts without losing messages in support of the since= parameter.
  32. #
  33. # The "cache-duration" parameter defines the duration for which messages will be buffered
  34. # before they are deleted. This is required to support the "since=..." and "poll=1" parameter.
  35. # To disable the cache entirely (on-disk/in-memory), set "cache-duration" to 0.
  36. # The cache file is created automatically, provided that the correct permissions are set.
  37. #
  38. # Debian/RPM package users:
  39. # Use /var/cache/ntfy/cache.db as cache file to avoid permission issues. The package
  40. # creates this folder for you.
  41. #
  42. # Check your permissions:
  43. # If you are running ntfy with systemd, make sure this cache file is owned by the
  44. # ntfy user and group by running: chown ntfy.ntfy <filename>.
  45. #
  46. # cache-file: <filename>
  47. # cache-duration: "12h"
  48. # If set, access to the ntfy server and API can be controlled on a granular level using
  49. # the 'ntfy user' and 'ntfy access' commands. See the --help pages for details, or check the docs.
  50. #
  51. # - auth-file is the SQLite user/access database; it is created automatically if it doesn't already exist
  52. # - auth-default-access defines the default/fallback access if no access control entry is found; it can be
  53. # set to "read-write" (default), "read-only", "write-only" or "deny-all".
  54. #
  55. # Debian/RPM package users:
  56. # Use /var/lib/ntfy/user.db as user database to avoid permission issues. The package
  57. # creates this folder for you.
  58. #
  59. # Check your permissions:
  60. # If you are running ntfy with systemd, make sure this user database file is owned by the
  61. # ntfy user and group by running: chown ntfy.ntfy <filename>.
  62. #
  63. # auth-file: <filename>
  64. # auth-default-access: "read-write"
  65. # If set, the X-Forwarded-For header is used to determine the visitor IP address
  66. # instead of the remote address of the connection.
  67. #
  68. # WARNING: If you are behind a proxy, you must set this, otherwise all visitors are rate limited
  69. # as if they are one.
  70. #
  71. # behind-proxy: false
  72. # If enabled, clients can attach files to notifications as attachments. Minimum settings to enable attachments
  73. # are "attachment-cache-dir" and "base-url".
  74. #
  75. # - attachment-cache-dir is the cache directory for attached files
  76. # - attachment-total-size-limit is the limit of the on-disk attachment cache directory (total size)
  77. # - attachment-file-size-limit is the per-file attachment size limit (e.g. 300k, 2M, 100M)
  78. # - attachment-expiry-duration is the duration after which uploaded attachments will be deleted (e.g. 3h, 20h)
  79. #
  80. # attachment-cache-dir:
  81. # attachment-total-size-limit: "5G"
  82. # attachment-file-size-limit: "15M"
  83. # attachment-expiry-duration: "3h"
  84. # If enabled, allow outgoing e-mail notifications via the 'X-Email' header. If this header is set,
  85. # messages will additionally be sent out as e-mail using an external SMTP server. As of today, only
  86. # SMTP servers with plain text auth and STARTLS are supported. Please also refer to the rate limiting settings
  87. # below (visitor-email-limit-burst & visitor-email-limit-burst).
  88. #
  89. # - smtp-sender-addr is the hostname:port of the SMTP server
  90. # - smtp-sender-user/smtp-sender-pass are the username and password of the SMTP user
  91. # - smtp-sender-from is the e-mail address of the sender
  92. #
  93. # smtp-sender-addr:
  94. # smtp-sender-user:
  95. # smtp-sender-pass:
  96. # smtp-sender-from:
  97. # If enabled, ntfy will launch a lightweight SMTP server for incoming messages. Once configured, users can send
  98. # emails to a topic e-mail address to publish messages to a topic.
  99. #
  100. # - smtp-server-listen defines the IP address and port the SMTP server will listen on, e.g. :25 or 1.2.3.4:25
  101. # - smtp-server-domain is the e-mail domain, e.g. ntfy.sh
  102. # - smtp-server-addr-prefix is an optional prefix for the e-mail addresses to prevent spam. If set to "ntfy-",
  103. # for instance, only e-mails to ntfy-$topic@ntfy.sh will be accepted. If this is not set, all emails to
  104. # $topic@ntfy.sh will be accepted (which may obviously be a spam problem).
  105. #
  106. # smtp-server-listen:
  107. # smtp-server-domain:
  108. # smtp-server-addr-prefix:
  109. # Interval in which keepalive messages are sent to the client. This is to prevent
  110. # intermediaries closing the connection for inactivity.
  111. #
  112. # Note that the Android app has a hardcoded timeout at 77s, so it should be less than that.
  113. #
  114. # keepalive-interval: "45s"
  115. # Interval in which the manager prunes old messages, deletes topics
  116. # and prints the stats.
  117. #
  118. # manager-interval: "1m"
  119. # Defines if the root route (/) is pointing to the landing page (as on ntfy.sh) or the
  120. # web app. If you self-host, you don't want to change this.
  121. # Can be "app" (default), "home" or "disable" to disable the web app entirely.
  122. #
  123. # web-root: app
  124. # Server URL of a Firebase/APNS-connected ntfy server (likely "https://ntfy.sh").
  125. #
  126. # iOS users:
  127. # If you use the iOS ntfy app, you MUST configure this to receive timely notifications. You'll like want this:
  128. # upstream-base-url: "https://ntfy.sh"
  129. #
  130. # If set, all incoming messages will publish a "poll_request" message to the configured upstream server, containing
  131. # the message ID of the original message, instructing the iOS app to poll this server for the actual message contents.
  132. # This is to prevent the upstream server and Firebase/APNS from being able to read the message.
  133. #
  134. # upstream-base-url:
  135. # Rate limiting: Total number of topics before the server rejects new topics.
  136. #
  137. # global-topic-limit: 15000
  138. # Rate limiting: Number of subscriptions per visitor (IP address)
  139. #
  140. # visitor-subscription-limit: 30
  141. # Rate limiting: Allowed GET/PUT/POST requests per second, per visitor:
  142. # - visitor-request-limit-burst is the initial bucket of requests each visitor has
  143. # - visitor-request-limit-replenish is the rate at which the bucket is refilled
  144. # - visitor-request-limit-exempt-hosts is a comma-separated list of hostnames and IPs to be
  145. # exempt from request rate limiting; hostnames are resolved at the time the server is started
  146. #
  147. # visitor-request-limit-burst: 60
  148. # visitor-request-limit-replenish: "5s"
  149. # visitor-request-limit-exempt-hosts: ""
  150. # Rate limiting: Allowed emails per visitor:
  151. # - visitor-email-limit-burst is the initial bucket of emails each visitor has
  152. # - visitor-email-limit-replenish is the rate at which the bucket is refilled
  153. #
  154. # visitor-email-limit-burst: 16
  155. # visitor-email-limit-replenish: "1h"
  156. # Rate limiting: Attachment size and bandwidth limits per visitor:
  157. # - visitor-attachment-total-size-limit is the total storage limit used for attachments per visitor
  158. # - visitor-attachment-daily-bandwidth-limit is the total daily attachment download/upload traffic limit per visitor
  159. #
  160. # visitor-attachment-total-size-limit: "100M"
  161. # visitor-attachment-daily-bandwidth-limit: "500M"
  162. # Log level, can be TRACE, DEBUG, INFO, WARN or ERROR
  163. # This option can be hot-reloaded by calling "kill -HUP $pid" or "systemctl reload ntfy".
  164. #
  165. # Be aware that DEBUG (and particularly TRACE) can be VERY CHATTY. Only turn them on for
  166. # debugging purposes, or your disk will fill up quickly.
  167. #
  168. # log-level: INFO