Immich
High-performance photo and video backup solution.
Overview
Immich is a self-hosted photo and video management solution that provides a Google Photos-like experience with complete control over your data. Developed as a modern alternative to cloud photo services, Immich offers automatic mobile backup, AI-powered search capabilities, face recognition, and intuitive organization features without the privacy concerns or storage limitations of commercial platforms. This Docker stack combines Immich's main server with PostgreSQL using the pgvecto-rs extension for vector similarity searches, Redis for caching and session management, and a dedicated machine learning container that handles AI features like face recognition, object detection, and CLIP-based semantic search. The specialized PostgreSQL variant includes vector database capabilities essential for Immich's AI-powered search functionality, while Redis ensures fast response times for the web interface and mobile apps. This configuration is ideal for families, photography enthusiasts, and privacy-conscious users who want professional-grade photo management without relying on third-party cloud services, offering unlimited storage capacity limited only by your hardware while maintaining complete data ownership.
Key Features
- Automatic mobile photo and video backup with iOS and Android apps
- AI-powered face recognition and clustering for easy person-based searching
- CLIP-based semantic search allowing natural language queries like 'beach sunset'
- Object and scene detection for automatic photo categorization and tagging
- Interactive world map view showing geotagged photos with location clustering
- Memories feature that creates automatic yearly recaps and highlights
- Live Photos support preserving motion from iPhone captures
- Multi-user support with individual libraries and shared album capabilities
Common Use Cases
- 1Family photo backup replacing Google Photos with unlimited storage capacity
- 2Photography enthusiast's personal archive with AI-powered organization and search
- 3Small business photo management for product catalogs or event documentation
- 4Travel photography collection with automatic location mapping and memories
- 5Multi-generational family sharing with secure album distribution to relatives
- 6Content creator's media library with semantic search for quick asset retrieval
- 7Privacy-focused individuals wanting complete control over personal photo data
Prerequisites
- Minimum 4GB RAM recommended for smooth AI processing and face recognition
- At least 50GB free disk space for initial setup plus storage for your photo collection
- Port 2283 available for web interface access and mobile app connectivity
- Mobile device with iOS or Android for automatic photo backup functionality
- Basic understanding of environment variables for database password configuration
- Network storage or external drive mounted if managing large photo collections
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 immich-server: 3 image: ghcr.io/immich-app/immich-server:release4 container_name: immich-server5 restart: unless-stopped6 environment: 7 DB_HOSTNAME: postgres8 DB_USERNAME: immich9 DB_PASSWORD: ${DB_PASSWORD}10 DB_DATABASE_NAME: immich11 REDIS_HOSTNAME: redis12 volumes: 13 - ${UPLOAD_LOCATION}:/usr/src/app/upload14 ports: 15 - "2283:2283"16 depends_on: 17 - redis18 - postgres19 networks: 20 - immich2122 immich-machine-learning: 23 image: ghcr.io/immich-app/immich-machine-learning:release24 container_name: immich-ml25 restart: unless-stopped26 volumes: 27 - immich_ml:/cache28 networks: 29 - immich3031 postgres: 32 image: tensorchord/pgvecto-rs:pg14-v0.2.033 container_name: immich-postgres34 restart: unless-stopped35 environment: 36 POSTGRES_USER: immich37 POSTGRES_PASSWORD: ${DB_PASSWORD}38 POSTGRES_DB: immich39 volumes: 40 - immich_postgres:/var/lib/postgresql/data41 networks: 42 - immich4344 redis: 45 image: redis:alpine46 container_name: immich-redis47 restart: unless-stopped48 networks: 49 - immich5051volumes: 52 immich_ml: 53 immich_postgres: 5455networks: 56 immich: 57 driver: bridge.env Template
.env
1DB_PASSWORD=changeme2UPLOAD_LOCATION=./uploadsUsage Notes
- 1Docs: https://immich.app/docs/overview/introduction
- 2Access at http://localhost:2283 - create admin account on first visit
- 3Mobile apps: iOS and Android for automatic photo backup
- 4ML container handles face recognition, object detection, CLIP search
- 5Set UPLOAD_LOCATION to your photos directory path
- 6Google Photos alternative with excellent search and organization
Individual Services(4 services)
Copy individual services to mix and match with your existing compose files.
immich-server
immich-server:
image: ghcr.io/immich-app/immich-server:release
container_name: immich-server
restart: unless-stopped
environment:
DB_HOSTNAME: postgres
DB_USERNAME: immich
DB_PASSWORD: ${DB_PASSWORD}
DB_DATABASE_NAME: immich
REDIS_HOSTNAME: redis
volumes:
- ${UPLOAD_LOCATION}:/usr/src/app/upload
ports:
- "2283:2283"
depends_on:
- redis
- postgres
networks:
- immich
immich-machine-learning
immich-machine-learning:
image: ghcr.io/immich-app/immich-machine-learning:release
container_name: immich-ml
restart: unless-stopped
volumes:
- immich_ml:/cache
networks:
- immich
postgres
postgres:
image: tensorchord/pgvecto-rs:pg14-v0.2.0
container_name: immich-postgres
restart: unless-stopped
environment:
POSTGRES_USER: immich
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_DB: immich
volumes:
- immich_postgres:/var/lib/postgresql/data
networks:
- immich
redis
redis:
image: redis:alpine
container_name: immich-redis
restart: unless-stopped
networks:
- immich
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 immich-server:5 image: ghcr.io/immich-app/immich-server:release6 container_name: immich-server7 restart: unless-stopped8 environment:9 DB_HOSTNAME: postgres10 DB_USERNAME: immich11 DB_PASSWORD: ${DB_PASSWORD}12 DB_DATABASE_NAME: immich13 REDIS_HOSTNAME: redis14 volumes:15 - ${UPLOAD_LOCATION}:/usr/src/app/upload16 ports:17 - "2283:2283"18 depends_on:19 - redis20 - postgres21 networks:22 - immich2324 immich-machine-learning:25 image: ghcr.io/immich-app/immich-machine-learning:release26 container_name: immich-ml27 restart: unless-stopped28 volumes:29 - immich_ml:/cache30 networks:31 - immich3233 postgres:34 image: tensorchord/pgvecto-rs:pg14-v0.2.035 container_name: immich-postgres36 restart: unless-stopped37 environment:38 POSTGRES_USER: immich39 POSTGRES_PASSWORD: ${DB_PASSWORD}40 POSTGRES_DB: immich41 volumes:42 - immich_postgres:/var/lib/postgresql/data43 networks:44 - immich4546 redis:47 image: redis:alpine48 container_name: immich-redis49 restart: unless-stopped50 networks:51 - immich5253volumes:54 immich_ml:55 immich_postgres:5657networks:58 immich:59 driver: bridge60EOF6162# 2. Create the .env file63cat > .env << 'EOF'64DB_PASSWORD=changeme65UPLOAD_LOCATION=./uploads66EOF6768# 3. Start the services69docker compose up -d7071# 4. View logs72docker 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/immich-v3/run | bashTroubleshooting
- Machine learning container consuming excessive memory: Reduce concurrent face recognition jobs in admin settings or allocate more RAM to the Docker host
- Mobile app fails to backup photos: Check that port 2283 is accessible from your network and verify the server URL in mobile app settings
- Face recognition not working on uploaded photos: Ensure the machine learning container is running and check job queue status in admin panel
- PostgreSQL connection errors on startup: Verify DB_PASSWORD environment variable matches between immich-server and postgres containers
- Slow photo loading and thumbnails: Increase Redis memory allocation or check if upload volume has sufficient disk space and proper permissions
- Upload location permission denied: Ensure the UPLOAD_LOCATION directory has proper read/write permissions for the container user
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
immichpostgresredismachine-learning
Tags
#immich#photos#videos#backup#ai
Category
Storage & BackupAd Space
Shortcuts: C CopyF FavoriteD Download