LibrePhotos
NOTE: i don't use LibrePhotos anymore, this page might get outdated over time.
LibrePhotos is an open-source solution for your own photos management, backup and organization. To be honest, it feels neglected and kind-of-abandoned.
There are other solutions out there like:
- PhotoPrism, which i have no tried yet, but it requires a paid recurrent membership to access some features, and i don't like that.
LibrePhotos seems a fine solution while providing a good web UI and nice Android apps both official LibrePhotos and third party Uhuru Photos that just works.
The biggest drawback to LibrePhotos is that is does not support sub-paths in the Web UI, so you need to expose a port over your tunnels at this time, bypassing NGINX reverse proxy, it's authentication ans HTTPS (this could probably be set-up for LibrePhotos manually).
The base-url issue can be tracked here.
You will be using Podman because base-metal install is pretty complex. Refer to Using Containers on Gentoo for more info on using Podman.
The composer YAML is here:
useradd -d /data/daemons/librephotos -m librephotos su - librephotos git clone https://github.com/LibrePhotos/librephotos-docker.git cd librephotos-docker cp librephotos.env .env
now edit your .env and at very least set:
scanDirectory=/data/Photos data=/data/daemons/librephotos/data httpPort=2283
set any port you like. 2283 is just an example. Then start the containers:
cd /data/daemons/librephotos/librephotos-docker podman compose up -d
Refer to the above linked page on containers on Gentoo to find out how to restart the containers on boot.
Reverse Proxy
Since LibrePhotos does not support subpaths, you cannot use NGINX to serve it. The best solution you cna use is to add a tunnel for port 2283 from your server to your external server, and maybe also add an automatic recirect in NGINX:
- librephotos.conf
location /photos { auth_pam off; return 301 http://$host:2283/; }
Refer to The Reverse Proxy concept on how to enable this config and restart the Reverse Proxy.