home.html 9.1 KB

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