Last year, I realized I’d uploaded 15,000 photos to Google Photos without really thinking about it. Then I started this homelab journey, and the privacy implications hit me hard. I needed a way to organize decades of family photos, leverage AI for tagging and face recognition, but keep everything on my own hardware. That’s when I discovered PhotoPrism, and it’s genuinely changed how I manage my photo library.
If you’re running Proxmox, Docker, or a NAS, PhotoPrism is exactly what you’ve been looking for. It’s mature, open-source, and runs entirely locally. No subscriptions. No cloud uploads. Just you, your photos, and machine learning that respects your privacy.
Why PhotoPrism Belongs in Your Homelab
Before diving into setup, let me explain why this tool matters for self-hosters. Most photo management solutions—Google Photos, Amazon Photos, Apple Photos—require uploading your images to someone else’s server. Even if they promise encryption, you’re trusting a third party with your family memories.
PhotoPrism flips the script. Everything runs locally. When you upload photos, the AI models that tag faces, detect objects, and analyze colors all run on your hardware. The face recognition doesn’t send data anywhere. The location tagging happens offline. You get the intelligence of a cloud service with the privacy of a shoebox.
What makes it special for homelabbers:
- Raw file support — Process Canon, Nikon, Sony RAW files natively
- Video indexing — Tag and organize video alongside photos
- Face recognition — Automatically groups photos by person (no cloud upload)
- Color search — “Show me all blue photos” actually works
- Map view — EXIF location data displayed on an interactive map
- Docker-native — Runs perfectly in containers with volume mounts
- Low resource overhead — Runs fine on a single-core VM or Raspberry Pi (with caveats)
Setting Up PhotoPrism with Docker Compose
Here’s my production setup. I’m running this on a Proxmox LXC with 4 cores and 8GB RAM, but it scales down reasonably.
First, create a directory structure on your NAS or storage volume:
mkdir -p /mnt/photoprism/{originals,import,database,cache}
cd /mnt/photoprism
Now, here’s the Docker Compose file I use:
version: '3.8'
services:
photoprism:
image: photoprism/photoprism:latest
container_name: photoprism
restart: unless-stopped
security_opt:
- seccomp:unconfined
- apparmor:unconfined
ports:
- "2342:2342"
environment:
PHOTOPRISM_DEBUG: "false"
PHOTOPRISM_UPLOAD_NSFW: "true"
PHOTOPRISM_DETECT_NSFW: "false"
PHOTOPRISM_ADMIN_PASSWORD: "YourStrongPasswordHere"
PHOTOPRISM_DEFAULT_LOCALE: "en"
PHOTOPRISM_DATABASE_DRIVER: "mysql"
PHOTOPRISM_DATABASE_DSN: "photoprism:photoprism@tcp(db:3306)/photoprism?charset=utf8mb4,utf8&parseTime=true&loc=UTC"
PHOTOPRISM_INIT: "mysql"
PHOTOPRISM_WORKERS: "4"
TZ: "America/New_York"
volumes:
- "./originals:/photoprism/originals"
- "./import:/photoprism/import"
- "./cache:/photoprism/cache"
- "./database:/photoprism/database"
depends_on:
- db
db:
image: mysql:8.0
container_name: photoprism-db
restart: unless-stopped
security_opt:
- seccomp:unconfined
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max_connections=512 --transaction-isolation=READ-COMMITTED
volumes:
- "./database:/var/lib/mysql"
environment:
MYSQL_ROOT_PASSWORD: "rootpass123"
MYSQL_DATABASE: "photoprism"
MYSQL_USER: "photoprism"
MYSQL_PASSWORD: "photoprism"
Key settings explained:
PHOTOPRISM_ADMIN_PASSWORD— Change this immediatelyPHOTOPRISM_WORKERS— Set to your CPU core count for faster indexingoriginals— Your actual photo library (read from here)import— Staging folder for new photos (they’ll be organized intooriginals)cache— Thumbnails and previews (can get large; point to fast storage if possible)
Start the stack:
docker-compose up -d
Check logs while it initializes:
docker-compose logs -f photoprism
Once running, visit http://your-server:2342, log in with admin/your-password, and you’re ready.
Importing Your Photo Library
This is the moment of truth. You can import in two ways:
Method 1: Direct Mount (Fast)
If your photos are already on accessible storage, mount them directly to originals in the compose file. PhotoPrism will index everything on startup.
Method 2: Import Folder (Safe)
Drop photos into the import folder via SFTP, Samba, or your file manager. Then use PhotoPrism’s web UI to import them. This is safer for testing.
For 15,000 photos on my setup, indexing took about 4 hours with face recognition enabled. Don’t disable it—the facial grouping is genuinely useful once complete.
Real-World Homelab Integration
Here’s how I’ve woven PhotoPrism into my homelab ecosystem:
Reverse Proxy with Caddy
I run everything behind Caddy. Adding PhotoPrism is trivial:
photos.example.com {
reverse_proxy localhost:2342
}
Now I access it securely from anywhere with my domain.
Automated Imports from Mobile
I use Synology’s Moments or a simple NAS-level folder watcher. Any photo uploaded to a NAS share automatically appears in PhotoPrism’s import folder. Then I batch-import them weekly.
Home Assistant Integration
While PhotoPrism doesn’t have native Home Assistant integration, I’ve created a simple automation: when motion is detected on my front-door camera, a script archives footage and I manually tag it in PhotoPrism. Not fully automated yet, but on my roadmap.
Backup Strategy
The database and cache can be regenerated, so I only back up originals. My database is just metadata; I don’t need multiple copies. This keeps backup sizes manageable.
Tips for Smooth Operation
- Disable NSFW detection initially — It’s aggressive and can slow indexing. Enable it later if you need it.
- Use SSD storage for cache — This is where bottlenecks appear. If your NAS is slow, PhotoPrism will feel sluggish generating thumbnails.
- Schedule indexing at night — Large imports will hammer your system. Use cron or your scheduling tool to start bulk indexing when you’re not using the interface.
- Test with a subset first — Don’t dump 50GB at once. Import 500 photos, let it index, check the results, then scale up.
- Keep database backups — While metadata regenerates, your face groupings and manual edits don’t. Backup
/var/lib/mysqlweekly.
PhotoPrism has become the centerpiece of my homelab photo strategy. It’s the tool that made me finally delete my Google Photos account without anxiety. If you’re serious about privacy and self-hosting, it’s absolutely worth the weekend setup time.
Explore PhotoPrism in our AI Homelab Toolkit.
Recommended Hardware & Hosting
Build your homelab with hardware tested and used by our team.
Affiliate links — we may earn a small commission at no extra cost to you.