Librephotos
A self-hosted open source photo management service. This is the repository of the backend.
Install / Use
/learn @LibrePhotos/LibrephotosREADME
<a href="https://hosted.weblate.org/engage/librephotos/">
<img src="https://hosted.weblate.org/widgets/librephotos/-/librephotos-frontend/svg-badge.svg" alt="Translation status" />
</a>
LibrePhotos
<sub>Mockup designed by rawpixel.com / Freepik</sub>
A self-hosted, open-source photo management service with automatic face recognition, object detection, and semantic search — powered by modern machine learning.
- Stable demo is available here: https://demo1.librephotos.com/ . User is
demo, password isdemo1234(with sample images). - Latest development demo is available here: https://demo2.librephotos.com/ (same user/password)
- You can watch development videos on Niaz Faridani-Rad's channel
- You can join our Discord.
Installation
Step-by-step installation instructions are available in our documentation.
System Requirements
| Resource | Minimum | Recommended | |----------|---------|-------------| | RAM | 4 GB | 8 GB+ | | Storage | 10 GB (plus your photo library) | SSD recommended | | CPU | 2 cores | 4+ cores | | OS | Any Docker-compatible OS | Linux |
Note: Machine learning features (face recognition, scene classification, image captioning) are memory-intensive. 8 GB+ RAM is strongly recommended for smooth operation.
Features
- Support for all types of photos including raw photos
- Support for videos
- Timeline view
- Scans pictures on the file system
- Multiuser support
- Generate albums based on events like "Thursday in Berlin"
- Face recognition / Face classification
- Reverse geocoding
- Object / Scene detection
- Semantic image search
- Search by metadata
Tech Stack
Backend
- Framework: Django 5 with Django REST Framework
- Database: PostgreSQL
- Task Queue: Django-Q2
- Image Conversion: ImageMagick
- Video Conversion: FFmpeg
- Exif Support: ExifTool
Frontend
- UI: React 18 with TypeScript
- Build Tool: Vite
- Component Library: Mantine
- Routing: TanStack Router
- Data Fetching: TanStack Query
- Maps: MapLibre GL
- Internationalization: i18next
Machine Learning
- Face detection: face_recognition
- Face classification/clustering: scikit-learn and hdbscan
- Image captioning: im2txt
- Scene classification: places365
- Reverse geocoding: geopy
Infrastructure
- Deployment: Docker & Docker Compose
- Reverse Proxy: Nginx
API Documentation
After starting LibrePhotos, interactive API docs are available at:
- Swagger UI:
http://localhost:3000/api/swagger - ReDoc:
http://localhost:3000/api/redoc
How to help out
- ⭐ Star this repository if you like this project!
- 🚀 Developing: Get started in less than 30 minutes by following this guide. Also see our CONTRIBUTING.md for detailed development setup, code quality standards, and PR guidelines.
- 🗒️ Documentation: Improving the documentation is as simple as submitting a pull request here
- 🧪 Testing: If you want to help find bugs, use the
devtag and update it regularly. If you find a bug, open an issue. - 🧑🤝🧑 Outreach: Talk about this project with other people and help them to get started too!
- 🌐 Translations: Make LibrePhotos accessible to more people with weblate.
- 💸 Donate to the developers of LibrePhotos
Related Projects
| Repository | Description | |------------|-------------| | librephotos-frontend | React/TypeScript web frontend | | librephotos-docker | Docker Compose deployment configurations | | librephotos.docs | Documentation website source | | librephotos-mobile | Mobile application |
License
This project is licensed under the MIT License.
