ConfigsApr 20, 2026·3 min read

LibrePhotos — Self-Hosted AI-Powered Photo Management

A self-hosted open-source photo management service with automatic face recognition, object detection, and geolocation tagging powered by machine learning.

Introduction

LibrePhotos is a self-hosted photo management platform that uses machine learning for automatic face recognition, scene classification, and object detection. It provides a Google Photos-like experience while keeping all your images and metadata on your own server, giving you full ownership of your photo library.

What LibrePhotos Does

  • Automatically detects and clusters faces across your photo library for people albums
  • Classifies scenes and objects using pre-trained models for smart search
  • Extracts and displays EXIF metadata including GPS coordinates on an interactive map
  • Generates timeline views with automatic grouping by date and location
  • Supports multi-user setups with individual libraries and sharing capabilities

Architecture Overview

LibrePhotos uses a Django backend with Celery for asynchronous task processing. Machine learning inference runs on-device using PyTorch models for face detection, recognition, and image classification. PostgreSQL stores metadata and user data. The frontend is a React single-page application. Photos are stored on the filesystem and indexed by a background scanner that extracts metadata, generates thumbnails, and runs ML classification pipelines.

Self-Hosting & Configuration

  • Deploy using the official librephotos-docker repository with Docker Compose
  • Mount your existing photo directories as volumes in the container configuration
  • Set ADMIN_EMAIL and ADMIN_PASSWORD in .env for the initial admin account
  • Configure the scan directory path where LibrePhotos will discover new photos
  • Optionally enable GPU passthrough in Docker for faster ML inference on NVIDIA hardware

Key Features

  • Face detection and recognition with automatic clustering into people albums
  • Scene and object classification for intelligent photo search
  • Interactive map view using GPS data from photo EXIF metadata
  • Background photo scanning with automatic thumbnail generation
  • Multi-user support with per-user libraries and sharing

Comparison with Similar Tools

  • PhotoPrism — Similar AI features but uses TensorFlow; LibrePhotos uses PyTorch and offers face clustering
  • Immich — Mobile-first with companion app; LibrePhotos focuses on server-side ML processing
  • Photoview — Lightweight gallery without ML features; LibrePhotos adds face and object recognition
  • Nextcloud Photos — Part of a larger ecosystem; LibrePhotos is purpose-built for photo management
  • Piwigo — Traditional gallery manager; LibrePhotos provides modern AI-driven organization

FAQ

Q: How much storage overhead does LibrePhotos add? A: Thumbnails and ML embeddings typically add 5-10% on top of your original photo storage.

Q: Can I use LibrePhotos without a GPU? A: Yes, ML inference works on CPU. A GPU speeds up the initial scan but is not required for daily use.

Q: Does it support RAW photo formats? A: LibrePhotos supports common RAW formats through its image processing pipeline and generates viewable thumbnails.

Q: How does face recognition training work? A: You manually confirm or correct a few face clusters, and LibrePhotos refines its recognition model for your library.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets