Immich - Photo Library Management
Immich is a self-hosted photo and video management platform. It provides automatic backup, organization, and intelligent search for your photo library.
Quick Facts
- Version: v2.7.5
- URL: https://photos.collabrains.eu
- Database: PostgreSQL 14 + VectorChord (for AI-powered search)
- Status: ✅ Healthy and operational
- Config Path:
/data/coolify/services/IMMICH_SERVICE_ID/
Features
- 📸 Automatic photo/video backup
- 🤖 AI-powered search and recognition
- 📅 Timeline organization
- 👥 Multi-user support with sharing
- 📱 Mobile app support
- 🎬 Video support
- 🔐 End-to-end encryption (optional)
Key Files
| File | Purpose |
|---|---|
docker-compose.yml |
Service definition with PostgreSQL + VectorChord |
.env |
Configuration (API keys, URLs, secrets) |
volumes/ |
Persistent photo/metadata storage |
Common Operations
View Logs
IMMICH_ID=$(docker ps | grep immich_server | awk '{print $NF}' | cut -d_ -f1)
docker logs immich-server-$IMMICH_ID --tail 50 -f
Check Storage Usage
# View total size of Immich volumes
du -sh /var/lib/docker/volumes/*immich*
Backup Strategy
Immich data is automatically backed up daily:
- Time: 2 AM UTC
- Location: /backups/YYYY-MM-DD/immich-postgres.sql (database)
- Volumes: Docker volumes backed up as tar.gz
See Backups & Recovery for restoration.
Restart Immich
cd /data/coolify/services/IMMICH_SERVICE_ID
docker compose restart immich-server
Database Management
PostgreSQL Access
# Connect to Immich's PostgreSQL instance
docker exec -it postgres-IMMICH_ID psql -U immich -d immich
# Useful queries
\dt # List tables
SELECT COUNT(*) FROM assets; # Count photos
VectorChord (AI Index)
VectorChord provides semantic search by indexing photo embeddings: - Automatically populated on photo import - Powers "Search by content" feature - Stored within PostgreSQL 14
Backup Database
# Manual backup
docker exec postgres-IMMICH_ID pg_dump -U immich immich > immich-backup-$(date +%Y%m%d).sql
# Verify backup
ls -lh immich-backup-*.sql
Configuration
Environment Variables
Edit /data/coolify/services/IMMICH_SERVICE_ID/.env:
IMMICH_VERSION=v2.7.5
IMMICH_API_URL=https://photos.collabrains.eu/api
IMMICH_ENVIRONMENT=production
# Database
DB_HOSTNAME=postgres-IMMICH_ID
DB_PORT=5432
DB_USERNAME=immich
DB_PASSWORD=<secure_password>
DB_NAME=immich
# Authentication (if SSO enabled)
OAUTH_ENABLED=true
OAUTH_ISSUER_URL=https://auth.collabrains.eu
Restart After Config Change
docker compose restart
# Wait for health check
docker ps | grep immich
Troubleshooting
Photos Not Uploading
- Check storage space:
df -h / - View logs:
docker logs immich-server --tail 100 - Verify database connection:
docker logs immich-microservices --tail 50
AI Search Not Working
- VectorChord indices may need rebuilding
- Check PostgreSQL logs:
docker logs postgres-IMMICH_ID --tail 50 - Restart microservices:
docker compose restart immich-microservices
Out of Memory
- Increase Docker memory limit in docker-compose.yml
- Or reduce photo optimization settings in Immich admin panel
Database Corruption
- Stop Immich:
docker compose down - Restore from backup (see Backups & Recovery)
- Restart:
docker compose up -d
Performance Tips
- Set automatic photo deletion to retain only recent versions
- Configure thumbnail generation to run during off-peak hours
- Use mobile app's "Optimized" quality for uploads if bandwidth is limited
- Monitor AI indexing progress in Admin → System
Related Documentation
- Backups & Recovery — How to restore photo library
- Monitoring — Performance metrics
- Authentik Integration — SSO setup for Immich