Skip to main content

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
note

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.

Try it Yourself

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​

ResourceDetails
Appphotoprism/photoprism Docker image
DatabaseManaged MySQL
Volumes/photoprism/storage, /photoprism/originals
DomainFree *.hostim.dev subdomain
SSLLet's Encrypt (auto-enabled)
Port2342

How to Deploy​

  1. Go to your Hostim.dev dashboard.
  2. Click Create Project β†’ Use a Template.
  3. Select PhotoPrism.
  4. Choose a resource plan.
  5. Deploy.
  6. 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​


Looking for something else? Browse all templates β†’


Try it now​

Deploy PhotoPrism Now – in less than 60 seconds