Index / Snippets / Unison file sync between Linux and iPhon

Unison file sync between Linux and iPhone over SSH

One shared folder on my own NAS instead of a big cloud drive.

Answers
How do you sync files between a Linux computer and an iPhone without iCloud or Dropbox?
Topics
Freedom · SSH · cloud · data · howto · iPhone · linux · server · tablet
Full article on willem.com
https://willem.com/en/2020-09-16_syncing-files-seamlessly-between-smartphone-and-tablet/

Summary

In 2020 I synced a shared Cloud folder through my NAS: Unison pushed files from my Debian tablet over SSH on a cron job, and on the iPhone the Secure ShellFish app exposed the same folder in the Files app.

Full text

Unison is in the Debian repository and synchronises using rsync over SSH/SFTP. My profile defines two root folders, runs in batch mode and decides automatically which files to keep; man unison lists all parameters. Authentication uses shared SSH client keys, so no passwords are needed. A cron job runs the sync frequently, guarded by a PID file so a new run only starts when the previous one has finished. Routing everything through a NAS in a data center means tablet and phone stay in sync even when one of them is on a cellular network. The shared Cloud folder works like a desktop folder that exists on every device.

Machine formats of this page