PhotoPrism Photo Management
PhotoPrism AI-powered photo management.
Overview
PhotoPrism is an AI-powered photo management application that uses TensorFlow for automatic image tagging, face recognition, and intelligent organization of photo libraries. Originally developed as a privacy-focused alternative to cloud photo services, PhotoPrism processes RAW files, performs automatic categorization, and creates searchable photo archives without sending data to external services. This stack combines PhotoPrism with MariaDB for metadata storage and Redis for caching and session management, creating a complete photo management solution that can handle large photo collections with fast search and browsing capabilities. The MariaDB database stores all photo metadata, tags, and user information while Redis accelerates the application by caching frequently accessed data and managing user sessions. This combination ensures that PhotoPrism can quickly serve photo galleries, perform complex searches, and handle multiple concurrent users efficiently. This configuration is ideal for photographers, families, and organizations who want to maintain complete control over their photo data while benefiting from modern AI-powered organization features. Unlike cloud-based solutions, this stack keeps all photos and metadata on your own infrastructure, making it perfect for privacy-conscious users and professional photographers who need reliable local storage with advanced search capabilities.
Key Features
- AI-powered automatic tagging using TensorFlow for object and scene recognition
- Facial recognition with automatic people clustering and identification
- Interactive map visualization showing photo locations and geotagging
- Color-based search allowing users to find photos by dominant colors
- RAW file processing supporting professional camera formats from Canon, Nikon, Sony, and others
- Live photo support with automatic pairing of images and video components
- WebDAV synchronization for automatic photo backup from mobile devices
- Advanced search capabilities including date ranges, camera settings, and AI-generated tags
Common Use Cases
- 1Professional photographers managing large RAW photo collections with automatic cataloging
- 2Family photo archiving with automatic face recognition to organize pictures by family members
- 3Photography studios providing clients with private photo galleries and sharing capabilities
- 4Travel photographers using GPS data for automatic location-based photo organization
- 5Wedding photographers delivering organized galleries with automatic couple and guest recognition
- 6Stock photography management with AI-generated tags for efficient keyword searching
- 7Corporate photo archives requiring privacy compliance and local data storage
Prerequisites
- Minimum 4GB RAM recommended for AI processing and photo indexing operations
- Available port 2342 for PhotoPrism web interface access
- Sufficient storage space for both original photos and PhotoPrism's generated thumbnails and metadata
- Basic understanding of photo file formats and directory structures for organizing import folders
- Docker host with adequate CPU power for TensorFlow-based image analysis and face recognition
- Network access for initial setup and potential future updates to AI models
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 photoprism: 3 image: photoprism/photoprism:latest4 container_name: photoprism5 restart: unless-stopped6 ports: 7 - "${PHOTOPRISM_PORT:-2342}:2342"8 environment: 9 - PHOTOPRISM_ADMIN_PASSWORD=${ADMIN_PASSWORD}10 - PHOTOPRISM_DATABASE_DRIVER=mysql11 - PHOTOPRISM_DATABASE_SERVER=mariadb:330612 - PHOTOPRISM_DATABASE_NAME=photoprism13 - PHOTOPRISM_DATABASE_USER=photoprism14 - PHOTOPRISM_DATABASE_PASSWORD=${DB_PASSWORD}15 - PHOTOPRISM_REDIS_HOST=redis16 volumes: 17 - photoprism_storage:/photoprism/storage18 - ${PHOTOS_PATH:-./photos}:/photoprism/originals19 depends_on: 20 - mariadb21 - redis2223 mariadb: 24 image: mariadb:1125 container_name: photoprism-db26 restart: unless-stopped27 environment: 28 - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}29 - MYSQL_DATABASE=photoprism30 - MYSQL_USER=photoprism31 - MYSQL_PASSWORD=${DB_PASSWORD}32 volumes: 33 - mariadb_data:/var/lib/mysql3435 redis: 36 image: redis:7-alpine37 container_name: photoprism-redis38 restart: unless-stopped3940volumes: 41 photoprism_storage: 42 mariadb_data: .env Template
.env
1# PhotoPrism2PHOTOPRISM_PORT=23423ADMIN_PASSWORD=photoprism_admin4PHOTOS_PATH=./photos5DB_PASSWORD=photoprism_db6DB_ROOT_PASSWORD=root_passwordUsage Notes
- 1PhotoPrism at http://localhost:2342
- 2Login with admin credentials
- 3Mount photos directory for import
- 4AI indexing runs automatically
Individual Services(3 services)
Copy individual services to mix and match with your existing compose files.
photoprism
photoprism:
image: photoprism/photoprism:latest
container_name: photoprism
restart: unless-stopped
ports:
- ${PHOTOPRISM_PORT:-2342}:2342
environment:
- PHOTOPRISM_ADMIN_PASSWORD=${ADMIN_PASSWORD}
- PHOTOPRISM_DATABASE_DRIVER=mysql
- PHOTOPRISM_DATABASE_SERVER=mariadb:3306
- PHOTOPRISM_DATABASE_NAME=photoprism
- PHOTOPRISM_DATABASE_USER=photoprism
- PHOTOPRISM_DATABASE_PASSWORD=${DB_PASSWORD}
- PHOTOPRISM_REDIS_HOST=redis
volumes:
- photoprism_storage:/photoprism/storage
- ${PHOTOS_PATH:-./photos}:/photoprism/originals
depends_on:
- mariadb
- redis
mariadb
mariadb:
image: mariadb:11
container_name: photoprism-db
restart: unless-stopped
environment:
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- MYSQL_DATABASE=photoprism
- MYSQL_USER=photoprism
- MYSQL_PASSWORD=${DB_PASSWORD}
volumes:
- mariadb_data:/var/lib/mysql
redis
redis:
image: redis:7-alpine
container_name: photoprism-redis
restart: unless-stopped
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 photoprism:5 image: photoprism/photoprism:latest6 container_name: photoprism7 restart: unless-stopped8 ports:9 - "${PHOTOPRISM_PORT:-2342}:2342"10 environment:11 - PHOTOPRISM_ADMIN_PASSWORD=${ADMIN_PASSWORD}12 - PHOTOPRISM_DATABASE_DRIVER=mysql13 - PHOTOPRISM_DATABASE_SERVER=mariadb:330614 - PHOTOPRISM_DATABASE_NAME=photoprism15 - PHOTOPRISM_DATABASE_USER=photoprism16 - PHOTOPRISM_DATABASE_PASSWORD=${DB_PASSWORD}17 - PHOTOPRISM_REDIS_HOST=redis18 volumes:19 - photoprism_storage:/photoprism/storage20 - ${PHOTOS_PATH:-./photos}:/photoprism/originals21 depends_on:22 - mariadb23 - redis2425 mariadb:26 image: mariadb:1127 container_name: photoprism-db28 restart: unless-stopped29 environment:30 - MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}31 - MYSQL_DATABASE=photoprism32 - MYSQL_USER=photoprism33 - MYSQL_PASSWORD=${DB_PASSWORD}34 volumes:35 - mariadb_data:/var/lib/mysql3637 redis:38 image: redis:7-alpine39 container_name: photoprism-redis40 restart: unless-stopped4142volumes:43 photoprism_storage:44 mariadb_data:45EOF4647# 2. Create the .env file48cat > .env << 'EOF'49# PhotoPrism50PHOTOPRISM_PORT=234251ADMIN_PASSWORD=photoprism_admin52PHOTOS_PATH=./photos53DB_PASSWORD=photoprism_db54DB_ROOT_PASSWORD=root_password55EOF5657# 3. Start the services58docker compose up -d5960# 4. View logs61docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/photoprism-photos-stack/run | bashTroubleshooting
- PhotoPrism shows 'database connection failed': Verify MariaDB container is running and MYSQL_PASSWORD matches PHOTOPRISM_DATABASE_PASSWORD in environment variables
- AI indexing is slow or fails: Increase Docker memory limits as TensorFlow requires substantial RAM for image processing and face recognition
- Photos not appearing after import: Check that the PHOTOS_PATH directory has proper read permissions and PhotoPrism can access mounted volume
- Redis connection errors in logs: Ensure Redis container is healthy and PHOTOPRISM_REDIS_HOST points to correct container name
- Face recognition not working: Verify PhotoPrism has sufficient memory allocation and restart indexing after increasing container resources
- MariaDB fails to start with 'data directory not empty': Remove mariadb_data volume or ensure consistent MySQL credentials across container restarts
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
photoprismmariadbredis
Tags
#photos#ai#gallery#machine-learning
Category
Media & EntertainmentAd Space
Shortcuts: C CopyF FavoriteD Download