Run it yourself
The receiver is a small program that catches what healthd sends. It stores the deliveries in SQLite on your Mac and serves a dashboard that only your Mac can open. The source is in the receiver's repository.
What you need
- A Mac. The always-on service is a macOS LaunchAgent; without it the receiver runs in a terminal window.
- Node 22.
- The iPhone on the same network as the Mac.
Steps
Clone the repository and check your Node version:
git clone https://github.com/mkozachuk/vitals-receiver
cd vitals-receiver
node -v Install the dependencies:
npm ci To look around first, without a phone, start the demo with synthetic data and open http://127.0.0.1:4790/. Ctrl-C stops it:
npm run demo Mint the token the phone will present. It is written to ~/Library/Application Support/vitals/token:
npm run token:mint Run the receiver in the foreground:
npm start npm run service:install installs an always-on LaunchAgent instead, but only if launchagent-kit's
lak command is available; it is not published at the moment.
In a second terminal, check that it is serving:
curl -s http://127.0.0.1:4780/healthz Point the app at it
In healthd, set the destination to one of these, with the header below:
http://<lan-ip>:4781/ingest
http://<bonjour-name>:4781/ingest
header name: x-vitals-token
header value: the contents of the token file The second form uses the Mac's Bonjour name, shown as Local hostname in System Settings → General → Sharing. It keeps working when the router hands the Mac a new address. Read the token in your own terminal and type it into the app:
cat "$HOME/Library/Application Support/vitals/token" Then tap Save & Test Connection in the app.
Let a coding agent do it
self-host-prompt.txt is one prompt to paste into a coding agent.
It follows the same steps and tells the agent not to print the token; you read it and type it into the app
yourself.