index.gohtml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  1. {{- /*gotype: heckel.io/ntfy/server.indexPage*/ -}}
  2. <!DOCTYPE html>
  3. <html lang="en">
  4. <head>
  5. <meta charset="UTF-8">
  6. <title>ntfy.sh | Send push notifications to your phone via PUT/POST</title>
  7. <link rel="stylesheet" href="static/css/app.css" type="text/css">
  8. <!-- Mobile view -->
  9. <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
  10. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  11. <meta name="HandheldFriendly" content="true">
  12. <!-- Mobile browsers, background color -->
  13. <meta name="theme-color" content="#317f6f">
  14. <meta name="msapplication-navbutton-color" content="#317f6f">
  15. <meta name="apple-mobile-web-app-status-bar-style" content="#317f6f">
  16. <!-- Favicon, see favicon.io -->
  17. <link rel="icon" type="image/png" href="static/img/favicon.png">
  18. <!-- Previews in Google, Slack, WhatsApp, etc. -->
  19. <meta property="og:type" content="website" />
  20. <meta property="og:locale" content="en_US" />
  21. <meta property="og:site_name" content="ntfy.sh" />
  22. <meta property="og:title" content="ntfy.sh | Send push notifications to your phone or desktop via PUT/POST" />
  23. <meta property="og:description" content="ntfy is a simple HTTP-based pub-sub notification service. It allows you to send desktop notifications via scripts from any computer, entirely without signup or cost. Made with ❤ by Philipp C. Heckel, Apache License 2.0, source at https://heckel.io/ntfy." />
  24. <meta property="og:image" content="/static/img/ntfy.png" />
  25. <meta property="og:url" content="https://ntfy.sh" />
  26. </head>
  27. <body>
  28. <nav id="header">
  29. <div id="headerBox">
  30. <img id="logo" src="static/img/ntfy.png" alt="logo"/>
  31. <div id="name">ntfy</div>
  32. <ol>
  33. <li><a href="docs/">Getting started</a></li>
  34. <li><a href="docs/subscribe/phone/">Android/iOS</a></li>
  35. <li><a href="docs/publish/">API</a></li>
  36. <li><a href="docs/install/">Self-hosting</a></li>
  37. <li><a href="https://github.com/binwiederhier/ntfy">GitHub</a></li>
  38. </ol>
  39. </div>
  40. </nav>
  41. <div id="main">
  42. <h1>Send push notifications to your phone or desktop via PUT/POST</h1>
  43. <p>
  44. <b>ntfy</b> (pronounce: <i>notify</i>) is a simple HTTP-based <a href="https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern">pub-sub</a> notification service.
  45. It allows you to send notifications to your phone or desktop via scripts from any computer,
  46. entirely <b>without signup, cost or setup</b>. It's also <a href="https://github.com/binwiederhier/ntfy">open source</a> if you want to run your own.
  47. </p>
  48. <div id="screenshots">
  49. <a href="static/img/screenshot-curl.png"><img src="static/img/screenshot-curl.png"/></a>
  50. <a href="static/img/screenshot-web-detail.png"><img src="static/img/screenshot-web-detail.png"/></a>
  51. <span class="nowrap">
  52. <a href="static/img/screenshot-phone-main.jpg"><img src="static/img/screenshot-phone-main.jpg"/></a>
  53. <a href="static/img/screenshot-phone-detail.jpg"><img src="static/img/screenshot-phone-detail.jpg"/></a>
  54. <a href="static/img/screenshot-phone-notification.jpg"><img src="static/img/screenshot-phone-notification.jpg"/></a>
  55. </span>
  56. </div>
  57. <h2 id="publish" class="anchor">Publishing messages</h2>
  58. <p>
  59. <a href="docs/publish/">Publishing messages</a> can be done via PUT or POST. Topics are created on the fly by subscribing or publishing to them.
  60. Because there is no sign-up, <b>the topic is essentially a password</b>, so pick something that's not easily guessable.
  61. </p>
  62. <p class="smallMarginBottom">
  63. Here's an example showing how to publish a message using a POST request (via <tt>curl -d</tt>):
  64. </p>
  65. <code>
  66. curl -d "Backup successful 😀" <span class="ntfyUrl">ntfy.sh</span>/mytopic
  67. </code>
  68. <p class="smallMarginBottom">
  69. There are <a href="docs/publish/">more features</a> related to publishing messages: You can set a
  70. <a href="docs/publish/#message-priority">notification priority</a>, a <a href="docs/publish/#message-title">title</a>,
  71. and <a href="docs/publish/#tags-emojis">tag messages</a>.
  72. Here's an example using some of them together:
  73. </p>
  74. <code>
  75. curl \<br/>
  76. &nbsp;&nbsp;-H "Title: Unauthorized access detected" \<br/>
  77. &nbsp;&nbsp;-H "Priority: urgent" \<br/>
  78. &nbsp;&nbsp;-H "Tags: warning,skull" \<br/>
  79. &nbsp;&nbsp;-d "Remote access to $(hostname) detected. Act right away." \<br/>
  80. &nbsp;&nbsp;<span class="ntfyUrl">ntfy.sh</span>/mytopic
  81. </code>
  82. <p>
  83. Here's what that looks like in the <a href="docs/subscribe/phone/">Android app</a>:
  84. </p>
  85. <figure>
  86. <img src="static/img/priority-notification.png" style="max-height: 200px"/>
  87. <figcaption>Urgent notification with pop-over</figcaption>
  88. </figure>
  89. <h2 id="subscribe" class="anchor">Subscribe to a topic</h2>
  90. <p>
  91. You can create and subscribe to a topic either <a href="docs/subscribe/phone/">using your phone</a>,
  92. in <a href="docs/subscribe/web/">this web UI</a>, or in your own app by <a href="docs/subscribe/api/">subscribing via the API</a>.
  93. </p>
  94. <h3 id="subscribe-phone" class="anchor">Subscribe from your phone</h3>
  95. <p>
  96. Simply get the app and start <a href="docs/publish/">publishing messages</a>. To learn more about the app,
  97. <a href="docs/subscribe/phone/">check out the documentation</a>.
  98. </p>
  99. <p>
  100. <a href="https://play.google.com/store/apps/details?id=io.heckel.ntfy"><img src="static/img/badge-googleplay.png"></a>
  101. <a href="https://f-droid.org/en/packages/io.heckel.ntfy/"><img src="static/img/badge-fdroid.png"></a>
  102. <a href="https://github.com/binwiederhier/ntfy/issues/4"><img src="static/img/badge-appstore.png"></a>
  103. </p>
  104. <p>
  105. Here's a video showing the app in action:
  106. </p>
  107. <figure>
  108. <video controls muted autoplay loop src="static/img/android-video-overview.mp4" style="max-width: 650px"></video>
  109. <figcaption>Sending push notifications to your Android phone</figcaption>
  110. </figure>
  111. <h3 id="subscribe-web" class="anchor">Subscribe via web app</h3>
  112. <p>
  113. Subscribe to topics here and receive messages as <b>desktop notification</b>. Topics are not password-protected,
  114. so choose a name that's not easy to guess.
  115. </p>
  116. <h3 id="subscribe-api" class="anchor">Subscribe using the API</h3>
  117. <p>
  118. There's a super simple API that you can use to integrate your own app. You can consume
  119. a <a href="docs/subscribe/api/#subscribe-as-json-stream">JSON stream</a>,
  120. an <a href="docs/subscribe/api/#subscribe-as-sse-stream">SSE/EventSource stream</a> (useful for web apps),
  121. as well as a <a href="docs/subscribe/api/#subscribe-as-raw-stream">plain text stream</a>.
  122. </p>
  123. <p class="smallMarginBottom">
  124. Here's an example for JSON. The <b>connection stays open</b>, so you can retrieve messages as they come in:
  125. </p>
  126. <code>
  127. $ curl -s <span class="ntfyUrl">ntfy.sh</span>/mytopic/json<br/>
  128. {"id":"SLiKI64DOt","time":1635528757,"event":"open","topic":"mytopic"}<br/>
  129. {"id":"hwQ2YpKdmg","time":1635528741,"event":"message","topic":"mytopic","message":"Hi!"}<br/>
  130. {"id":"DGUDShMCsc","time":1635528787,"event":"keepalive","topic":"mytopic"}<br/>
  131. ...
  132. </code>
  133. <p>
  134. Here's a short video demonstrating it in action:
  135. </p>
  136. <figure>
  137. <video controls muted autoplay loop src="static/img/android-video-subscribe-api.mp4" style="max-width: 650px"></video>
  138. <figcaption>Subscribing to the JSON stream with <tt>curl</tt></figcaption>
  139. </figure>
  140. <h3 id="docs" class="anchor">Check out the docs!</h3>
  141. <p>
  142. ntfy has so many more features and you can learn about all of them <a href="docs/">in the documentation</a>
  143. (I tried my very best to make it the best docs ever 😉, not sure if I succeeded, hehe).
  144. </p>
  145. <figure>
  146. <a href="docs/"><img width="100%" src="static/img/screenshot-docs.png"/></a>
  147. <figcaption>Check out the documentation</figcaption>
  148. </figure>
  149. <h3 id="free-software" class="anchor">100% open source &amp; forever free</h3>
  150. <p>
  151. I love free software, and I'm doing this because it's fun. I have no bad intentions, and I will
  152. never monetize or sell your information. This service will always stay
  153. <a href="https://github.com/binwiederhier/ntfy">free and open</a>.
  154. You can read more in the <a href="docs/faq/">FAQs</a> and in the <a href="docs/privacy/">privacy policy</a>.
  155. </p>
  156. <center id="ironicCenterTagDontFreakOut"><i>Made with ❤️ by <a href="https://heckel.io">Philipp C. Heckel</a></i></center>
  157. </div>
  158. <div id="lightbox" class="lightbox"></div>
  159. <script src="static/js/emoji.js"></script>
  160. <script src="static/js/app.js"></script>
  161. </body>
  162. </html>