mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-05-09 08:26:00 +02:00
[GH-ISSUE #800] PWA Docker #566
Labels
No labels
ai-generated
android-app
android-app
android-app
🪲 bug
build
build
dependencies
docs
enhancement
enhancement
🔥 HOT
in-progress 🏃
ios
prio:low
prio:low
pull-request
question
🔒 security
server
server
unified-push
web-app
website
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/ntfy#566
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mmojadad on GitHub (Jul 1, 2023).
Original GitHub issue: https://github.com/binwiederhier/ntfy/issues/800
Hello
I am usinf ntfy in docker via persistent cache mode.
What will be steps to enable progressive web app (PWA), What exact command i must to use to generate VAPID keys?
@nimbleghost commented on GitHub (Jul 1, 2023):
Hi @mmojadad, please follow the instructions here: https://docs.ntfy.sh/config/#web-push
You can generate the keys like this:
Then copy them to your config file. Don't forget to also add a
base-urlalong with the generate values if you don't have one already.(That command just runs a new container since the webpush keys command doesn't depend on anything else. You can also run commands against an existing container or definition (e.g.
docker compose exec <service name> ntfy webpush keysordocker exec <container> ntfy webpush keys) but I don't know your setup.)@nimbleghost commented on GitHub (Jul 1, 2023):
@gedw99 what do you mean :D
I think the trouble with config web UIs is that you either make the config part of the database, or need to have a way to restart the server itself to reload the new files + have to make sure configs are writeable etc. I think it's not really worth the effort for minimal gain, especially since people hosting ntfy are running their own servers and shouldn't have trouble figuring out some YAML/commands
@mmojadad commented on GitHub (Jul 2, 2023):
@nimbleghost Thank you!
I did it but still PWA not showing, My installation environment is as following:
persistent cache (configured as command line arguments):
docker run
-v /var/cache/ntfy:/var/cache/ntfy
-p 80:80
-it
binwiederhier/ntfy
serve
--cache-file /var/cache/ntfy/cache.db
I am using Portainer and after generate keys i edit and add environment variables followings to the container :
web-push-public-key : ///
web-push-private-key : ///
web-push-file : /var/cache/ntfy/webpush.db
web-push-email-address : myemail@gmail.com
base-url : https://mydomain.com
@nimbleghost commented on GitHub (Jul 2, 2023):
You're probably mixing up the key for the config file and the env vars. If you want to set them up as environment variables you need to use the equivalents1, for example
NTFY_WEB_PUSH_PUBLIC_KEY. Look at the list for the rest.https://docs.ntfy.sh/config/#config-options ↩︎
@mmojadad commented on GitHub (Jul 2, 2023):
@binwiederhier Thank you for corrections, Yes i fixed the keys and now its working fine :)