Post

ntfy.sh docker service

Local files

1
2
3
4
5
6
7
ntfy
├── cache
│   └──  
├── auth
│		└── user.db 
└── config
    └── server.yml

server.yml

1
2
3
4
5
6
7
8
9
10
11
12
13
base-url: "https://ntfy.xxx.com"
upstream-base-url: "https://ntfy.sh" #iOS push must use this
attachment-cache-dir: "/var/cache/ntfy/attachments"
attachment-total-size-limit: "5G"
attachment-file-size-limit: "15M"
attachment-expiry-duration: "3h"
visitor-attachment-total-size-limit: "100M"
visitor-attachment-daily-bandwidth-limit: "500M"

auth-file: "/var/lib/ntfy/user.db"
auth-default-access: "deny-all"

behind-proxy: true # If you want use nginx or apache proxy by the service, you should use behind-proxy true

docker run

1
docker run -p 4000:80 -v /oss/data/ntfy/cache:/var/cache/ntfy -v /oss/data/ntfy/config:/etc/ntfy -v /oss/data/ntfy/auth:/var/lib/ntfy -d binwiederhier/ntfy serve

create user

1
2
docker exec -it ntfy ntfy user add --role=admin admin # add admin
docker exec -it ntfy ntfy user add test # add user test
This post is licensed under CC BY 4.0 by the author.