HUB
Sign inSign up
gpmc-daemon logo

robocrax/gpmc-daemon

By robocrax

β€’Updated 9 minutes ago

Vibe-coded gpmc web UI with multiple profiles

Image
0

1.2K

robocrax/gpmc-daemon repository overview

⁠GPMC Daemon

Full-quality Google Photos backup for your homelab. Your phone's camera roll syncs to a server, and GPMC uploads it to Google Photos in original quality β€” automatically, around the clock. Built on the reverse-engineered mobile API via gpmc⁠, so uploads aren't compressed the way the official Library API forces.

Think of it as a self-hosted, always-on version of gotohp⁠: same upload engine, but it runs 24/7 on a server with a web UI, multiple accounts, and a one-command Proxmox install.

Dashboard


⁠Why

Google Photos stopped offering free unlimited storage, and third-party apps that use the official API can only touch photos they created β€” and they get downscaled. GPMC uses the same API the Android app does, so you back up your own photos at full resolution, on hardware you control.

  πŸ“± your phone  ──Syncthing──▢  πŸ–₯️ this server  ──gpmc──▢  ☁️ Google Photos
   camera roll                   watches a folder            original quality

⁠Features

  • One-click-ish login β€” sign in to Google once, paste a single cookie value, and GPMC builds the upload credential for you. No adb, no mitmproxy, no rooted phone. Scan a QR to do the sign-in from your phone.
  • Multiple accounts β€” back up the whole family; each account is an independent lane with its own folder and schedule.
  • Your folders β€” point each account at any folder on the server (a NAS mount, D:\Phone photos); its Syncthing share moves with it.
  • Live dashboard β€” real photo thumbnails of what's queued, per-file upload progress, countdown to the next run.
  • Runs anywhere β€” Docker, a bare-metal systemd service, or a one-command Proxmox LXC. Headless and always-on.
  • Phone camera auto-upload β€” pairs with Syncthing so new photos flow in by themselves.
  • Sensible defaults β€” skips files already in your account (hash check), optional delete-after-upload to reclaim space, per-folder albums, storage-saver or original quality, retries, and webhook/heartbeat notifications.

⁠Quick start

Explainer and downloads: https://robocrax.github.io/gpmc-daemon/⁠

⁠Windows app

Download GPMC-Setup.exe⁠ (or the portable zip⁠) and run it. GPMC opens in your browser, sits in the tray by the clock and starts when you sign in. Syncthing is built in, so Device Sync works straight away. Windows 10/11, 64-bit; the app isn't code-signed yet, so SmartScreen may ask you to choose More info β†’ Run anyway. Data lives in %LOCALAPPDATA%\GPMC.

Build it yourself with powershell -ExecutionPolicy Bypass -File windows\build.ps1 (see windows/⁠).

⁠Option A β€” Proxmox (one command)

Run on your Proxmox host. Creates an unprivileged Debian LXC (random ID, DHCP), installs GPMC as a service, and sets up Syncthing β€” ready to pair your phone.

curl -fsSL https://raw.githubusercontent.com/robocrax/gpmc-daemon/main/deploy/proxmox-deploy.sh | bash

When it finishes it prints the container IP, the GPMC URL (http://<ip>:8080), and the Syncthing GUI (http://<ip>:8384).

⁠Option B β€” Docker
docker run -d --name gpmc-daemon --restart unless-stopped \
  -p 8080:8080 \
  -v ./data/config:/config \
  -v ./data/sync:/sync \
  robocrax/gpmc-daemon:latest

or with Compose:

git clone https://github.com/robocrax/gpmc-daemon && cd gpmc-daemon
docker compose up -d
⁠Option C β€” Bare metal (no Docker, 24/7)

Any Debian/Ubuntu box. Installs a systemd service that restarts on boot.

git clone https://github.com/robocrax/gpmc-daemon && cd gpmc-daemon
sudo ./install.sh

Service control: systemctl status gpmc-daemon Β· logs: journalctl -u gpmc-daemon -f.

⁠Option D β€” Run it directly (dev)
pip install -r requirements.txt
python run.py           # http://localhost:8080

Then open http://localhost:8080⁠ (or the address printed on your server).


⁠Connect a Google account

Click Connect in the web UI and follow the three steps:

  1. Open Google sign-in (there's a button, and a QR to open it on your phone). Sign in and tap I agree. The page may hang on a spinner β€” that's fine.
  2. Copy the sign-in token: open your browser's DevTools β†’ Application (or Storage) β†’ Cookies β†’ accounts.google.com, and copy the value of the oauth_token cookie.
  3. Paste it into GPMC. It exchanges the token for a long-lived upload credential and verifies it β€” done.

The token is single-use and expires in seconds, so paste it promptly. GPMC stores only the resulting credential, never your Google password. Already have an auth_data string (e.g. from gotohp or ReVanced)? Use "Paste a captured credential instead" in the dialog.


⁠Phone camera auto-upload (Syncthing)

This is the hands-off part: your phone's new photos land in the account's server folder on their own, and GPMC uploads them.

On the server (already installed by the Proxmox deploy; otherwise install Syncthing):

  1. Open the Syncthing GUI at http://<server-ip>:8384. Set a GUI password under Actions β†’ Settings β†’ GUI.

On your phone:

  1. Install a Syncthing client β€” Android: Syncthing or Syncthing-Fork; iOS: Synctrain⁠ (free; its photo backup feeds the shared folder).
  2. Pair the devices: in the server GUI, Actions β†’ Show ID shows a QR code β€” scan it from the phone app to add the server as a remote device. Accept the pairing back on the server.
  3. On the phone, add your camera / DCIM folder and set its folder type to "Send Only" (your phone is the source of truth β€” nothing ever gets deleted from it). Share it with the server.
  4. Back in the server GUI, accept the shared folder and set:
    • Folder path: /var/lib/gpmc-daemon/sync/<account> (match the account's folder name shown in GPMC β€” Proxmox/bare-metal) or /sync/<account> inside the container (Docker).
    • Folder type: "Receive Only".

That's it. New photos sync to the server and GPMC uploads them on the next cycle. (Device Sync in the GPMC UI does steps 3–5 for you: link the phone to an account there and GPMC creates the share at the account's folder.)

About "delete after upload": GPMC can delete each file from the server once it's safely in Google Photos (on by default) to keep the server lean. Because the server folder is Receive Only, those deletions stay local β€” Syncthing will not remove anything from your phone, and won't re-download the deleted files. The server's Syncthing folder will show a growing "Local Additions" count; that's cosmetic. Prefer a spotless Syncthing UI? Turn off Delete after upload in the account's settings (your server will keep the originals).


⁠Choosing each account's folder

Every account starts with its own folder under GPMC_SYNC_DIR (for example /var/lib/gpmc-daemon/sync/mum). To keep its photos somewhere else, open the account's menu β†’ Settings and change Folder to a full path on the server: a NAS mount such as /mnt/photos/mum, or D:\Phone photos on Windows.

  • GPMC creates the folder if it's missing and checks it can write there.
  • The Syncthing share GPMC manages for that account (Device Sync) is moved to the new folder too, so the phone carries on sending to the right place.
  • Whatever is already in the new folder gets backed up, and deleted from it afterwards if Delete after upload is on. Files still waiting in the old folder stay there; move them across if you want them backed up.
  • A folder can't be a whole drive, your home folder, GPMC's own data folder, or overlap another account's folder. Use default puts it back.
  • Removing an account never deletes a folder you picked.
  • Docker: the path is inside the container, so mount the host folder first (for example - /mnt/photos/mum:/photos/mum in docker-compose.yml, then use /photos/mum).

⁠Configuration

Per-account options (folder, albums, quality, threads, delete-after, pause, heartbeat) live in the UI. Global options (backup interval, theme, UI password, webhook) are in Settings. Everything can be seeded from environment variables:

VariableDefaultDescription
PORT8080Web UI / API port
HOST0.0.0.0Bind address
SYNC_INTERVAL_MINUTES5How often to scan & upload
UI_PASSWORD(unset)Sets an initial password lock for the UI
ALLOW_REVEAL_AUTHfalseAllow copying an account's raw auth_data from the UI
GPMC_PROXY(unset)Outbound proxy http://user:pass@host:port
GPMC_CONFIG_DIR/configDatabase, credentials, caches
GPMC_SYNC_DIR/syncDefault media root: one subfolder per account (each account's folder can be changed in the UI)
GPMC_HOME<config>/gpmc_homegpmc's dedup cache (keep persistent)

⁠How it works

  • A background folder watcher keeps each account's queue preview live.
  • A scheduler runs an upload cycle per account on your interval (and on demand).
  • Each cycle calls gpmc in-process with a progress callback, so the dashboard shows real per-file progress. Files already in your account are skipped by hash.
  • Credentials and settings live in a small SQLite database under GPMC_CONFIG_DIR.

⁠Troubleshooting

  • "Needs attention" / auth errors: the account's credential was revoked or is stale. Open the account menu β†’ Reconnect and redo the sign-in.
  • Nothing uploads: check the file landed in the right folder and isn't a Syncthing temp file (.syncthing.*, ~syncthing~*). Hit Back up now.
  • Logs: per-account Activity tab in the UI, or journalctl -u gpmc-daemon -f (bare metal) / docker logs -f gpmc-daemon (Docker).

⁠Credits & disclaimer

Upload engine: xob0t/gpmc⁠. GUI inspiration and the login flow: xob0t/gotohp⁠.

This is an unofficial tool that uses a reverse-engineered API with your own Google account. It isn't affiliated with or endorsed by Google. Use it on accounts you own.

Tag summary

Content type

Image

Digest

sha256:0e5c06007…

Size

76.3 MB

Last updated

9 minutes ago

docker pull robocrax/gpmc-daemon