Health Data Journal ·

How to sync Apple Health data to a NAS

Save an Apple Health export from your iPhone straight to your home NAS. Start with one file over SMB. Set up WebDAV only if you want recurring exports.

Before you start

Connect your iPhone and NAS to the same home network. Create a dedicated private share, such as HealthData, rather than using your entire personal folder. Give the export account write access to that share only. If another device will analyze the files, give it a separate read-only account. Keep the share off the public internet.

1. Save one export over SMB

  1. Connect in Files. On your iPhone, swipe down on the Home Screen and search for Files, the blue folder app. Open Browse → … → Connect to Server. Enter your NAS address, for example smb://192.168.1.50. Choose Registered User and sign in with the account that can write to your health share.
  2. Export from Health Data AI Analyzer. In the iPhone app, choose Export a file and pick JSON for scripts or CSV for spreadsheets. Pick a small date range and only the metrics you need. A week of steps and sleep is a useful first test.
  3. Save and check. In the share sheet, tap Save to Files, select the NAS under Shared in Browse, and open your dedicated share. Check the filename and modification time on the NAS before setting up automation.

No Mac or WebDAV server is required for this one-time copy. Apple’s Files guide · Export format guide

2. Set up recurring exports over HTTPS WebDAV

Choose your NAS: UGREEN (UGOS Pro) step-by-step: HTTPS, DNS, VPN and first sync · Synology (DSM) walkthrough. UGREEN has WebDAV in File Service; Synology uses the WebDAV Server package. Both default to port 5006 for HTTPS. If your first JSON is unexpectedly small, see why Daily Automation exports only new records.

  1. Enable HTTPS WebDAV on your NAS or use a self-hosted Nextcloud server. Create the destination folder first. Copy its HTTPS folder URL from your server documentation and keep the trailing slash. An smb:// address won’t work here. Use a certificate the iPhone trusts, and don’t open router ports to the internet.
  2. On iPhone, open the app’s Sync settings and choose Nextcloud / WebDAV. Enter the HTTPS folder URL and the limited account’s credentials. For Nextcloud, use an app password. In-app WebDAV sync requires Pro; the manual SMB workflow above does not require Pro sync.
  3. Choose Timestamped to keep separate snapshots or Stable to replace the same file at each successful sync. Tap Save Nextcloud Settings, then Test Connection. Run one manual sync, and verify an export actually arrives. Only then turn on Auto-Sync.

iOS decides when background work runs, so don’t rely on a fixed upload time. Check file freshness before a report. This sends export files from the iPhone to the NAS; it doesn’t write data back into Apple Health. Nextcloud / WebDAV setup

If the NAS appears but the folder is missing

Optional: analyze it on an always-on computer

Mount the dedicated share read-only on a Mac, Linux mini PC, or other trusted computer. Test access with a dummy file first. For Hermes or another AI assistant, use local processing and avoid cloud fallback if the data must stay on your network. Don’t attach your raw export to Telegram. A summary posted in a group is visible to people who can access that topic.

The Mac app’s native Hermes integration is a separate option that requires Hermes on the same Mac. The NAS workflow uses files and works without keeping a Mac on.