explaingit

amrit-regmi/immich_edge

15ShellAudience · ops devopsComplexity · 4/5ActiveSetup · hard

TLDR

Self-hosted edge cache for Immich that runs on a cheap VPS, caching thumbnails and videos so external viewers do not hit your home upload bandwidth.

Mindmap

mindmap
  root((immich-edge))
    Inputs
      Immich API URL
      VPN tunnel
      Domain name
    Outputs
      Cached thumbnails
      Cached video playback
      HTTPS endpoint
    Use Cases
      Speed up shared albums
      Reduce home upload load
      Per-user cache isolation
    Tech Stack
      Docker
      Caddy
      Nginx
      Go
      rclone
      Tailscale

Things people build with this

USE CASE 1

Cache Immich thumbnails on a VPS so friends can browse shared albums quickly

USE CASE 2

Reduce home internet upload load when sharing photo libraries publicly

USE CASE 3

Run an authenticated edge layer that gates every asset request by Immich session or shared-link key

USE CASE 4

Pre-sync recent Immich thumbs and videos to a VPS disk for zero-proxy serving

Tech stack

DockerCaddyNginxGorcloneLua

Getting it running

Difficulty · hard Time to first run · 1h+

Needs a VPS with public DNS, Docker, and a Tailscale or WireGuard tunnel back to a running Immich server before docker compose up works.

In plain English

immich-edge is a self-hosted helper for Immich, the open-source photo and video backup app many people run on a computer at home. The problem it solves is bandwidth: a home internet upload speed is often too slow when friends or family browse your shared photos from outside the house. immich-edge runs on a cheap rented VPS, a small cloud server, and acts as a fast middle layer that caches thumbnails, previews, and encoded videos so external viewers do not have to wait for your home server every time. The full photo library stays at home. The VPS runs four pieces inside Docker containers. Caddy handles HTTPS using a free Let's Encrypt certificate. Nginx checks authentication and serves the cached files. A small Go service called Auth handles the actual permission checks by calling the Immich API over a private VPN tunnel like Tailscale or WireGuard. In one mode, an rclone background process also pulls thumbnail and video files from the home server on a schedule. There are two cache modes. In proxy mode, Nginx caches files on the fly as people view them, keyed per user so one viewer cannot see another viewer's thumbnails. In static mode, rclone copies the relevant Immich folders to the VPS in the background and Nginx serves them straight from disk. Static mode includes pre-eviction of old files when the cache size limit is reached, an incremental sync for new files, and a full sync once every 24 hours to clean up deleted ones. Every request, whether from a logged-in session, an API key, or a shared link, goes through the same gate. Recent auth results are cached in memory for about ten seconds to avoid a round trip over the VPN on every request. Configuration is by environment variables in a .env file, covering domain, VPN endpoint, cache size, TTLs, rate limits, and rclone settings. Getting started is git clone, edit .env, docker compose up.

Copy-paste prompts

Prompt 1
Deploy immich-edge on a fresh Hetzner VPS with Tailscale to my home Immich and explain each .env value
Prompt 2
Compare proxy mode vs static mode in immich-edge for a 500GB library and recommend one with reasoning
Prompt 3
Walk me through the auth flow in the Go service of immich-edge for a password-protected shared link
Prompt 4
Tune CACHE_MAX_SIZE, CACHE_TTL, and AUTH_CACHE_TTL in immich-edge for a 100GB VPS serving 20 family viewers
Prompt 5
Add a Prometheus metrics endpoint to the immich-edge auth service and expose it through Nginx
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.