Documentation

Phone notifications for SSH and remote server jobs

Get a phone alert after an SSH build, backup or long-running Linux job. Pair a server independently, preserve exit codes and handle sessions that disconnect.

Updated

Choose where the notification runs

#

You can notify from your laptop after an SSH command returns, or from the server when its own job exits. These choices have different failure boundaries. The laptop approach needs only its existing Ntfyx connection, but a broken SSH connection may give you a transport error rather than a known job result.

A paired server can notify independently of the laptop if the job itself remains running.

Run the wrapper onUseful forImportant boundary
Your laptopA foreground SSH commandDisconnect can hide the remote result.
The paired remote hostAn existing persistent or scheduled jobThe host and outbound network must remain available.
An unpaired CI runnerOnly after designing source authorizationNo public token/QR or built-in GitHub Action is provided.

Before you connect

#

Use Ntfyx CLI 0.1.2 on macOS or Linux and a compatible primary phone app. The iPhone app is awaiting App Store review. Android 1.0.0 is in Google Play production review and available to configured Internal testers. Neither status announces public store availability. Android push requires Google Play services.

The phone authorizes each computer or server as its own Source; an optional Web Inbox receives new messages after phone authorization.

Terminal
curl -fsSL https://ntfyx.me/install.sh | bash
ntfyx connect
ntfyx topics

Notify when a foreground SSH command returns

#

Download and inspect the published wrapper on your paired laptop. Replace YOUR_HOST and the remote working directory. It preserves the SSH process exit code and keeps output in the terminal; a disconnect or SSH failure must not be reported as successful completion.

Terminal
curl -fsSLo notify-after.sh https://ntfyx.me/examples/scripts/notify-after.sh
cat notify-after.sh
bash notify-after.sh Work ssh YOUR_HOST 'cd /path/to/project && npm run build'

Pair the server as its own Source

#

Install the supported CLI on the remote Linux or macOS host, run connect there, then scan its temporary QR with the phone. Choose an existing Topic or create one within your plan. Keep the QR private and pair as the same user that runs the job. Ntfyx does not connect inbound to your server or start a new SSH tunnel.

Terminal
# Run on the remote host, as the job owner.
curl -fsSL https://ntfyx.me/install.sh | bash
ntfyx connect
ntfyx send "Server connection ready" --topic Work

Let an existing job notify independently

#

Put notify-after.sh on the paired server and call it from your existing tmux session, scheduler or service. This wrapper reports a command result; it does not keep the process alive, restart a failed job, or detect a scheduler that never ran. Cron needs explicit PATH and absolute paths. Keep logs on the server, and configure your job supervisor separately if you need persistence.

Terminal
# Run in your existing persistent session on the paired server.
bash /path/to/notify-after.sh Work bash -c 'printf "Remote demo finished\n"'

Request a decision without opening remote shell access

#

A server script can ask for Allow/Deny, a named choice or short text. Your answer goes back to that request, not into an unrestricted interactive shell. Review context, stop on expiry or verification failure, and never execute arbitrary reply text. There is no built-in team escalation or infrastructure incident SLA.

Terminal
ntfyx ask "Which environment should I inspect?" \
  --choice staging=Staging --choice production=Production \
  --topic Work --wait 60s --expires 90s --json