diff --git a/ntfy/README.md b/ntfy/README.md index ffa6b8b..b5e1539 100644 --- a/ntfy/README.md +++ b/ntfy/README.md @@ -5,6 +5,8 @@ ntfy With ntfy, you can **send notifications to your phone or desktop via scripts** from any computer, **without having to sign up or pay any fees**. +## up and running + ```bash $ mkdir -p data/{etc,log,var} $ docker compose up -d @@ -15,10 +17,28 @@ $ docker compose exec nify sh >>> ntfy access pi test rw >>> ntfy access '*' test ro >>> ntfy access ->>> ntfy token add --expires=1w --label=pi5 pi ->>> ntfy token add --expires=1y --label=iphone kev +>>> ntfy token add --expires=30d --label=pi5 pi +>>> ntfy token add --expires=90d --label=win kev >>> ntfy token list >>> exit +$ curl http://127.0.0.1:2586 +``` + +## client setup + +- Linux: ~/.config/ntfy/client.yml +- MacOS: ~/Library/Application Support/ntfy/client.yml + +```yaml +default-host: http://127.0.0.1:2586 +default-user: kev +default-password: "******" +#default-token: "******" +``` + +```bash +$ ntfy sub test +$ ntfy pub test "This is a message" ``` [1]: https://docs.ntfy.sh/config/ diff --git a/ntfy/data/etc/client.yml b/ntfy/data/etc/client.yml new file mode 100644 index 0000000..463e4ca --- /dev/null +++ b/ntfy/data/etc/client.yml @@ -0,0 +1,9 @@ +# +# - https://docs.ntfy.sh/publish/ +# - https://github.com/binwiederhier/ntfy/blob/main/client/client.yml +# + +default-host: "https://ntfy.easypi.duckdns.org" +default-token: +default-user: +default-password: diff --git a/ntfy/data/etc/server.yml b/ntfy/data/etc/server.yml index 02c87d8..f3af06a 100644 --- a/ntfy/data/etc/server.yml +++ b/ntfy/data/etc/server.yml @@ -12,7 +12,7 @@ cache-file: "/var/lib/ntfy/cache.db" attachment-cache-dir: "/var/lib/ntfy/attachments" log-level: "info" log-format: "json" -log-file: "/var/log/ntfy.log" +log-file: "/var/log/ntfy/ntfy.log" #smtp-sender-addr: "email-smtp.us-east-2.amazonaws.com:587" #smtp-sender-user: "AKIDEADBEEFAFFE12345"