Restart your dev server from your iPhone
The queue worker crashed at six. Nobody noticed until a colleague asked why nothing was processing. Restarting it took one command — once someone got to the Mac.
Other ways first
For anything that must run unattended for months — a production service, a database — a
process supervisor on the machine is the right tool: launchd on macOS, or your
container setup. And with SSH you can always restart a process by hand.
This guide is about the development side: npm run dev, a watcher, a local API, a
tunnel. Things you start and stop all day and want to keep an eye on from the phone.
Define a service once
In the Mac's Services screen, tap + and fill in a name, the
command line as you would type it, the folder inside a shared workspace, environment
variables, and whether to restart after a crash. The command runs without a shell —
npm run dev is npm with two arguments — so pipes, &&
and $VARIABLES are refused before sending; for those, write
sh -c '…'.
Then the Mac has to agree. A window on the Mac shows the full command, the absolute folder and the names of the variables (never their values), and nothing runs until someone at the Mac allows it. A new command is a way to run anything every time the agent starts, so that decision stays with the Mac. Changing a command or folder later asks again; renaming does not.
Day to day
- Start, Stop, Restart — swipe the row or press and hold it. Stopping takes the whole process tree down, not just the parent.
- Logs — stdout and stderr kept apart, streamed live. The log belongs to the service, not to one run, so after a restart the new output continues in the same place. If the phone fell behind and older lines were dropped, the gap is marked.
- Restart after a crash — up to five attempts, with the delay doubling up to a minute, so a server that cannot reach its database does not hammer it. A clean exit with code 0 is not restarted.
- Shortcuts — a "Control a service on the Mac" action starts, stops or restarts a service by its name; it needs the iPhone unlocked.
Told when it dies
When a service crashes and stays down — no restart policy, or the attempts are used up — the phone gets a notification with the service's name and the time. A crash that restarted fine does not wake you; it is in the service's log. The home-screen widget shows the state of your services at a glance. An Apple Watch can start, stop and restart existing services too, but only if you grant it that right in settings; it cannot define new ones.
The switch on the Mac
All of this is behind Manage development services, a switch in the agent's settings on the Mac, off by default. Turning it off removes the buttons but does not stop anything that runs: a safety setting that killed your dev servers would be a trap.
A service does not survive a restart of the agent itself; if the agent ever crashes, it finds the processes it left running and asks on the Mac whether to adopt, end or leave each one.
For one-off processes, see killing a process on your Mac from your iPhone; to look at what the dev server serves, open its localhost on the phone.
Set it up once
- Install the agent on the Mac. A signed, notarised app from our open
Homebrew tap. It shares only the folders you name.
brew install --cask shiftstage/shiftstage/shiftstage-agent - Install the app on the iPhone from the App Store.
- Pair them. Scan the code on the Mac's screen and confirm the same symbols on both devices. No account. The first pairing needs both on the same network.
That is the whole setup: no VPN, no port forwarding, no SSH keys. On the same Wi-Fi the phone talks to the Mac directly; away from home the connection goes peer to peer, or through a relay that forwards only end-to-end encrypted bytes.
Get it
The Mac agent: download page — one Homebrew command or a notarised disk image. The iPhone app: App Store. Free forever for one Mac on your own network, no account; $7.99 a month or $69.99 a year to reach it from anywhere.
More guides: all guides.