PhotoPrism is a great photos app. I use it to host photos on my home server, but it is missing one important feature: I would like the visitors to photos.mmakowski.com to be greeted with a public photo wall. Instead, they see the login page, which is of no use to anyone but me. The public photo wall feature in PhotoPrism might come at some unspecified time in the future, so is there any way to achieve something similar right now?
As of writing this, the only way expose a selection of photos to visitors without a PhotoPrism account is to create an album and share it. PhotoPrism then generates a link which, when visited, creates a visitor session that only provides access to the shared album. So, I could create an album with the public photos and then redirect photos.mmakowski.com
to the sharing link for that album.
I run PhotoPrism behind Nginx reverse proxy, so setting up a redirect is easy: just add a section for exact match on the /
location, right before the location / {}
section:
# default public album
location = / {
return 301 https://$host/s/22469d1o1u/public;
}
s/22469d1o1u/public
here is the path part of my public album’s sharing link.
This works as intended. The only downside is that the logout button doesn’t work any more: it deletes the session and then redirects to /
, which, by default, would redirect to /library/login
when no session is present. However, with my setup it doesn’t get a chance to do that, because Nginx first redirects from /
to the shared album, which creates a visitor session. If I end up with a visitor session, the only way to go back to my own account is to go to local storage for the PhotoPrism site (in Firefox it can be accessed via the Storage tab in Web Developer Tools, Shift+F9) and delete the session_id
item. A page refresh then brings up /library/login
.
Update: Sadly, the manual session delete is not possible in the mobile app, and I do want to keep using it, so this solution is not feasible for me, after all.