server.yml 8.4 KB

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