Apple Health to Postgres: build a private health database
A local-first guide to moving Apple Health exports into Postgres for repeatable personal analytics, dashboards, and self-hosted workflows.
Pain point: your health data is trapped in apps
If you have years of Apple Watch data, the real frustration is not collecting it. The frustration is that your history is scattered across app screens, XML archives, and screenshots. A private Postgres database gives you one durable place to query trends.
Who this is for
- Self-hosters who already run Postgres, Grafana, or Home Assistant.
- Quantified-self users who want repeatable SQL instead of one-off spreadsheet cleanup.
- Developers who want an API layer over Apple Health without sending raw exports to a third-party cloud.
Workflow
Export category CSV files from HealthSave. Normalize timestamps and units before import. Use staging tables so future exports can be deduped. Create views for weekly summaries, monthly baselines, and missing-data checks. Keep raw exports read-only so mistakes can be rebuilt.
Boundary
This creates a personal data store, not medical truth. HealthSave exports the records your devices captured. Postgres helps you organize them; it does not diagnose or validate sensor accuracy.