PhotoPrism is a photo application that can tag and find pictures automatically and can run at home, on a private server, or in the cloud.[13]
i12bretro tutorial 0902 runs PhotoPrism with MariaDB in Docker, persists storage and originals on the host, and exposes the web UI on port 2342.[13]

The original tutorial video is linked on YouTube.[13]
1. Install Docker
- Log into the Linux device.[13]
- Run:[13]
| |
Reauthenticate after the Docker group update.[13]
2. Create MariaDB and PhotoPrism
- Run the commands that create the directories, network, MariaDB, and PhotoPrism; set the password variables to unique secrets before running.[13]
Set unique database passwords before running. I use matching values for MariaDB and PhotoPrism:[13]
| |
Keep both host volumes: ~/docker/photoprism/storage for application data and ~/docker/photoprism/originals for originals.[13]
mariadb:3306 is the service/port inside the containers network; the database does not need a host port.[13]
3. Open the UI and add photos
- Open
http://DNSorIP:2342.[13] - Log in as
adminwith the password set inPHOTOPRISM_ADMIN_PASSWORD.[13] - Copy photos to
~/docker/photoprism/originals, or use the web UI upload function.[13] - Confirm PhotoPrism displays the photos and the container remains running.[13]
Isolation and content warnings
The tutorial uses --security-opt seccomp=unconfined and --security-opt apparmor=unconfined; these relax sandboxing, so I keep them only when the image/workload requires them and do not expose the app directly to the Internet.[13]
PHOTOPRISM_UPLOAD_NSFW="true" enables uploads of NSFW content according to the source variable; I set a separate policy for users, backups, and sharing.[13]
Replace every CHANGE_ME_* value before running, never commit a secret-filled .env, and do not reuse admin/database passwords between services.[13]
Back up storage, originals, and the database volume before updating the image.[13]
If a password changes after MariaDB initialization, verify the user/password rotation procedure instead of editing the command and blindly recreating containers.[13]
Original tutorial video: [watch it on YouTube]1.[13]
Source
Original source: [Run PhotoPrism - A Google Photos Alternative - In Docker]2, published/updated 2024-08-12.[13]
Sources
[13] https://i12bretro.github.io/tutorials/0902.html — Run PhotoPrism in Docker
https://www.youtube.com/watch?v=R2T89oz0jTA — official i12bretro video. ↩︎
https://i12bretro.github.io/tutorials/0902.html — Run PhotoPrism - A Google Photos Alternative - In Docker. ↩︎


Góp Ý / Bình Luận / Đánh giá