NX Addons

NX Notif

by NX · notif
Official

Tells your users about their accounts — expiry and traffic notices, renewals, and your own messages to one user or a group — over Telegram, Bale, SMS, email or any HTTP API, through the first channel that reaches each user.

Install

By hand

On the server the addon will live on, as root:

As a service (no Docker)

curl -fsSL https://raw.githubusercontent.com/nx-panel/notif/v0.4.1/install.sh -o install.sh
sh install.sh --method script --version v0.4.1 \
  --opt port=8097 \
  --opt database=sqlite \
  --opt admin_username=admin \
  --opt admin_password=<admin_password> \
  --opt https=panel \
  --panel-url https://<your-panel>

With Docker

curl -fsSL https://raw.githubusercontent.com/nx-panel/notif/v0.4.1/install.sh -o install.sh
sh install.sh --method docker --version v0.4.1 \
  --opt port=8097 \
  --opt database=sqlite \
  --opt admin_username=admin \
  --opt admin_password=<admin_password> \
  --opt https=panel \
  --panel-url https://<your-panel>

Then open Addons → Register a signed addon in your panel and enter the addon's address and the claim code it shows.

Install options

OptionTypeDefault
Port
Notif listens here. With HTTPS on, this one port serves it and nothing plain: the public address names it (443 for acme).
NX_OPT_PORT
port8097
Admin path
Notif's admin, its API and the panel's calls are all under this path; the root answers nothing. A random one keeps scanners off it. Empty: the root.
NX_OPT_BASE_PATH
path—
Database
NX_OPT_DATABASE
choice: sqlite | postgressqlite
PostgreSQL connection
NX_OPT_DATABASE_DSN
secret—required · only when database = postgres
Admin username
NX_OPT_ADMIN_USERNAME
stringadmin
Admin password
NX_OPT_ADMIN_PASSWORD
password—required
Notif's public address
Where you open Notif, scheme, host and port only, e.g. https://notif.example.com:8097; the admin path goes after it. With HTTPS on it is needed now and names Notif's port (none means 443).
NX_OPT_PUBLIC_URL
url—
HTTPS certificate
panel: one of the panel's certificates, renewed by the panel, on any port. acme: a free certificate; the port is 443. acme-http: the same on any port, the CA asking on port 80. self-signed: Notif's own; the panel shows it to trust. off: plain HTTP, for a proxy of yours.
NX_OPT_HTTPS
choice: panel | acme | acme-http | self-signed | offpanel
Allowed bot proxies
Proxies a bot channel may use wherever they are, host:port, comma-separated: this server 127.0.0.1:10808, the docker host host.docker.internal:10808 (in docker 127.0.0.1 is the container), a LAN address. Any other bot proxy must be an address its channel may reach.
NX_OPT_LOCAL_PROXIES
string—

What it asks of your panel

PermissionWhy
users:readto read the accounts it tells about: their contact details, expiry and traffic
users:writeto keep in an account's contact card the Telegram, Bale, Soroush Plus and Rubika chats its user links and the ntfy topic the admin turns on, and take them away when the user stops a bot

Events it hears

panel.addon_removedpanel.restore_applieduser.createduser.activateduser.first_fetchuser.reneweduser.enableduser.disableduser.expireduser.quota_reacheduser.device_limit_reacheduser.deleteduser.bulkuser.generated