Deploy PhotoPrism
Before using the one-click template, here is a minimal Docker Compose example for self-hosting PhotoPrism.
If you're new to Docker Compose, check out our guide on how to self-host a Docker Compose app. More stacks are in our Docker Compose library.
Self-host PhotoPrism with Docker Compose (minimal)β
services:
photoprism:
image: photoprism/photoprism:latest
ports:
- "2342:2342"
environment:
PHOTOPRISM_ADMIN_USER: admin
PHOTOPRISM_ADMIN_PASSWORD: changeme
PHOTOPRISM_AUTH_MODE: password
PHOTOPRISM_SITE_URL: "http://localhost:2342/"
PHOTOPRISM_DATABASE_DRIVER: sqlite
volumes:
- photoprism-storage:/photoprism/storage
- photoprism-originals:/photoprism/originals
PhotoPrism's MySQL driver officially requires MariaDB >= 10.5, not plain MySQL. This template uses PhotoPrism's built-in SQLite driver instead, which needs no external database β fine for small-to-medium libraries. If you're running a large library and want MariaDB-grade performance, add a mariadb service yourself and switch PHOTOPRISM_DATABASE_DRIVER to mysql.
Deploy PhotoPrism on Hostim.dev (One-Click)
PhotoPrism is an open-source, self-hosted photo management app that uses on-device AI to automatically tag, organize, and let you search your photo and video library β including facial recognition. With Hostim.dev, you can deploy PhotoPrism with Docker, a managed database, and persistent storage in one click β complete with automatic domain and HTTPS.
π· Your photos, your server, your AI search.
Guest project runs for 1 hour. Log in to save and extend to 5 days.
Why Host PhotoPrism on Hostim.dev?β
- One-click Docker deployment
- Managed database, no setup required
- Persistent volumes for your photo library and generated thumbnails
- Automatic HTTPS and domain
- Real-time logs and metrics
- Fully self-hosted and private
What's includedβ
| Resource | Details |
|---|---|
| App | photoprism/photoprism Docker image |
| Database | Managed MySQL |
| Volumes | /photoprism/storage, /photoprism/originals |
| Domain | Free *.hostim.dev subdomain |
| SSL | Let's Encrypt (auto-enabled) |
| Port | 2342 |
How to Deployβ
- Go to your Hostim.dev dashboard.
- Click Create Project β Use a Template.
- Select PhotoPrism.
- Choose a resource plan.
- Deploy.
- Log in with the generated admin password (shown in your app's environment variables) and change it right away.
Post-Deploy notesβ
Upload your photo library to the volume mounted at /photoprism/originals β connect via Bastion and copy your files in, then trigger a library index from the PhotoPrism UI (Library β Index). Generated thumbnails and metadata live in /photoprism/storage, which is safe to clear and regenerate if you ever need the space back.
FAQβ
Where does PhotoPrism store my photos?
Your original photo and video files live in the /photoprism/originals
volume. Thumbnails, sidecar files, and search index data live in
/photoprism/storage
.
Does PhotoPrism require a database?
Yes. This template provisions a managed MySQL database for PhotoPrism automatically β no setup needed on your side.
How do I upload my photo library?
Connect via Bastion and upload files into the volume mounted at
/photoprism/originals
, then run an index from the UI.
Does facial recognition and AI tagging work out of the box?
Yes, PhotoPrism's built-in TensorFlow models handle tagging and face detection automatically β no extra setup needed for basic use.
Can PhotoPrism run behind a reverse proxy?
Yes. Forward traffic to port 2342.
How do I back up PhotoPrism?
Back up the originals volume (your actual photos), the
storage
volume (index/thumbnails, regenerable), and the managed database.
How do I update PhotoPrism?
Docker: docker compose pull && docker compose up -d
Hostim.dev: redeploy the app.
Alternativesβ
- Immich β Google Photos-style self-hosted alternative
- Nextcloud Photos β bundled with a full file-sync suite
- Lychee β lightweight photo gallery, less AI-focused
Source + Docsβ
- GitHub: https://github.com/photoprism/photoprism
- Documentation: https://docs.photoprism.app
Looking for something else? Browse all templates β