Maybe recent events made you aware that Google can arbitrarily suspend your Google account forever depending on the things you take pictures of. Even if they’re harmless things and the activity on your account was innocent and legal. What can you do if you want to avoid this risk and stop using Google Photos, but still want somewhere to put your phone snapshots?
For me, the auto-sync features from Android devices was Google Photos’ killer feature, so that’s what I wanted to replace. Now I have the following self-hosted solution:
- Nextcloud for synchronizing photos to a small staging area on cloud storage
- FolderSync because Nextcloud on Android can’t do proper two-way sync for photos
- PhotoView to view photos from the NAS where they’re sorted and stored long-term
I’ve experimented for some weeks before settling on this configuration, read on if you want to know what my workflow ended up being.
I have 2 GB of cloud storage on my self-hosted Nextcloud and a dedicated
DCIM/Sync folder on the Android device. I sync only this folder to
Nextcloud/photos/Sync. This has the advantage that I don’t send gigabytes of photos around the world for nothing; I have to curate what I want to sync.
Once I find the time to sort through the things I’ve uploaded, I grab the best shots from
Nextcloud/photos/Sync and drop them into a reasonably clean folder structure on my NAS. This structure is then exported to the web by PhotoView so I can view things on the web, share with people, etc. The old stuff on Nextcloud is deleted, and FolderSync makes sure it also disappears from my phone to free up storage.
Reasoning for Software Choices
Maybe you’re wondering if you can’t you just use Nextcloud’s built-in sync or instant upload features instead of also adding FolderSync to the mix and complicating things. Not really, because:
- Nextcloud can’t sync items from the DCIM folder that is a hardcoded standard for most camera apps
- Nextcloud’s auto-upload feature can use arbitrary folders, but it’s only an upload. Deletions on the server will not propagate to your device. Neither will deletions on the device do anything on the server.
Using FolderSync solves both of these problems. You can create folder sync pairs and sync any subfolder of
DCIM, or even the whole
DCIM folder itself, with or without syncing deletions, just the way you need.
Another advantage of FolderSync is that you can sync photos to multiple types of storage at the same time. I could sync my entire
DCIM folder directly to my NAS via SMB whenever I’m home and charging my phone. And then sync only the
Sync subfolder through WebDAV to Nextcloud while on the road. FolderSync is an excellent piece of software, it supports over 20 storage backends, so even if Nextcloud isn’t your thing, this might be useful for you.
Moral of the story: Self-hosting your photos doesn’t have to be too painful, and you might even discover some truly impressive software while researching how to do it.