binwiederhier / ntfy

Send push notifications to your phone or desktop using PUT/POST
https://ntfy.sh
Apache License 2.0
18.54k stars 729 forks source link

Export/Import subscriped topics or mass subscribe topics, webapp #1201

Closed Proximus888 closed 1 month ago

Proximus888 commented 1 month ago

:bulb: Idea I like to test various browsers, the only problem is that with ntfy I have to resubscribe to all my topics. I would love to have a way to export my settings from ntfy and be able to import them in another browser.

Or to have to option to mass subscribe to topics instead of one-by-one.

:computer: Target components

webapp

wunter8 commented 1 month ago

You have a couple options:

  1. The web app supports syncing subscriptions across devices. If you sign into your account, subscribe to topics, and then sign in on another device, the subscriptions should show up automatically. (It is just the subscription itself that is synced. Previously received messages and their read status will not sync)
  2. If you navigate to the URL of a topic (e.g., https://ntfy.sh/mytopic), it will automatically subscribe to the topic for you. So, you could write a simple bash script or something to load each URL in the browser of your choice
Proximus888 commented 1 month ago
  1. The web app supports syncing subscriptions across devices. If you sign into your account, subscribe to topics, and then sign in on another device, the subscriptions should show up automatically. (It is just the subscription itself that is synced. Previously received messages and their read status will not sync)

I selfhost ntfy, but have not seen that option. I login in a new browser or igconito window and the topics/subscriptions are not synced. Am I missing a setting?

  1. If you navigate to the URL of a topic (e.g., https://ntfy.sh/mytopic), it will automatically subscribe to the topic for you. So, you could write a simple bash script or something to load each URL in the browser of your choice

Thanks, didn't know that worked. Will try it out with zen-browser.

wunter8 commented 1 month ago

You need to set enable-login: true in server.yml (or the equivalent env variables for docker). If you don't set that, you can still "add users" in the web app to authenticate with one or more ntfy servers. I'm pretty sure that's what you've done so far.

With enable-login, it will let you sign in to and manage your account on your particular server (but you cannot "login" to another server from yours). There will be a "login" (or "sign in") button in the top right corner of the web app.

I know the distinction between "adding a user" to the web app and "signing in to your account" is a bit confusing

Proximus888 commented 1 month ago

You need to set enable-login: true in server.yml (or the equivalent env variables for docker). If you don't set that, you can still "add users" in the web app to authenticate with one or more ntfy servers. I'm pretty sure that's what you've done so far.

With enable-login, it will let you sign in to and manage your account on your particular server (but you cannot "login" to another server from yours). There will be a "login" (or "sign in") button in the top right corner of the web app.

I know the distinction between "adding a user" to the web app and "signing in to your account" is a bit confusing

Thanks, that solved my issue, didn't know it was an option.

I always went to settings and under 'Manage users' I added my user.

Now with login my subscriptions follow wherever I login. Why is that not the default behavior?

wunter8 commented 1 month ago

Some people use ntfy without any kind of account. Some people set up their server so everything is read-write and you just need to know the topic to subscribe/publish (like the public ntfy.sh instance). It makes things easier when using curl, for example, so you don't need to worry about any credentials. Basically it's just user preference, so it's included as an option. Also, the subscription sync portion (separate from the account portion) was added semi-recently. When ntfy started, subscription sync wasn't available at all