server.yml 7.0 KB

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