# PhotoPrism — AI-Powered Photo Management for the Self-Hosted Era > PhotoPrism organizes your photo library using AI-powered tagging, face recognition, and location clustering. A polished Google Photos alternative that keeps your photos on your own server. ## Install Save as a script file and run: # PhotoPrism — AI-Powered Photo Library ## Quick Use ```bash # Docker Compose — production-ready mkdir photoprism && cd photoprism curl -L https://dl.photoprism.app/docker/docker-compose.yml -o docker-compose.yml # Edit the compose file to set: # PHOTOPRISM_ADMIN_PASSWORD # PHOTOPRISM_SITE_URL # volume mounts for your photos and storage docker compose up -d # Visit http://localhost:2342 ``` ## Introduction PhotoPrism is the premier open-source alternative to Google Photos and Apple iCloud Photos. It indexes your photo + video library with AI (labels, face recognition, places), provides fast browsing + search, and handles RAW + HEIC + live photos + videos — all self-hosted, with no analytics. With over 39,000 GitHub stars, PhotoPrism is the go-to choice for photographers and privacy-conscious users. It scales from a Raspberry Pi with a family library to a multi-TB server hosting a studio archive. ## What PhotoPrism Does PhotoPrism watches a folder of original photos, runs AI-powered tagging (TensorFlow models for labels, faces, nsfw detection), extracts EXIF + IPTC + XMP metadata, and builds a searchable index in MariaDB. The web UI lets you browse by date, map, albums, labels, and people. Mobile apps (via PWA) give you a Google Photos-like experience. ## Architecture Overview ``` [Originals folder] <-- immutable photo files | [PhotoPrism Go service] Indexer: metadata + AI tagging | [TensorFlow models] labels (1,000+ categories) face detection + clustering nsfw detection | [MariaDB] metadata, albums, labels, faces | [Storage folder] thumbs (generated sizes) sidecars (metadata backups) | [Web UI / PWA] browse, search, albums, face tagging, map ``` ## Self-Hosting & Configuration ```yaml # docker-compose.yml (excerpt) services: photoprism: image: photoprism/photoprism:latest restart: unless-stopped stop_grace_period: 10s depends_on: [mariadb] environment: PHOTOPRISM_ADMIN_PASSWORD: "change-me" PHOTOPRISM_SITE_URL: "https://photos.example.com" PHOTOPRISM_DISABLE_TLS: "true" # behind reverse proxy PHOTOPRISM_ORIGINALS_LIMIT: 5000 # per indexing run PHOTOPRISM_DETECT_NSFW: "false" PHOTOPRISM_UPLOAD_NSFW: "true" PHOTOPRISM_DATABASE_DRIVER: "mysql" PHOTOPRISM_DATABASE_SERVER: "mariadb:3306" PHOTOPRISM_DATABASE_NAME: "photoprism" PHOTOPRISM_DATABASE_USER: "photoprism" PHOTOPRISM_DATABASE_PASSWORD: "insecure" volumes: - "./photos:/photoprism/originals" - "./storage:/photoprism/storage" - "./import:/photoprism/import" ports: - "2342:2342" mariadb: image: mariadb:11 environment: MARIADB_AUTO_UPGRADE: "1" MARIADB_INITDB_SKIP_TZINFO: "1" MARIADB_DATABASE: "photoprism" MARIADB_USER: "photoprism" MARIADB_PASSWORD: "insecure" MARIADB_ROOT_PASSWORD: "insecure" volumes: - "./db:/var/lib/mysql" ``` ```bash # Trigger re-indexing docker compose exec photoprism photoprism index --rescan # CLI bulk operations docker compose exec photoprism photoprism faces recognize docker compose exec photoprism photoprism photos rescan docker compose exec photoprism photoprism backup --all ``` ## Key Features - **AI tagging** — auto-classify 1,000+ labels (beach, sunset, cat, pizza, etc.) - **Face recognition** — detect + cluster faces, manual tagging for identity - **RAW + HEIC support** — processes modern camera + iPhone formats - **Live photos + videos** — preserve motion, browse alongside stills - **Map view** — pin photos by EXIF geolocation - **Albums + smart albums** — saved searches for dynamic collections - **PWA** — install on phone for a Google Photos-like app - **Immutable originals** — strict read-only mode for original files ## Comparison with Similar Tools | Feature | PhotoPrism | Immich | Lychee | Librephotos | Pigallery2 | |---|---|---|---|---|---| | AI tagging | Yes (TF) | Yes (ML) | No | Yes (PhotoSync) | Partial | | Face recognition | Yes | Yes | No | Yes (strong) | No | | Video support | Yes | Yes (best) | Limited | Yes | Limited | | Mobile upload | PWA only | Native iOS/Android | PWA | Native | PWA | | Maturity | Mature | Newer (fast-moving) | Mature | Moderate | Mature | | Best For | Photo archives + AI | iPhone/Android users | Simple gallery | Self-host w/ face tagging | Read-only gallery | ## FAQ **Q: PhotoPrism vs Immich?** A: Both excellent. Immich has better mobile apps (native iOS + Android with backup). PhotoPrism has more mature AI tagging and better handling of existing libraries. Many users install both and compare. **Q: Can it handle 500K photos?** A: Yes with the right hardware — indexing takes hours the first time (AI models run on each photo), subsequent updates are fast. 4GB RAM + SSD storage is the rough minimum for large libraries. **Q: Does it sync with my existing folder structure?** A: Yes. PhotoPrism reads your originals folder exactly as it is. Metadata goes to MariaDB; your file layout stays untouched (unless you enable "move imports"). **Q: Is it really free?** A: Yes, AGPL-3.0 for the open-source edition. PhotoPrism Plus (paid membership) unlocks additional features (e.g., legacy face recognition model, early access) and supports development. ## Sources - GitHub: https://github.com/photoprism/photoprism - Website: https://photoprism.app - Company: PhotoPrism UG - License: AGPL-3.0 --- Source: https://tokrepo.com/en/workflows/306cea9c-381e-11f1-9bc6-00163e2b0d79 Author: Script Depot