Skip to content

Ntfy.tg // A telegram bot to receive messages from ntfy.sh topics

License

Notifications You must be signed in to change notification settings

Sid-Sun/ntfy.tg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ntfy.tg

a telegram bot for subscribing to ntfy.sh topics

What is supported

  • receiving notifications from ntfy.sh topics using the topic name

What is not supported

  • publishing messages to topics from telegram

How to self-host

  • this bot uses "Storage Engine" to persist user data across restarts, you need to host an instance of this - it needs a mongoDB instance, I recommend using MongoDB Atlas if you don't have an instance running
  • the environment variables needed are:
    • APP_ENV=prod - used by logger
    • API_TOKEN - telegram bot API token
    • ADMIN_CHAT_ID -used to notify when subscriber restarts
    • SE_OBJ_ID - object ID / note name to use on Storage Engine
    • SE_OBJ_PASS - object / note password
    • SE_URL - base URL of above hosted API (ex: http://127.0.0.1:3003)
    • NTFY_DOMAIN - just the domain name of ntfy.sh instance (ex: ntfy.sh); one ntfy.tg instance can only support one ntfy.sh instance.
      • The server must support websockets with a trusted TLS certificate
Why do I need to host "Storage Engine"?
  • The bot uses it to store data mapping topic name to user ID, thanks to this library I built on top of the storeage engine API, it is very easy to add a backing store for small things like this. If you want to, you can add a proper store into the code base
  • To get an idea of how easy this was to add, see diff for subscription_manager.go in this commit

About

Ntfy.tg // A telegram bot to receive messages from ntfy.sh topics

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published