# A More Privacy-Friendly "iCloud Photos" at Home If you are one of those people who prefers to keep **your** photos as **your own** (and your family's), then this post may be for you. This post **isn't** for you, if you are looking for a shinier, more user-friendly, social-network-friendly, etc. solution. I am not looking for something *better* than Google Photos or iCloud Photos. The problem I am trying to address is how to upload the photos taken on my phone - as seamlessly as possible - to a storage solution (i.e. some hard disk) on my local network, so they can: * be backed up, in case I lose my phone, etc. * don't fill up the - limited - space on my phone. * all part of the same collection. * a somehow organized photo collection, so that I can look back at certain events, holidays and ... smile!   : ) ## Previous attempts Over the years, I have used 2 other solutions, apart from the one I will be presenting here ([skip ahead](https://hackmd.io/@gsaslis/a-more-privacy-friendly-icloud-google-photos#The-solution-Photoprism), if you like): ### Background First, some background: * Never uploaded my photos to Google. * Was always careful about what I uploaded to Facebook, back when I still used it. * Never used Apple's iCloud Photos, even if - at the time - Apple promised privacy. [I am no longer buying into that](https://twitter.com/gsaslis/status/1430828513314185219). * tl;dr : I don't trust "the cloud" with **my** memories. They are **private**. Self-hosting has been the only real option. ### QNap NAS Back when I had the QNAP Network Attached Storage (NAS) unit, I relied on the QNAP set of apps. QFile is an app that allows you to [auto-upload](https://www.qnap.com/en/how-to/tutorial/article/accessing-and-sharing-files-on-a-qnap-nas-using-qfile) pictures from your phone into your QNAP NAS. This worked fairly well - **and for several years, it should be noted (e.g. 2015-2020)** - in terms of backing up photos. Admittedly, I never used the bundled **Photos** app extensively to actually view/browse the photos. I tried some times. I remember it felt somewhat sluggish. But I never really spent a lot of time **browsing** through photos there, so I couldn't offer a good review. I just checked that they were backed up, and that was that. "I could always organize them at some later point in time". I also never experimented with face recognition, etc. ### Nextcloud After switching from QNAP to a newer, beefier, Synology NAS, I had to pick where to migrate my photo backup solution. Again: I only cared about backing up the photos. ("I could always organize them at some later point in time" ;) ) Instead of looking into the options offered by Synology itself, I thought I'd check into the latest developments in open source solutions in this space. I'd been hearing words of encouragement about [nextcloud](https://nextcloud.com/) and [owncloud](https://owncloud.com/), so I thought I'd try one of those first instead. I decided to try Nextcloud first. And so, I deployed Nextcloud on my Synology NAS with docker-compose. **Disaster.** As I started to upload the *few thousands* of photos from my phone, not only did Nextcloud crash, but it also basically froze the Synology DiskStation Manager (DSM) software, bringing everything else down with it. That clearly wasn't the way to go!! DSM crashing just isn't a viable solution when other services I'm relying on for work are on the same network, so I needed some more reliable / fault-tolerant solution. If I can't have any single machine crashing, then how about ... a small Raspberry Pi cluster at home !? 🎁 *And so came the idea of deploying Nextcloud on a Raspberry pi cluster, on K3s (Kubernetes). If you want to learn more, you can find my [deployment scripts here](https://github.com/gsaslis/home-on-k8s#nextcloud).* ### Nextcloud shortcomings But even after nextcloud is reliably running, I was still not all too happy with the solution: 1. Nextcloud Photos does not support albums - no chance of keeping photos organized. 1. the Nextcloud mobile app does a decent job of uploading the photos **on demand**, but it doesn't seem to be very good at doing that *in the background*. As soon as I started looking at organizing my photo collection, #1 above clearly was a deal-breaker, so I went ahead looking for alternatives. A colleague (thanks Dustin!) was kind enough to [point me](https://twitter.com/thescouser89/status/1499940065673453572) to [an extensive discussion on Reddit about a google-photos alternative](https://www.reddit.com/r/selfhosted/comments/k5nzkj/google_photos_the_megathread/). From that, it was clear I had to take a look at this project I'd never heard of before: [photoprism](https://photoprism.app/)! ## The solution: Photoprism I've been using photoprism for about a week and I've been impressed with what it did out-of-the-box for me! ### A note on importing your photos But first, before we go into details, a word of advice! Photoprism was really easy to deploy with docker-compose on my laptop (well, for me anyway), BUT I really **struggled** importing my library. I recommend copying all your photo collection **on the same server** where you run the containers **before starting the import** and then just mounting them into the container. I tried - for days !! - to import my collection by mounting my NFS share from my NAS (as I normally do) on the Mac, and then mounting that "local" folder into the container. The import process started fairly fast, but over the next hours gradually degraded such that it eventually **halted** (i.e. not even the container could be `kill`ed - I had to restart docker). After copying locally, (and setting photoprism to use 10 workers) the whole import of my ~250 GB photo library / 50K files took just a couple of *hours*. *(sigh) the wasted days...* ### Deployment After importing the library on my laptop, and taking a look around to see that photoprism fits my requirements, I moved it to my local kubernetes cluster (on https://k3s.io/). You can find more details and deployment scripts [here](https://github.com/gsaslis/home-on-k8s#photoprism). Now, onto the good stuff!! ### Calendar 📆 Photoprism neatly populate the "Calendar" area with the trips I've been on! ![Photoprism Calendar View](https://i.imgur.com/8cVS4HD.png "Photoprism Calendar View") ### Grouping photos by location You can have a map view ![](https://i.imgur.com/DCycV5y.png =400x) Unfortunately, not all my photos show up in this view - they either don't carry location information any more, or, somehow photoprism hasn't picked it up. I'll need to investigate more. ### Grouping photos by content 🔎 (!) Photoprism offers a different way to look through the tens of thousands of pictures in my photo gallery by adding labels, depending on the content of the photograph. ![](https://i.imgur.com/gVlzIdA.jpg "Grouping photos by content") Grouping photos by content Hint: In my photos, it came up with a "Baby" label that offered us many smiles! ### Grouping photos by person 👶 👧 🧒 👵 👩‍🦱 (!!) Scanning all photos for faces (with TensorFlow) and grouping photos by person!! This has been a pretty cool way to think about specific friends / family members when we sit down with the family to look at older photos! No pics allowed from this section! ⛔️ ### Custom Albums If the above aren't enough, you can, of course(!!) also create your own albums !! I haven't created any, yet, so ... no pics in this area! *As soon as photoprism offers a way for me to share custom albums with different sets of people, I know I will have a long-term solution to my photo gallery needs!! * ## Verdict I'm really happy right now. My life's memories have found a new, warm, protecting home. It is open source software. There is a fantastic community **and** (I can't stress this enough!!) there are sponsorship options, so that Photoprism can become a self-sustainable project and therefore a long-term solution!! The one area that's missing in photoprism for me is multi-user support / privileges. I'd love to be able to share specific albums with specific family members / groups of friends! That is being considered though, so I'm happy to wait and support the project till they can get round to it! If you enjoyed this, or want to learn more, please feel free to reach out to me with questions / comments on [Twitter](https://twitter.com/@gsaslis), or just leave a comment here.