Top
Best
New

Posted by jamesxv7 20 hours ago

Ask HN: What's the 2025 stack for a self-hosted photo library with local AI?

First of all, this is purely a personal learning project for me, aiming to combine three of my passions: photography, software engineering, and my family memories. I have a large collection of family photos and want to build an interactive experience to explore them, ala Google or Apple Photo features.

My goal is to create a system with smart search capabilities, and one of the most important requirements is that it must run entirely on my local hardware. Privacy is key, but the main driver is the challenge and joy of building it myself (an obviously learn).

The key features I'm aiming for are:

Automatic identification and tagging of family members (local face recognition).

Generation of descriptive captions for each photo.

Natural language search (e.g., "Show me photos of us at the beach in Luquillo from last summer").

I've already prompted AI tools for a high-level project plan, and they provided a solid blueprint (eg, Ollama with LLaVA, a vector DB like ChromaDB, you know it). Now, I'm highly interested in the real-world human experience. I'm looking for advice, learning stories, and the little details that only come from building something similar.

What tools, models, and best practices would you recommend for a project like this in 2025? Specifically, I'm curious about combining structured metadata (EXIF), face recognition data, and semantic vector search into a single, cohesive application.

Any and all advice would be deeply appreciated. Thanks!

194 points | 93 commentspage 2
gavin_gee 18 hours ago|
i swear the single best feature for me would be:

take my photo catalog stored in google photos, apple pictures, Onedrive, Amazon photos. collate into a single store, dedupe. Then build a proper timeline and geo/map view for all the photos.

darknavi 18 hours ago||
Take a look at something like rclone and it immediately becomes clear that the photo app vendors you listed have no interest in allowing their users to easily access their data programmatically from their services in any meaningful way.

Example: https://rclone.org/googlephotos/#limitations

Glaring example:

> The current google API does not allow photos to be downloaded at original resolution. This is very important if you are, for example, relying on "Google Photos" as a backup of your photos. You will not be able to use rclone to redownload original images. You could use 'google takeout' to recover the original photos as a last resort

swyx 18 hours ago|||
(and semantically index/search, face recognition... what else does AI get us these days?)
rusk 18 hours ago||
iPhoto used to do this. The Mac photos app that has replaced it since is nowhere near as good.

In fact I would go so far as to say my personal photo management never really recovered from the transition.

gerdesj 15 hours ago||
Nextcloud with a few addons. Now this might look like overkill for your use case but I get the impression that you might want to go further in future.

Stock NC gets you a very solid general purpose document management system and with a few addons, you basically get self hosted SharePoint and OneDrive without the baggage. The images/pictures side of things has seen quite a lot of development and with some addons you get image classification with fairly minimal effort.

The system as a whole will quite happily handle many 100,000 files with pretty rubbish hardware, if you are happy to wait for batch jobs to run or you throw more hardware at it and speed up the job schedules.

NC has a stock phone app which works very well these days, including camera folder uploads. There are several more apps that integrate with the main one to add optional functionality. For example notes and voip.

It is a very large and mature setup with loads of documentation and hence extensible by a determined hacker if something is missing.

chrisgd 19 hours ago||
This is my dream. I started building something that would upload all my photos from my phone to my desktop, back them up somewhere and then present them 6 at a time on a local website solely so you could look at them again and decide if you wanted to keep them. Heart any you wanted to keep, favorite some, and delete the rest then show me 6 more.

The addition of an AI tool is a great idea.

ssnepenthe 19 hours ago||
The gallery I use has an "internals" page in their docs: https://docs.home-gallery.org/internals/

It gives a sort of high level system overview that might provide some useful insights or inspiration for you.

ggm-at-algebras 12 hours ago||
Dedupe over edited photos, and handling highly approximate date information are my "nobody has this right yet" criteria.
weinzierl 18 hours ago||
In addition to all of that I want an AI solution that pre-selects good images for me, so I do not have to go through all of them manually. Similar to Apple Memories or Featured Photos. Is there anything self-hosted like that?
ranger_danger 20 hours ago||
https://immich.app/

https://ente.io/

https://photonix.org/

https://github.com/LibrePhotos/librephotos

https://github.com/photoprism/photoprism

nullify88 17 hours ago||
I wanted to like Photoprism because unlike Ente and Immich, it supports SQLite databases and doesn't require postgres (I want to keep home lab maintenance to a minimum) but the UI was difficult to like and I couldn't get hardware encoding working on my Intel N100 GPU.
hammyhavoc 6 hours ago||
What about Postgres isn't low-maintenance?

The ball-ache of SQLite not scaling outweighs any "maintenance" Postgres needs (it really is just set-and-forget and use a Docker container to schedule database backups—whole thing takes a couple minutes).

chrismorgan 4 minutes ago|||
“SQLite doesn’t scale” is a common belief, but simply not true. It has limitations on certain sorts of loads, but you won’t run into them on this sort of app—in fact, I would expect consistently better performance from SQLite than from PostgreSQL in typical apps like this. And then SQLite is definitely easier to maintain, being just files.
nullify88 1 hour ago|||
I'm only now just starting out my on prem photo library and have a couple of thousand which sqlite with WAL seems to have no problems with.

Also considering the type of workload, I imagine photo albums to be write heavy upon photo imports but read heavy afterwards which sqlite should excel at. I'll mostly be syncing pictures from our phones, and it'll be me and the wife using it. Postgres is overkill for my needs.

What about having to do db migrations across major updates?

kreyenborgi 20 hours ago||
Have you tried all of these? How are they with very large photo collections?
kevincox 19 hours ago||
I've used PhotoPrism and Immich. Everyone's definition is different I have about 100k photos and videos which are a bit over 1 TiB (original data, not thumbnails and previews). Nether had any performance issues with a few minor exceptions on Immich (I don't recall anything from PhotoPrism but it has been a while now since I switched)

1. The Immich app's performance is awful. It is a well known problem and their current focus. I have pretty high confidence that it will be fixed within a few months. Web app is totally fine though.

2. Some background operations such as AI indexing, face detection and video conversion don't work gracefully when restarted from scratch. They all basically first delete all the old data, then start processing assets. So for many days (depending on your parallelism settings and server performance) you may be completely missing some assets from search or converted videos. But you only need to do this very rarely (change encoding settings and want to apply to the back catalog or switch AI search model). I don't upload at a particularly high rate but my sever can very easy handle the steady state.

1 is pretty major but being worked on and you can work around it by just opening the website. 2 is less important but I don't think there is any work on it.

simonw 20 hours ago||
There are some spectacular local models for generating text descriptions of images now. I suggest starting with Mistral Small 3.2, Gemma 3 and Qwen 2.5VL - all available via Ollama.

I expect we will see a Qwen 3VL soon.

ciaranmca 19 hours ago||
I have used https://www.photoprism.app/ and have found the face recognition to work quite well.
osdamv 19 hours ago|
Photoprism is ok, but the AI features of immich are far superior
hammyhavoc 6 hours ago||
What value are you finding in the AI?
slackpad 18 hours ago|
Haven’t tried it yet (I’d love to find something like this too) but I saw a conference talk on https://docs.voxel51.com/ that looked pretty interesting. It is kind of a data frame for images with a GUI for exploring them. They make it pretty easy to rip various models over your images to add tags, and to evaluate the results.
More comments...