Skip to content
On this page
On this page

Push notifications

For providers2.2.0Updated

A provider with the push license feature sends notifications to its Wrabbit 2.2.0 subscribers: manually from the dashboard or through the API, and automatically from Remnawave webhooks — subscription expires soon, has expired, traffic used up. iOS push can be sent only with the app owner's APNs key, so Wrab sends it and you call the API at https://api.wrab.club. Wrabbit 2.1.0 does not receive push.

#How it works

  • After a subscription receives a valid push license, the device registers with Wrab without an account: its APNs token, platform, interface and primary system language, app version, and a dom and sub_hash pair — the SHA-256 of the subscription link. The raw URL, HWID and HWID hash are not included in this registration; the URL hash is sent to address pushes.
  • Address a push to all devices of the domain (target: all) or to subscriptions by sub_hash. You compute the hash for API requests (below). A Remnawave webhook may contain a subscription URL: Wrab computes its hash without storing the raw URL.
  • If the license disappears or expires, the binding is removed on the next subscription refresh and push to that device stops.

#Setup

  1. #A license with the push feature

    A dashboard license carries all five features by default, push included. Tokens issued before 13.11.2026 carried only brand, hide, routing — for push, issue a new one and replace it everywhere. How to get and where to put the token: License and Remnawave setup.

  2. #Verify the domain with a TXT record

    A license can be issued for any domain, and push goes to that domain's subscribers. So before the key is issued you prove the domain is yours: the dashboard section «Пуши» (Push) shows the record name and value; the token is unique to each provider and domain pair.

    Subscription domain DNStext
    _wrabbit-push.YOUR-DOMAIN   TXT   "wrabbit-push=<TOKEN_FROM_DASHBOARD>"
    

    Publish the record first, then press «Проверить запись» (Check record): resolvers cache an early query as “no record” for up to an hour. The record is needed when the key is first issued and when the domain moves from another provider; after that it can be removed.

  3. #Get the wpk_ API key

    Once the record is verified, the dashboard issues a wpk_… key and shows it once. The license is public — it is in the header of every subscription — so the API requires a key only you know. The key is bound to the provider and domain and does not change when the license is renewed; it also renews the license token through the API.

    Header of every push API requestHTTP
    Authorization: Bearer wpk_YOUR_KEY
    # or
    X-Wrab-Push-Key: wpk_YOUR_KEY
    

    Sending from the dashboard does not need the key. To change the key — in the dashboard or POST /v1/provider/push/key with the current key: the old one stops working immediately.

  4. #Choose how to send

#Sending from the dashboard

Dashboard → «Пуши» (Push) → «Отправить» (Send): a title and text in Russian, plus an optional English version and a link to open on tap. Recipients — all subscribers or specific subscribers (a list of sub_hash). Before sending, the dashboard counts how many devices will get the message. Dashboard and API sends appear in the same log and share one daily limit.

#Sending through the API

POST https://api.wrab.club/v1/provider/push/send. Check the recipients without sending first — dry_run does not use the daily limit:

Check without sendingbash
curl -sS -X POST https://api.wrab.club/v1/provider/push/send \
  -H 'Authorization: Bearer wpk_YOUR_KEY' -H 'Content-Type: application/json' \
  -d '{"category":"service","target":"sub","hashes":["<SUB_HASH>"],"body":"Test","dry_run":true}'

# -> {"dry_run":true,"dom":"YOUR-DOMAIN","target_count":1}
Sendbash
curl -sS -X POST https://api.wrab.club/v1/provider/push/send \
  -H 'Authorization: Bearer wpk_YOUR_KEY' -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: renewal-2026-11-30-user-42' \
  -d '{
    "category": "service",
    "target": "sub",
    "hashes": ["<SUB_HASH>"],
    "title": "Plan renewed",
    "body": "Your plan is active until 30 November.",
    "localized": {
      "ru": {"title": "Подписка продлена", "body": "Подписка активна до 30 ноября."},
      "en": {"title": "Plan renewed", "body": "Your plan is active until 30 November."}
    },
    "url": "https://YOUR-SITE/account"
  }'
Main fields
FieldValue
categoryservice — status, billing, maintenance. The API accepts promo, but ads do not reach subscribers: the app has no consent screen
targetsub — addressed, with hashes (1–1000 sub_hash); all — all devices of the domain, without hashes
bodyRequired, up to 300 characters. title — up to 80
localizedTexts for ru and en; a device gets its own language, otherwise title and body
urlWhat to open on tap: https://… or a safe deep link (below), up to 512 bytes
idempotency_keyOr the Idempotency-Key header: a repeat with the same key returns the earlier send instead of creating a new one

The response is 202 with a message_id; a repeat by idempotency_key gives 200 and duplicate: true. target_count is an estimate at queueing time. A device gets the push once even if it has several of your subscriptions. All fields, send statuses, the log, statistics and error codes are in the API reference.

ResponseHTTP
HTTP/1.1 202 Accepted


{"message_id": "…", "status": "queued", "target_count": 1, "duplicate": false}

#Automatic push from Remnawave webhookspush

The panel reports user events, and Wrab turns them into a push to that subscription's devices. Set it up once: dashboard → «Пуши» (Push) → «Автоматические» (Automatic) → «Настроить» (Set up). Choose the events, the provider name for texts, the link to open on tap and optionally your own texts, then save and connect the panel. The dashboard creates the panel secret and shows it once, together with the webhook address and ready .env and notifications-config.yml blocks.

Remnawave 3.x

Panel .envbash
WEBHOOK_ENABLED=true
WEBHOOK_URL=https://YOUR-BOT.example/remnawave-webhook
WEBHOOK_SECRET_HEADER=<WEBHOOK_SECRET>
EXPIRATION_NOTIFICATIONS_ENABLED=true
EXPIRATION_NOTIFICATIONS=[-72,-24]
# only if traffic_threshold is enabled
BANDWIDTH_USAGE_NOTIFICATIONS_ENABLED=true
BANDWIDTH_USAGE_NOTIFICATIONS_THRESHOLD=[80,95]
Panel notifications-config.ymlYAML
events:
  user.expiration:
    telegram: true
    webhook: true
    additionalWebhookUrls:
      - https://api.wrab.club/v1/provider/remnawave/webhook/<WEBHOOK_ID>
  user.expired:
    telegram: true
    webhook: true
    additionalWebhookUrls:
      - https://api.wrab.club/v1/provider/remnawave/webhook/<WEBHOOK_ID>
  user.limited:
    telegram: true
    webhook: true
    additionalWebhookUrls:
      - https://api.wrab.club/v1/provider/remnawave/webhook/<WEBHOOK_ID>
  user.bandwidth_usage_threshold_reached:
    telegram: true
    webhook: true
    additionalWebhookUrls:
      - https://api.wrab.club/v1/provider/remnawave/webhook/<WEBHOOK_ID>

Restart the panel container: .env and the YAML are read only at startup. The YAML file lives inside the container in /var/lib/remnawave/configs/notifications/ — mount it as a volume.

Remnawave 2.7.4–2.8

2.7.4 and 2.8 have no additionalWebhookUrls: all events go only to the WEBHOOK_URL addresses, and Wrab's address must not go there. Two ways:

  • API. Your bot receives the webhooks itself and sends push through the API. The simplest way.
  • Wrab forwarder — source package and SHA-256. A container next to the panel sends Wrab only expiry and traffic events, with sub_hash instead of the URL, without node data or passwords. Register its separate secret through the API. No private repository access is needed to build it.
Download and verify the forwarder sourcesbash
curl --proto '=https' -fSLO https://wrab.site/downloads/remnawave-push-forwarder.tar.gz
curl --proto '=https' -fSLO https://wrab.site/downloads/remnawave-push-forwarder.tar.gz.sha256
sha256sum -c remnawave-push-forwarder.tar.gz.sha256
tar -xzf remnawave-push-forwarder.tar.gz
# Follow remnawave-push-forwarder/README.md; build locally with Docker.
Panel .env (2.8, with the forwarder)bash
WEBHOOK_ENABLED=true
WEBHOOK_SECRET_HEADER=<WEBHOOK_SECRET>
# your receiver and the forwarder, comma-separated
WEBHOOK_URL=https://YOUR-BOT.example/remnawave-webhook,<FORWARDER_URL>
EXPIRATION_NOTIFICATIONS_ENABLED=true
EXPIRATION_NOTIFICATIONS=[-72,-24]

2.7.4 has no user.expiration event and no EXPIRATION_NOTIFICATIONS variables: the panel sends fixed user.expires_in_72_hours, …48…, …24… and user.expired_24_hours_ago. Wrab understands them, but we have not tested the forwarder with 2.7.4.

  • `WEBHOOK_URL` is required with WEBHOOK_ENABLED=true; addresses are http(s)://, comma-separated. If you have no receiver, download the forwarder above (its internal address goes into WEBHOOK_URL, see the “Remnawave 2.7.4–2.8” tab) or send push from your bot through the API.
  • `WEBHOOK_SECRET_HEADER` — at least 32 characters, Latin letters and digits only. There is one secret for all panel addresses: if your bot already verifies the signature, it must use this same secret. To keep your current secret, register it through the API.
  • Every event in the YAML must have `telegram` and `webhook`, otherwise the panel does not start. An event goes to additionalWebhookUrls only with webhook: true. telegram is whatever your bot needs; it does not affect Wrab.
  • `EXPIRATION_NOTIFICATIONS` — a JSON array of hours: negative before expiry, positive after. Non-zero integers in ascending order, at most 5 on each side; in 2.8 from −168 to 168, in 3.x from −744 to 744.
  • `BANDWIDTH_USAGE_NOTIFICATIONS_THRESHOLD` is required with …_ENABLED=true: 1–5 values from 25 to 95 in ascending order.
  • The panel's `SUB_PUBLIC_DOMAIN` must match the license domain: Wrab finds devices by the sub_hash of the event's data.subscriptionUrl, and the panel builds that link from this domain.

#Events and texts

Remnawave eventWrab kindDefault text
user.expiration with hours before expiry; user.expires_in_72/48/24_hoursexpiring“Subscription expires soon” — “Your {name} subscription expires {left}. Renew it to keep the VPN running.”
user.expired; user.expiration with hours after expiry; user.expired_24_hours_agoexpired“Subscription expired” — “Your {name} subscription has expired. Renew it to connect again.”
user.limitedlimited“Traffic limit reached” — “Your {name} subscription has used up its traffic…”
user.bandwidth_usage_threshold_reachedtraffic_threshold“Traffic running low” — “{percent}% of your {name} subscription traffic is used.”
  • expiring, expired and limited are on by default. “Traffic running low” is off: Remnawave sends it on every threshold, and without an explicit wish that is noise.
  • Substitutions: {name} — the provider name from the setting (the domain by default), {left} — “in 3 days” or “in 5 hours”, {percent} — the threshold reached. Your own texts are set for ru and en in the dashboard or with the templates field in the API.
  • A repeat of the same event (Remnawave retries up to 3 times) does not produce a second push. Events older than 72 hours are skipped.

#Setting up the webhook through the API

The same as in the dashboard, but with your own secret — for example, to keep the panel's current WEBHOOK_SECRET_HEADER or to register the forwarder's secret:

Enable or change the webhookbash
curl -sS -X PUT https://api.wrab.club/v1/provider/push/remnawave \
  -H 'Authorization: Bearer wpk_YOUR_KEY' -H 'Content-Type: application/json' \
  -d '{
    "secret": "<WEBHOOK_SECRET>",
    "events": ["expiring", "expired", "limited"],
    "name": "Acme VPN",
    "url": "https://YOUR-SITE/renew",
    "enabled": true
  }'

# -> {"configured": true, "webhook_url": "https://api.wrab.club/v1/provider/remnawave/webhook/<WEBHOOK_ID>", ...}
FieldValue
secretThe panel's or forwarder's secret: 32–256 characters [a-zA-Z0-9]. Required on first setup, never returned
eventsexpiring, expired, limited, traffic_threshold; without the field — the first three
enabledfalse — accept webhooks but send no push
nameName in texts ({name}), up to 64 characters; the domain by default
urlWhat to open on tap: https://… or a safe deep link; without it — the subscription screen
templatesYour own texts by kind and language, example below
PUT body with the templates fieldJSON
{
  "secret": "<WEBHOOK_SECRET>",
  "templates": {
    "expiring": {
      "ru": {"title": "Подписка скоро закончится", "body": "{name}: доступ закончится {left}."},
      "en": {"title": "Subscription expires soon", "body": "{name}: access ends {left}."}
    }
  }
}

PUT without secret changes the other fields, GET shows the setting, DELETE removes it. The response contains webhook_url — that is what goes into additionalWebhookUrls.

Webhook signature and responses

Remnawave signs the body: X-Remnawave-Signature = hex(HMAC-SHA256(WEBHOOK_SECRET_HEADER, body)). Wrab responds 200 {"result": "queued"} or 200 {"result": "ignored", "reason": …} — disabled, event, event_disabled, stale, no_subscription_url, domain_mismatch, no_devices; 401 bad_signature; 403 license_inactive; 404 — no such setting; 429 — rate limit; 503 — temporarily unavailable at Wrab.

#sub_hash — the subscription link hash

sub_hash is the SHA-256 of the canonical subscription link, lowercase hex, 64 characters. The app and Wrab canonicalise the same way; if your implementation differs by a single character, the push silently finds no recipient.

sub_hash of a Remnawave userbash
# 1. The user's subscription link from the Remnawave API
SUB_URL=$(curl -sS -H 'Authorization: Bearer <REMNAWAVE_API_TOKEN>' \
  'https://YOUR-PANEL/api/users/by-username/<USERNAME>' | jq -r '.response.subscriptionUrl')

# 2. sub_hash = sha256 of the canonical link. A Remnawave link is already
#    canonical (https://SUB_PUBLIC_DOMAIN/shortUuid), so hash it as is
SUB_HASH=$(printf '%s' "$SUB_URL" | shasum -a 256 | cut -d' ' -f1)
echo "$SUB_HASH"
  1. Trim whitespace at both ends; a space or control character inside is an error.
  2. Scheme http:// or https://, case-insensitive; the canonical form is always https://.
  3. Drop the fragment — everything from the first #.
  4. Authority — up to the first / or ?: drop userinfo (up to the last @); host — ASCII to lowercase, no trailing .; remove port 443 and 80, keep any other; IPv6 in brackets as written.
  5. Path — as written, without trailing /: do not touch percent-encoding or case (the Remnawave shortUuid is case-sensitive).
  6. Query — as is, not re-sorted; drop an empty ?.
  7. Result: https:// + host [: + port] + path [? + query].
Test vectors
LinkCanonical formsub_hash
https://sub.example.com/AbCdEf123456https://sub.example.com/AbCdEf1234563c9add9e56fe310638eb45c1bac95350a09a84eb58b195767f48fd946fd2d5db
http://Sub.Example.com:443/AbCdEf123456/#namehttps://sub.example.com/AbCdEf1234563c9add9e56fe310638eb45c1bac95350a09a84eb58b195767f48fd946fd2d5db
https://sub.example.com/api/sub/AbCdEf123456?client=1https://sub.example.com/api/sub/AbCdEf123456?client=13ebbfd35fc16cf49f565e3d7e985235846f0cc1e3109a8ef53ffde848a2d1ccf
https://[2001:db8::1]:8443/x/https://[2001:db8::1]:8443/x19a04f133b05f39bb07e29ecf130e459584722fa75d15adcf7c2631f98068823

#Tapping a push

  • https://… (without a login in the address) opens in the external browser.
  • Deep links are navigation only: wrabbit://open (open the app), wrabbit://subscriptions (server list), wrabbit://settings (settings), wrabbit://subscription?dom=<domain>&sub_hash=<hex> (that subscription's servers, only subscriptions of the push's domain).
  • Links that change configuration (wrabbit://add/…, import, crypt*, routing) are rejected by the API, and the app does not open them from a push.
  • Without url the app opens the server list of the push's subscription: by sub_hash, otherwise the domain's first subscription.

#What subscribers see

  • Subscribers turn on Notifications in Wrabbit and allow delivery in Apple system settings. One switch covers provider messages, Wrabbit announcements, VPN alerts and subscription reminders.
  • When subscribers turn notifications off, Wrabbit cancels local notifications and asks its server to revoke both kinds of push registration. It retries once the network comes back until the server confirms. Pushes already sent may still arrive before the revocation takes effect.
  • Text arrives in the interface language: Russian gets ru, everything else en. Notifications are grouped by domain. While the app is open, only a push from a domain among the subscriptions with push is shown.
  • Ads (promo) do not get through: there is no consent screen for them.

#Limits

WhatDefault
service sends from the dashboard and API per domain in a rolling 24 hours10
promo sends per domain in 24 hours1
Automatic webhook push per domain in 24 hours20,000
sub_hash values in one request1000
API requests per minute per license / from one IP60 / 120
Webhooks per minute per setting3000

A send counts as one message however many devices receive it. Limits are counted per provider and domain — renewing the license does not reset them; dry_run and a repeat by idempotency_key do not use the daily limit. An unsent message is cancelled when it expires: promo after 24 hours, everything else after 72. Automatic push goes first in the queue.

#Check

  1. A test iPhone with 2.2.0 has added the subscription and allowed notifications. In “Subscription check” “Provider notifications” is ticked; if it is in the “Unverified directives” row, the token lacks push.
  2. dry_run with the test user's sub_hash returns target_count of at least 1. If it is 0, check that the license domain matches the link host and refresh the subscription in the app.
  3. Send a push from the dashboard or the API and check its status in the push log (or GET /v1/provider/push/messages).
  4. For webhooks set the test user to expire “in 2 days”: the event arrives on the panel's schedule, and the dashboard setting shows the last event.

Updated November 14, 2026 · Found a mistake? →