a Luminare Development open-source project
A small self-hosted push relay for Lumen Console, the mobile app for Pterodactyl and Hydrodactyl panels. It watches your panels around the clock and sends alerts to your phone through Expo's push service or through your own ntfy server, within seconds for crashes and within a minute for everything else.
The app checks your panels from the phone, but iOS and Android decide when background work runs: checks can be hours apart, and a force-quit app stops them. A crashed game server should not wait for the phone's next turn. The relay runs next to the panel, does the same checks every minute, keeps a console socket open per server to see crashes as they happen, and pushes only what is new.
It is one Python process with one dependency (cryptography), SQLite and one env file. It uses
about 30 to 40 MB of memory and runs in Docker or with plain python3.
Lumen Console app ──pair (code/QR)──▶ relay API ◀── reverse proxy (TLS)
▲ │
│ push (Expo or ntfy) ├─ poller: Client API /resources, backups,
│ │ Application API nodes, Wings probe
Expo push / ntfy ◀── engine ◀───────────┤
(dedupe, cooldown, └─ console sockets: Wings "status" and crash messages
per-device limits)
- Mode (a), polling. Every
RELAY_POLL_SECONDS(default 60) the relay reads the server list, each server's/resources, the latest backups (every tenth round) and, with an application key, the nodes plus an unauthenticated Wings probe. Same rules and alert ids as the app. - Mode (b), console sockets. For each watched server the relay holds the Wings console socket
(the one the panel's console uses) and reads only
statusand daemon messages. An exit without a stop request is pushed within seconds, as "crashed" when Wings reports a crash. A stop someone asked for is not reported. Polling keeps running for everything else.
| Alert | Rule | Severity |
|---|---|---|
| Server stopped or crashed | running → offline (poll), or an exit on the console socket | critical |
| Server unreachable | /resources answers 502/504 and the node is not already reported |
critical |
| Disk | disk used ≥ 90 % of the server's limit | warning, critical at 100 % |
| Memory | memory ≥ 95 % of the limit while running | warning |
| Backup failed | the latest finished backup failed | warning |
| Node unreachable | the Wings probe gets no answer (application key) | critical |
| Node allocated | memory or disk allocated ≥ 95 % of the node | warning |
Each problem is pushed once. One that goes away and comes back within 30 minutes is not pushed again; more than three new problems at once become one summary push; each device gets at most 30 pushes an hour. Taps open the server in the app.
git clone https://github.com/luminare-dev/lumen-console-relay && cd lumen-console-relay
sudo install -d -m 700 /etc/lumen-console-relay
sudo install -m 600 examples/relay.env /etc/lumen-console-relay/relay.env
docker compose -f deploy/compose.yaml run --rm relay genkey # paste into RELAY_SECRET_KEY
sudoedit /etc/lumen-console-relay/relay.env # public URL, ntfy or Expo
docker compose -f deploy/compose.yaml up -d --build
docker compose -f deploy/compose.yaml exec relay lumen-relay panel add \
--id main --name "My panel" --url https://panel.example.org --application-key
docker compose -f deploy/compose.yaml exec relay lumen-relay pair # code, link and QR codeThen put the reverse proxy in front (deploy/apache-relay.conf, deploy/nginx-relay.conf) and, in the app, open Settings → Push relay, enter the relay address and the pairing code, or scan the QR code with the phone camera.
Without Docker: pip install --require-hashes --only-binary=:all: -r requirements.txt, then
python3 -m lumen_relay serve with the same environment variables (a systemd unit is in
docs/install.md).
- Panel keys are entered at the relay's command line (prompt or stdin, never as arguments) and
stored with AES-256-GCM; the key comes from
RELAY_SECRET_KEY. Devices never send or receive panel keys. - Least privilege: a dedicated panel account that is a subuser on the watched servers with
websocket.connectandbackup.readonly, and an application key with read access to nodes only. See docs/panel-access.md. - Pairing with one-time codes that expire (15 minutes by default), scoped to panels; device tokens and codes are stored as hashes. Rate limits on pairing, the API and test pushes.
- The container runs as a non-root user, read-only, without capabilities, with 96 MB of memory, bound to 127.0.0.1 behind a TLS reverse proxy.
The whole model, with its trade-offs, is in docs/security.md.
- docs/install.md: Docker, plain Python, reverse proxy, DNS, upgrades
- docs/configuration.md: every setting of the env file
- docs/panel-access.md: which keys and permissions the relay needs
- docs/security.md: threat model, encryption, pairing, limits
- docs/api.md: the device API the app uses
- docs/push.md: Expo push and ntfy, and what each needs
- docs/adr/: design decisions
pip install --require-hashes --only-binary=:all: -r requirements.txt
python3 -m unittest discover -s tests -t . -v # unit and in-process end-to-end tests
python3 tests/integration/run.py # Docker: image, mock panel, mock Expo, real ntfyCI runs the tests, ruff, yamllint, markdownlint, actionlint, zizmor, the workflow policy, a full-history gitleaks scan, the Docker image build and the integration test.
- Changelog and releases
(each release has
SHA256SUMS, a build provenance attestation and a container image on GHCR) - Contributing · Code of conduct · Security · Support
- Project page: https://luminare.tech/open-source/lumen-console-relay/
Apache-2.0. The licence covers the code only: the project name, logo, header images
and docs/brand/ are not licensed (see NOTICE).
a Luminare Development open-source project