zlacker

[return to "Self-hosting my photos with Immich"]
1. trizic+QMj[view] [source] 2025-12-06 06:19:03
>>birdcu+(OP)
There is something to be said about NixOS, it really is a matter of setting `services.immich.enable = true;` in a configuration file. I find this really powerful and simpler than docker and docker-compose. But don't get me wrong, I am all for containerization when it comes to other OS/distros. Yes, there is a learning curve for the Nix language and creating your own packages. But anyone who can install a distro can install NixOS. Instead of running your apt/dnf/pacman commands, you edit a file with your package names and services you want to enable, and run `nixos-rebuild switch`. Though, you might find standalone binaries such as uv and its portable Python bundles don't work out the box, there is a a few lines configuration to get it working. Having a single language for configuring all services/applications (neovim,nginx,syncthing,systemd, etc) is refreshing. And of course combined with generative AI, you can set up a lot quickly.

Immich is one of the only apps on iOS that properly does background sync. There is also PhotoSync which is notable for working properly with background sync. I'll take a wild guess that Ente may have got this working right too (at least I'd hope). This works around the limitation that iOS apps can't really run as background apps (appears to me that the app can wake up on some interval, run/sync for a little and try again on the next interval). This is much more usable then for example, the Synology apps for photo sync, which is, the last time I tried, for some reason insanely slow and the phone needs to have the app open and screen on for it fully sync.

Some issues I ran into is the Immich iOS app updating and then being incompatible with the older version of the server installed on my machine. You'd have to disable app updates for all apps, as iOS doesn't support disabling updates for individual apps.

In my specific scenario, the latest version of Immich for NixOS didn't perform a certain migration for my older version of Immich. I had to track down the specific commit that contained the version of Immich which had the migration, apply that, then I was able to get back to the latest version. Luckily, even though I probably applied a few versions before getting the right one, it didn't corrupt the Immich install.

◧◩
2. windex+zRk[view] [source] 2025-12-06 18:09:22
>>trizic+QMj
I've hosted Immich since it came out and all my photos have been migrated to it at this point. I would never host Immich on NixOS (and I do use it for certain things). The reason? It's not simpler than a container option and creates a single point of issue. The container option is tested and supported by Immich, they recommend it. So everything I need is part of that. I moved servers midway through the year and the storage for my Immich implementation is NAS hosted and the mount is simply exposed to the Immich container. It took me less than 15 minutes to move Immich. And while that would have likely been the same with NixOS it's actually more of a chore to roll back with Nix. My Compose file is locked to major/minor and I choose when to do upgrades. But rollbacks are actually simpler IMO. I just stop the container, tar the operational directory, flip the bits in the Compose file and restart. I've not actually had an issue with Immich ever while doing it this way and I manage about 10TB of photos and videos currently in Immich.

I actually thought about doing this with NixOS last year, but it seemed counterproductive compared to how I self-host, I don't want to manage configurations in multiple places. If I switched everything it would likely be just as much work and then I'm reliant on Nix. Over the years I've gone from the OS being a mix of Arch and Ubuntu to mostly just Debian for my self hosting LXC or VMs. I already have the deployments templated so there's nothing for me to do other than map an IP, give it a hostname and start it.

To each their own, but I don't want to be beholden to NixOS for everything. I like the container abstraction on LXC and VMs and it's been very good to minimize the work of self-hosting over 40+ services both in my home lab and in the bare metal server I lease from Hetzner.

[go to top]