Files
CoreControl/docs/.vitepress/dist/assets/notifications_Ntfy.md.BPwrZ9j5.js
headlesdev 94ba5e20c6 Revert "cleanup v2"
This reverts commit 8b82578809.
2025-05-17 12:31:27 +02:00

6 lines
6.3 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{_ as i,c as t,o as a,ag as e}from"./chunks/framework.DPDPlp3K.js";const g=JSON.parse('{"title":"ntfy Notification Setup","description":"","frontmatter":{},"headers":[],"relativePath":"notifications/Ntfy.md","filePath":"notifications/Ntfy.md","lastUpdated":1745963518000}'),n={name:"notifications/Ntfy.md"};function l(h,s,o,p,k,r){return a(),t("div",null,s[0]||(s[0]=[e(`<h1 id="ntfy-notification-setup" tabindex="-1">ntfy Notification Setup <a class="header-anchor" href="#ntfy-notification-setup" aria-label="Permalink to &quot;ntfy Notification Setup&quot;"></a></h1><p>To enable ntfy notifications, you need the following:</p><ul><li><p><strong>ntfy URL</strong><br> The base URL of your ntfy server including the topic (e.g., <code>https://ntfy.example.com/alerts</code>)</p></li><li><p><strong>ntfy Token</strong><br> An access token for authentication, generated per user</p></li></ul><h2 id="how-to-get-the-ntfy-url-and-token" tabindex="-1">How to get the ntfy URL and Token <a class="header-anchor" href="#how-to-get-the-ntfy-url-and-token" aria-label="Permalink to &quot;How to get the ntfy URL and Token&quot;"></a></h2><ol><li><p><strong>Install and set up your ntfy server</strong> (self-hosted or use <code>https://ntfy.sh</code>)</p></li><li><p><strong>Choose a topic name</strong> (e.g. <code>alerts</code>) and include it in the URL:<br><code>https://&lt;your-ntfy-server&gt;/&lt;your-topic&gt;</code></p></li><li><p><strong>Create a user (if not already created)</strong></p></li><li><p><strong>Generate a token for the user</strong> using the following command:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ntfy</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> token</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> add</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --expires=30d</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --label=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;notifications&quot;</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">usernam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">e</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span></span></code></pre></div></li><li><p><strong>List existing tokens</strong> to get the full token string:</p><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ntfy</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> token</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> list</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> &lt;</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">usernam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">e</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">&gt;</span></span></code></pre></div></li><li><p><strong>Use the token</strong> as a bearer token when sending messages, either in the Authorization header or in your tool&#39;s configuration.</p></li></ol><h2 id="example-token-management-commands" tabindex="-1">Example Token Management Commands <a class="header-anchor" href="#example-token-management-commands" aria-label="Permalink to &quot;Example Token Management Commands&quot;"></a></h2><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ntfy</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> token</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> list</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Show all tokens</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ntfy</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> token</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> list</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> alice</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Show tokens for user &#39;alice&#39;</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ntfy</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> token</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> add</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> alice</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Create token for user &#39;alice&#39; (never expires)</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ntfy</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> token</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> add</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --expires=2d</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> bob</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Create token for &#39;bob&#39;, expires in 2 days</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">ntfy</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> token</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> remove</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> alice</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> tk_...</span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> # Delete a token</span></span></code></pre></div><p>More information at <a href="https://docs.ntfy.sh/config/#access-tokens" target="_blank" rel="noreferrer">the ntfy docs</a></p>`,8)]))}const c=i(n,[["render",l]]);export{g as __pageData,c as default};