This is a personal fork of warreth/gPhotos2Immich. The changes in this fork were coded with Claude (Anthropic's AI assistant) and reviewed by the fork's maintainer. For the original project, its documentation, and support, go upstream. Credit for the app itself belongs to warreth and its contributors.
Syncs Google Photos albums into Immich on a schedule. It can also upload new Immich additions back to Google Photos and import private albums through a browser session.
- Album picker. Choose albums from your Google account (owned and shared) instead of pasting share links. Albums without a share link sync on a schedule as private albums through the account's browser session, and originals are downloaded.
- Auto-add new albums (optional). Watches a Google account and adds new albums that have a share link to the sync list. The first scan records a baseline, and removed albums stay removed.
- Hardening.
- Optional Web UI password (
WEBUI_PASSWORD/WEBUI_PASSWORD_FILE) and a bind address (LISTEN_ADDR). - Failed logins are logged with the username and IP, and an IP is locked out after 5 wrong logins (
WEBUI_LOGIN_MAX_FAILURES,WEBUI_LOGIN_LOCKOUT,WEBUI_TRUSTED_PROXIES). - Request timeouts, body limits, cross-site request blocking and security headers.
- Runs as UID 1000 with no root entrypoint, works with a read-only root filesystem and all capabilities dropped, and has a built-in health check.
- Optional Web UI password (
- Preflight checks. At startup, after config changes and from a dashboard button, the app checks every Immich key (and that it belongs to the right user), key permissions, each Google browser session, every shared album link and ntfy. A failed check skips only the albums that depend on it.
- amd64-only image at
ghcr.io/upmcplanetracker/gphotos2immich. CI is trimmed to the Docker build plus Dependabot.
~/.config/containers/systemd/gphotos2immich.container:
[Unit]
Description=gPhotos2Immich
[Container]
Image=ghcr.io/upmcplanetracker/gphotos2immich:latest
ContainerName=gphotos2immich
UserNS=keep-id:uid=1000,gid=1000
ReadOnly=true
DropCapability=ALL
NoNewPrivileges=true
PublishPort=127.0.0.1:8080:8080
Environment=TZ=America/New_York
Secret=gphotos2immich-webui,type=mount,target=/run/secrets/webui_password
Environment=WEBUI_PASSWORD_FILE=/run/secrets/webui_password
Volume=%h/gphotos2immich/config.json:/app/config.json:Z
Volume=%h/gphotos2immich/data:/app/data:Z
HealthCmd=gphotos2immich healthcheck
HealthInterval=30s
HealthStartPeriod=30s
[Service]
Restart=always
[Install]
WantedBy=default.targetThe unit is named after the file: gphotos2immich.container becomes gphotos2immich.service. If you name the file differently, use that name in the commands below.
1. Create the config and data folders. This skips config.json if it already exists:
mkdir -p ~/gphotos2immich/data
[ -f ~/gphotos2immich/config.json ] || echo '{"googlePhotos": []}' > ~/gphotos2immich/config.json2. Create the Web UI password as a Podman secret. You don't write a secret file yourself. Secret= in the unit refers to a Podman secret, which Podman mounts at /run/secrets/webui_password when the container starts. The prompt below keeps the password out of your shell history:
read -rsp 'WebUI password: ' pw; echo
printf '%s' "$pw" | podman secret create gphotos2immich-webui -
unset pw
podman secret ls # confirm gphotos2immich-webui is listed3. Start the service:
systemctl --user daemon-reload
systemctl --user start gphotos2immich
journalctl --user -u gphotos2immich -n 30When the password loads, the log shows Config Web UI running on http://:8080 (password protected).
4. Log in. Open http://127.0.0.1:8080. The browser asks for a username and a password:
- Username:
admin. To change it, addEnvironment=WEBUI_USER=yournameunder[Container], then runsystemctl --user daemon-reload && systemctl --user restart gphotos2immich. - Password: the one you stored in step 2.
The example publishes the port on 127.0.0.1 only. To reach the UI from another machine, use PublishPort=8080:8080, or a different host port such as PublishPort=8087:8080 if 8080 is taken, or put it behind a reverse proxy.
Changing the password. A running container keeps the old secret, so replace the secret and restart:
podman secret rm gphotos2immich-webui
read -rsp 'New password: ' pw; echo; printf '%s' "$pw" | podman secret create gphotos2immich-webui -; unset pw
systemctl --user restart gphotos2immich-
The service won't start, or exits right away. Check whether another container with the same name or port is already running:
podman ps -a. Stop or remove the old one (podman rm -f gphotos2immich) and start the service again. -
Where the logs are.
journalctl --user -u gphotos2immichfor the service, orpodman logs -f gphotos2immichfor the container. -
"no secret with name or id". The secret from step 2 is missing. Check with
podman secret ls. -
Run it in the foreground. Stop the service, then run the same settings by hand to see what goes wrong:
systemctl --user stop gphotos2immich podman run --rm -it --name gphotos2immich-test \ --userns keep-id:uid=1000,gid=1000 --read-only --cap-drop ALL --security-opt no-new-privileges \ -p 127.0.0.1:8080:8080 -e TZ=America/New_York \ --secret gphotos2immich-webui,type=mount,target=/run/secrets/webui_password \ -e WEBUI_PASSWORD_FILE=/run/secrets/webui_password \ -v "$HOME/gphotos2immich/config.json:/app/config.json:Z" \ -v "$HOME/gphotos2immich/data:/app/data:Z" \ ghcr.io/upmcplanetracker/gphotos2immich:latest
If your unit uses
Network=,User=or other options, add the matchingpodman runflags. To print the exact command Quadlet generates:/usr/lib/systemd/system-generators/podman-system-generator --user --dryrun. -
To check the mounts from inside the container, replace the last line of that command with:
--entrypoint sh ghcr.io/upmcplanetracker/gphotos2immich:latest \ -c 'id; ls -ln /run/secrets/ /app/config.json /app/data' -
"Invalid config" in the log. This doesn't stop the app. It keeps the Web UI running and waits for you to fix the config there. A common cause is an account with an empty
idorimmichUserId.
See docker-compose.yml. It uses the same read-only, no-capabilities setup.
Then open the Web UI on port 8080, connect Immich, add an account with browser cookies for photos.google.com, and use Albums → Choose from Google Photos.
| Variable | Default | Purpose |
|---|---|---|
PORT |
8080 |
Web UI port |
LISTEN_ADDR |
all interfaces | Bind address for the Web UI |
WEBUI_PASSWORD / WEBUI_PASSWORD_FILE |
none | Enables Basic auth. The file (a Podman or Docker secret) wins over the variable |
WEBUI_USER |
admin |
Basic auth username |
DISABLE_WEBUI |
false |
Run headless from config.json |
IMMICH_API_URL / IMMICH_API_KEY |
none | Override the Immich connection in config.json |
LOG_SECRETS |
redacted | show disables log redaction while debugging |
WEBUI_LOGIN_MAX_FAILURES / WEBUI_LOGIN_LOCKOUT |
5 / 15m |
Lock an IP out after this many wrong logins; repeat lockouts double, up to 24h. 0 turns the lockout off |
WEBUI_TRUSTED_PROXIES |
none | Reverse proxy IPs/CIDRs whose X-Forwarded-For names the real client |
Without a password the Web UI is open to anyone who can reach it. It holds Immich API keys and Google session cookies, so set a password or bind it to localhost.
One gPhotos2Immich instance can import for several people on the same Immich server.
One Web UI login for everyone. The Web UI has a single login (WEBUI_USER / the password secret). It is the admin console for the whole instance: whoever logs in sees and manages every account, Immich API key and Google session. It has no per-person logins, so give the login only to whoever runs the instance. The other people never need it; they just see the photos in their own Immich.
Accounts. Each person gets an account under Accounts & Users with their Immich user and their own Immich API key, created in Immich under Account Settings → API Keys while logged in as that person. Immich makes whoever owns the API key the owner of each upload, so the key decides whose library a photo lands in. One account is the default import account. Its key is the main connection, and it owns every album that doesn't say otherwise.
Which album goes to whom. Every album in the sync list has one Import owner (immichAccountId). The control shows on each album when the Web UI is in Advanced mode. The album is imported with that account's key into that person's library. If it's left empty, the album goes to the default import account. Private albums also use that account's Google browser session.
One album, two people. An album has exactly one import owner, so don't list the same share link twice to import it for two people. Import it once, then share it inside Immich: open the album in Immich and add the other user under Share (or use Immich partner sharing). Both people see the same photos, which are stored once.
The preflight checks confirm that each account's key works and belongs to the right Immich user. If one person's key breaks, only that person's albums are skipped.
Logs go to the container output (podman logs -f <container> or journalctl --user -u <service>) and to the Logs page in the Web UI. API keys, email addresses and album share keys are redacted (see LOG_SECRETS).
Every line starts with the date, time and UTC offset of the container's time zone (set TZ, for example TZ=America/New_York). Album lines name the Immich account that imports the album, and each sync cycle ends with totals per account:
time=2026-12-02T11:40:45-05:00 msg="Syncing Google Photos Album" account="Eric Rickin" album_ref=5de6eafe
time=2026-12-02T11:41:02-05:00 msg="Sync finished" account="Eric Rickin" album_ref=5de6eafe added=33 skipped=403 failed=0 total=436
time=2026-12-02T11:41:30-05:00 msg="Sync totals" account="Eric Rickin" albums=2 albums_failed=0 added=35 skipped=413 failed=0
time=2026-12-02T11:41:30-05:00 msg="Sync totals" account="Melissa Marks" albums=1 albums_failed=0 added=5 skipped=120 failed=0
time=2026-12-02T11:41:30-05:00 msg="Sync cycle finished" accounts=2 albums=3 albums_failed=0 added=40 skipped=533 failed=0
account is the account's name from Accounts & Users. With no accounts configured it is the Immich user behind the main key.
Normal logging (the default) shows a few lines per album and sync: which album is syncing, how many photos it found, a Sync finished added=… skipped=… failed=… summary, the per-account totals and the next scheduled run. Preflight results, warnings, errors and failed Web UI logins are always logged.
Debug logging adds a line for every photo: Asset already in album, Downloading item, Uploaded item, dedup decisions and progress every 100 items. A 400-photo album then logs 400+ lines on every sync, even when nothing changed. Turn it on only while troubleshooting.
To switch it:
- Web UI: Advanced → Diagnostics → Debug logging. This applies immediately, no restart needed.
config.json: set"debug": false(ortrue), then restart the container. Edits to the file are read at startup.
CONFIGURATION.md covers every option, the album picker and auto-add, the upload direction, private albums, notifications, and the HTTP endpoints. home-assistant.yaml has a Home Assistant example.
go vet ./...
go test ./...
docker build -t gphotos2immich .Merges to master don't build an image; pull requests only run vet and tests. To publish, push a version tag:
git tag v1.1.0 && git push origin v1.1.0That builds ghcr.io/upmcplanetracker/gphotos2immich and tags it 1.1.0, latest and the commit SHA. To rebuild without a new version, open Actions → Build and publish Docker image (amd64) → Run workflow on master, which updates latest and the SHA tag.
AGPL-3.0, same as upstream. See LICENSE.