Self Hosted Google Photos

Self Hosting My Own Google Photos

For my Devember 2023 project I decided to create my own self hosted photo backup solution to use instead of Google Photos. Unfortunately, Devember didn’t happen but my crazy project did! And I thought you all might like to hear my story/mad ramblings.

I have been wanting a good photo back up solution for ages. For a ages I’ve been manually copying photos to hard drives. My older photos are sadly starting corrupt on the ancient drives they are on and I want to avoid this going forward. So the copying to ever larger drives seems unsustainable.

On the Self Hosted Podcast I heard the interview with the creator of Immich. The tl;dr is it’s a self-hosted, open-source Google Photos replacement. It ticks all the boxes for me. It has Android and iOS apps available and is dead simple to use.

Here comes the insanity :wink:! I have a Raspberry Pi 4 4GB model that I use occasionally for work. I love Raspberry Pis. They take a small amount of power to run, have a tiny foot print and I have lots of them so why not use them? This is reasonable so far but don’t worry it gets crazier.

Amazon is selling terabyte USB 3.0 drives super cheaply. They are undoubtedly rubbish but they are really cheap and a 980GB. So here began my intrusive thoughts. I have a USB 3.0 ethernet adapter that also has x3 USB slots. What if, the intrusive thoughts began, I was to buy three and plug them into my RPi4? What if I was to use one of the new(ish) and fancy file systems like ZFS or BTRFS to join the drives together with redundancy? I bet I could use that to host my photos, I thought.

So that is exactly what I did. I looked into both ZFS and BTRFS and went for ZFS1 as it was the best option for me. I then installed immich using the guide.

I noticed setting things up that the Pi is at the absolute limit of power it can supply :sweat_smile:. Running a GUI (required for ease of initial setup) caused the Pi to complain massively. Fortunately, this is a headless box and after the initial setup, I disabled the GUI and it just runs fine. It is also at the limit of the Pi’s CPU and memory but does run!

I had envisioned putting it behind an Nginx reverse proxy to add SSL/TLS but that one extra container was more the poor Pi could bear. In many ways, this isn’t such a bad thing as it forces me to not expose it to the internet as I had originally intended.

After two months of use, I am really happy with this. The Pi is at the limit but not over it! Obviously the read and write speeds to my ZPool are not going to be lightening fast but they don’t need to be and it copies data from my phone at a very reasonable speeds.

My only minor gripe is that the app (both Android and iOS) do not seem to be able to run in the background even when it seemingly has been set up to do so. This could be a user error but I think I’m “doin’ it rite”.

All in all, I’m very happy with this madness. I’ve been wanting to do something more with my Pi beyond using it two or three times a year for work and I’ve been wanting to play with ZFS AND I’ve been searching for a good photo backup solution. So check boxes all round :slight_smile: . I will still be periodically backing up all photos to a large respectable hard drive from the Pi but that will be more of a disaster recovery action than the main photo backup.

I strongly encourage others to self host Immich; it’s great. Can’t say I would reccomend my mad setup if you care about your data but the containers required take up very little resources so you can run this on very minimal hardware.

6 Likes

If you still want to remotely access your server without the extra container and less exposure to the WWW, Tailscale may be a good idea! Awesome write up otherwise!

1 Like

I wonder how hard it would be to integrate with NextCloud??

I was intending to setup Photoprism next week not knowing about Immich, but now I’m undecided.
I quite like Photoprism’s WebDAV imports, but Immich has a decent mobile apps and doesn’t charge money for multiple users.

So far, even on this highly questionable hardware, it’s running like an absolute champ! The multi user experience is working too. I know little to nothing of Photoprism but I can’t say enough good things about Immich.