To keep your Apple Health data in a database you own, HealthSave Pro background-syncs your HealthKit data to a self-hosted server, where it lands in TimescaleDB, a PostgreSQL time-series database on your own hardware. No cloud sits in the middle: the data goes from your iPhone straight to your Postgres, and you query it with plain SQL or a REST API.
Why put Apple Health in your own database?
Apple Health keeps everything on your phone, which is great for privacy but useless if you want to analyze it: there is no query language, no joins, no long-range history, and the official Export All Health Data dumps a single giant export.xml you can't realistically work with. A real database fixes all of that. Once your HealthKit samples are rows in PostgreSQL, you can run SQL, build dashboards, feed other tools, and keep a permanent longitudinal record, on hardware you control.
The pipeline
iPhone (Apple Health)
└─ HealthSave Pro ──(background sync, ~1–5 min)──▶ your server (FastAPI + TimescaleDB)
├─▶ SQL (psql, any client, Grafana)
└─▶ REST API (Pro)
Step 1, Stand up the Observatory (it brings the database)
The optional companion, the open-core HealthSave Observatory (the datahub project), is a FastAPI + TimescaleDB stack you bring up with Docker. Run it on a laptop, NUC, Mac mini, Synology, or a Proxmox VM. The server core is source-available under Elastic License 2.0; the protocol and SDK layers are Apache-2.0. If you'd rather use a Postgres instance you already run, the server's ingest contract is documented on the API page.
Step 2, Point the app at your server
In HealthSave: Settings → Server Sync, set the Server URL to your server (e.g. http://your-server-ip:8000, iOS won't sync to localhost), optionally add an API key, and enable background sync. Batches start flowing within a few minutes.
Step 3, Your data is now rows in Postgres
Each batch posts to POST /api/apple/batch and is written to TimescaleDB hypertables, one compact, timestamped row per sample, tagged by metric type, source device, and unit. Heart rate, resting HR, HRV, steps, sleep stages, SpO2, weight, workouts, and the rest of what you've synced all live in your database, ready for SQL.
Step 4, Query it
Because it's plain PostgreSQL, anything that speaks SQL can read it: psql, a BI tool, a Python notebook, or Grafana. HealthSave Pro also exposes a REST API over the same data, so apps and agents can pull it without touching the database directly.
What's free vs Pro
| Capability | Tier |
|---|---|
| On-device dashboard, CSV/JSON export | Free |
| Background sync to your server (your database) | Pro |
| Full multi-year history via backfill | Pro |
| REST API access | Pro |
Pro is a one-time $24.99 (US price, varies by region), Family Sharing included, no subscription.
Honest limits
- You run it. The database and server are yours to operate, secure, and back up. There is no hosted option.
- Best-effort ~1–5 min sync. This is a durable record, not a real-time feed.
- Source-available core: the Observatory server is Elastic 2.0; protocol/SDK are Apache-2.0.
- iOS only; it reads Apple Health, so data must already be in HealthKit.
- Accuracy is your wearable's, the database stores exactly what your devices recorded.
Related
- Apple Health data in your homelab, the full Grafana + Home Assistant + REST API picture.
- Build a custom REST API over your Apple Health data.
- Put your Apple Health history into Grafana dashboards.
- Back up 10+ years of history so your database has the full record.
FAQ
What database does HealthSave store my data in?
TimescaleDB, which is PostgreSQL with time-series extensions. The HealthSave Observatory companion brings it up with Docker, and your synced HealthKit samples land in hypertables you can query with standard SQL.
Is the data really mine?
Yes. The database runs on hardware you control. There is no HealthSave cloud in the middle; the iPhone posts directly to the server URL you configure, and the rows sit in your own Postgres.
Can I query it however I want?
Yes. It's plain PostgreSQL, so any SQL client, BI tool, Grafana, or script can read it. HealthSave Pro also exposes a REST API over the same data for app-to-app access.
How much storage does it need?
Years of personal HealthKit data is small for a database, typically well under a few gigabytes even after a full multi-year backfill, because the samples are compact numeric rows.
Is there a hosted version?
No. There is no hosted backend. You run the Observatory and its database yourself, which is the entire point if you want your health data on your own hardware.
HealthSave is not a medical device. It is for informational purposes only and does not diagnose, treat, cure, or prevent any disease or condition. The accuracy of any health data depends on your wearable device and its sensors. Privacy claims of zero data collection apply to the iOS app; self-host sync sends your data to your own server.
Get HealthSave
Download free, try the export, then unlock background sync to your own database with a one-time Pro purchase when you're ready.
Download HealthSave on the App Store