immich-layer
Recipe card from the charly-immich plugin (Images — the deployable catalog).
immich – Self-hosted photo management server
Section titled “immich – Self-hosted photo management server”Candy Properties
Section titled “Candy Properties”| Property | Value |
|---|---|
| Dependencies | supervisord, nodejs, postgresql, redis, ffmpeg |
| Ports | 2283 |
| Volumes | library -> ~/.immich/library, cache -> ~/.immich/cache, import -> ~/.immich/import, external -> ~/.immich/external |
| Service | immich-db-init (oneshot, priority 15), immich-server (priority 30) |
| Route | immich.localhost:2283 |
| Install files | task: |
Environment Variables
Section titled “Environment Variables”| Variable | Value |
|---|---|
IMMICH_VERSION |
v2.7.5 |
IMMICH_HOST / IMMICH_PORT |
0.0.0.0 / 2283 |
IMMICH_MEDIA_LOCATION |
~/.immich/library |
IMMICH_MACHINE_LEARNING_ENABLED |
false |
DB_HOSTNAME / DB_DATABASE_NAME |
127.0.0.1 / immich |
DB_USERNAME / DB_PASSWORD |
immich / immich |
REDIS_HOSTNAME / REDIS_PORT |
127.0.0.1 / 6379 |
NODE_ENV |
production |
Packages
Section titled “Packages”The candy is multi-distro — image libraries are declared per distro:
- RPM:
vips,vips-devel,perl-Image-ExifTool,libheif,LibRaw,gcc-c++,make,unzip - PAC:
libvips(no separate-develsplit — headers ship in the same package),libheif,libraw,perl-image-exiftool,gcc(includesg++),make,unzip
Note: FFmpeg is provided via the ffmpeg dependency candy rather than installed directly.
Build Process (tasks:)
Section titled “Build Process (tasks:)”The root-phase tasks download Immich source, builds the server, web UI, and core plugin:
- Server —
pnpm install --frozen-lockfile && pnpm --filter immich build && pnpm --filter immich deploy --prod /opt/immich/server - Geodata — Downloads reverse geocoding data from geonames.org
- Web UI —
pnpm --filter @immich/sdk --filter immich-web build - Core Plugin — Installs
extism-js(v1.6.0) andbinaryen(v124), thenpnpm run buildinplugins/to compile TypeScript → WASM (plugin.wasm). Build tools are cleaned up after compilation. - PostgreSQL extensions — Init SQL at
/docker-entrypoint-initdb.d/01-immich-extensions.sqlcreatesvector,vchord CASCADE, andearthdistance CASCADEextensions (runs during firstinitdbonly) - Database migration script —
/usr/local/bin/immich-db-migrate.shruns on every container start via theimmich-db-initsupervisord service. Waits for PostgreSQL, then idempotently ensuresvector,earthdistance, andvchord(if available) extensions exist. Handles both fresh installs and upgrades of existing databases. - Server startup wrapper —
/usr/local/bin/immich-server-start.shwaits for PostgreSQL to be ready before starting the Node.js process. Eliminates the crash-restart loop that previously occurred when supervisord startedimmich-serverbefore PostgreSQL finished recovery.
All pnpm commands use npm_config_cache=/tmp/npm-root-cache to avoid creating root-owned files in the container user’s ~/.cache directory.
Secrets
Section titled “Secrets”| Name | Env Vars |
|---|---|
db-password |
DB_PASSWORD, POSTGRES_PASSWORD |
immich: candy: - immichUsed In Boxes
Section titled “Used In Boxes”Related Candies
Section titled “Related Candies”/charly-infrastructure:supervisord– process manager dependency/charly-coder:nodejs– Node.js runtime dependency (provides pnpm for the Immich build)/charly-infrastructure:postgresql– database dependency/charly-infrastructure:redis– cache dependency/charly-selkies:ffmpeg– FFmpeg multimedia (nonfree codecs) — required dependency/charly-infrastructure:vectorchord– VectorChord extension (migration script creates it if available)/charly-immich:immich-ml– optional ML backend
When to Use This Skill
Section titled “When to Use This Skill”Use when the user asks about:
- Immich photo management setup
- Photo library configuration
- Immich database or Redis connectivity
- Port 2283 or
immich.localhostroute - Media processing (vips, ffmpeg, ExifTool)
Related
Section titled “Related”/charly-image:layer— candy authoring reference (charly.ymlschema, task verbs, service declarations)/charly-check:check— declarative testing (check:block,charly check box,charly check live)