Public shares: any valid Immich link opens through the proxy and is recorded in /admin, with a per-share sign-in-only switch; comments stay recipient-only

This commit is contained in:
zyphlar
2026-11-07 22:34:44 -08:00
parent d4ce4444b8
commit 17bf59b218
9 changed files with 368 additions and 42 deletions
+16 -7
View File
@@ -1,11 +1,16 @@
# Immich Magic Proxy
A fork of [Immich Public Proxy](https://github.com/alangrainger/immich-public-proxy) (4.1.1) where shares are
**private**: only people you invite can see them.
A fork of [Immich Public Proxy](https://github.com/alangrainger/immich-public-proxy) (4.1.1) that adds invitations,
comments and new-photo emails. Each share is either **public** (anyone with its Immich link can view it, as upstream)
or **sign-in only** (only people you invite).
- **Magic links.** You add an Immich shared link and the people allowed to see it. Each person gets a personal link.
Without a valid link, every page, photo, video, download and API route answers with a "private photos" page or a
404, and never touches Immich.
- **Public or sign-in only.** Any Immich shared link opened through the proxy is added to `/admin` automatically, as
public. Untick "Public link works" there to make it sign-in only. Shares you add in `/admin` yourself are public
unless you untick the box when adding them. Shares added before this setting existed stay sign-in only. A key
Immich doesn't know is refused, and Immich is asked about it at most once every 10 minutes.
- **Magic links.** You add the people allowed to see a share. Each person gets a personal link. For a sign-in only
share, without a valid link every page, photo, video, download and API route answers with a "private photos"
page or a 404, and never touches Immich.
- **Bookmarkable.** Opening the link signs that browser in with an `HttpOnly` cookie that lasts 400 days (the
browser maximum) and renews itself daily while in use. Sessions live in the database, so restarts don't sign
anyone out. Recipients can bookmark an album, or `/me` for all their albums.
@@ -13,7 +18,8 @@ A fork of [Immich Public Proxy](https://github.com/alangrainger/immich-public-pr
proxy checks every album for new photos and sends one summary email per period, with a sign-in link per album.
Photos that were already there when someone got access are never reported as new.
- **Comments.** Recipients can comment on any photo from the lightbox (comment button, or the info sidebar). They can
delete their own; you can moderate all of them from the admin page.
delete their own; you can moderate all of them from the admin page. Comments are only ever shown to recipients
given that share, never to other visitors of a public share.
- **Lost links.** A visitor with no session can ask for a new link by email. The reply is the same whether or not the
address was invited, and requests are rate-limited.
- **Password-protected shares.** Store the share password when adding the album, and recipients are never asked
@@ -26,7 +32,8 @@ To run it in an LXC container (Proxmox, Incus, LXD) instead of Docker, see [`lxc
1. Set the environment (see `docker-compose.yml`) and start it with `docker compose up -d --build`. Mount a volume at
`/data`: it holds the SQLite database of recipients, sessions and comments. Back it up.
2. Open `/admin` and sign in with `ADMIN_PASSWORD`.
3. Under **Albums**, paste an Immich shared link (`https://immich.example.com/share/...` or `/s/<slug>`).
3. Under **Albums**, paste an Immich shared link (`https://immich.example.com/share/...` or `/s/<slug>`), or just
open it through the proxy. Choose whether its public link works.
4. Under **Recipients**, add each person, tick their albums, and either email the invitation or copy the link.
From a recipient's page you can send a new link, revoke every link and session they have, disable them, or delete
@@ -57,6 +64,8 @@ them.
so don't route it unless you accept that anyone with a share key can upload.
- An Immich share link still works directly on Immich itself; this proxy only controls access through the proxy.
Keep Immich private, as upstream recommends.
- Removing a share in `/admin` doesn't block its link: if Immich still accepts it, opening it adds the share back as
public. To block a share, make it sign-in only, or delete the link in Immich.
The rest of this README is upstream's.