Notifications
A LawFive server can tell people’s phones about a new weather risk to a match in the next 3 days. Each person turns this on in the app, and it’s off until they do. It’s on Android for now. The iPhone will follow.
Match reminders are separate. The phone schedules those itself, so they work on any server and don’t use any of this.
Why there’s a relay
Section titled “Why there’s a relay”Only an app’s publisher can send notifications to its store builds, because that takes keys tied to the app. A self-hosted server can’t hold them, so it sends through a small relay the project runs at push.lawfive.app. There’s nothing to set up or sign up for.
Your server → LawFive's relay → Firebase → the LawFive app → back to your server for the detailsWhat the relay sees
Section titled “What the relay sees”| It sees | It doesn’t see |
|---|---|
| Your phones’ Firebase tokens, sealed so only the relay can read them | Names, teams or accounts |
| Your server’s address | Venues, kickoff times or forecasts |
| The kind of notification, and a random ID for the match | What the notification will say |
| The address your server sends from | Anything else in your database |
The relay stores no copy of the tokens. It keeps a scrambled form of each one and your server’s address, to count the day’s notifications, and clears them the next day.
The server sends only a fixed kind of event and an ID, so no server can put its own words on anyone’s phone. The app asks its own server what’s going on and writes the notification itself.
Firebase is Google’s service, so Google sees each phone’s token and that a notification was sent to it. If that doesn’t suit you, turn this off.
Limits
Section titled “Limits”| Limit | Each day | Each minute |
|---|---|---|
| Per phone | 25 | 5 |
| Per server | 250 | 120 |
Days reset at midnight UTC, and only notifications that reached Firebase count. If a server reaches a limit, it stops sending until then and says so in its logs:
Over the push relay's server limit; no notifications until 2026-11-08T00:00:00.000ZThese limits are comfortable for a server with a few referees. If yours needs more, ask the project. A server that misuses the relay can be blocked.
Turning it off
Section titled “Turning it off”PUSH_RELAY_URL=offThen restart with docker compose up -d. The server stops offering notifications, and the setting goes away in the apps.
Using another relay
Section titled “Using another relay”PUSH_RELAY_URL can point at a relay of your own, but it only works with apps built to match. A relay holds the Firebase keys for one set of apps, so you’d need your own Firebase project and your own builds of the apps. See the push relay.
If notifications don’t arrive
Section titled “If notifications don’t arrive”See Troubleshooting.