NTFY
- Source: https://github.com/binwiederhier/ntfy
- License: Apache 2.0 / GPLv2
- Alternatives: Gotify, Pushover, Apprise, Pushbullet
Simple HTTP-based pub-sub notification service. Send notifications to your phone or desktop via scripts.
Features
- Simple HTTP API: Send notifications with simple HTTP POST requests
- Authentication: User authentication and access control
- Multiple Topics: Organized notification topics
- Mobile Apps: Native apps for Android and iOS
- Web Interface: Browser-based interface for managing notifications
Getting Started
- Copy
.env.exampleto.envand update variables - Copy
server.yml.exampletoserver.yml - Generate password hashes/tokens (see below)
- Run
docker-compose up -d
User Setup
Compute password hash for admin
echo -n 'YourAdminPass' | docker run --rm -i httpd:2-alpine htpasswd -niB pick_a_name
Compute password hash for bot
echo -n 'MyS3cret' | docker run --rm -i httpd:2-alpine htpasswd -niB bot
Generate bot token
echo "tk_$(tr -dc 'a-z0-9' </dev/urandom | head -c 29)"
API Usage
Simple Notification
curl -d "Backup completed successfully" \
-H "Authorization: Bearer tk_REPLACE_BOT_TOKEN" \
http://localhost:36880/exist/backup
Services
| Endpoint | URL |
|---|---|
| Web Interface | http://localhost:36880 |
| API | http://localhost:36880/{topic} |
| Health Check | http://localhost:36880/v1/health |
Debugging
# List users
docker exec -it ntfy ntfy user list