lab-immich-server
/lab-immich-server
Use when a test needs a real Immich server - contract tests, mounting against real data, sign-in with OIDC, checking an API behaviour, or a version-floor check. Builds a disposable, seeded Immich server on the Incus lab host with lab/immich-server/, and explains what is in it and how to reach it.
- Author
- jakobhviid ↗
- Repository
- immich-mount ↗
- Licence
- MIT
- Last repository change
- 11.11.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 1
No signals detected. Repository changed on 11.11.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when a test needs a real Immich server - contract tests, mounting against real data, sign-in with OIDC, checking an API behaviour, or a version-floor check. Builds a disposable, seeded Immich server on the Incus lab host with lab/immich-server/, and explains what is in it and how to reach it.
Original author description
Use when a test needs a real Immich server - contract tests, mounting against real data, sign-in with OIDC, checking an API behaviour, or a version-floor check. Builds a disposable, seeded Immich server on the Incus lab host with lab/immich-server/, and explains what is in it and how to reach it.
How it works
- Build it
- Reach it
- What is in it
- A large library
- Fixtures
- Sign-in with OIDC
- Traps
SKILL.md preview
---
name: lab-immich-server
description: Use when a test needs a real Immich server - contract tests, mounting against real data, sign-in with OIDC, checking an API behaviour, or a version-floor check. Builds a disposable, seeded Immich server on the Incus lab host with lab/immich-server/, and explains what is in it and how to reach it.
---
# A disposable Immich server
Read AGENTS.md, "Testing on Erebus", first: its rules (the `ind-` prefix, the `lab` project, disposable instances kept warm for a session,
throwaway credentials, no personal photos) apply to everything here.
## Build it
```sh
lab/immich-server/up.sh --lan # or no flag for NAT; IMMICH_VERSION=v3.2.0 for the version floor
lab/immich-server/seed.sh # admin, two API keys, 50 fixture photos and the edge cases below
lab/immich-server/oidc.sh # optional: Dex as the OIDC provider, for browser sign-in
```
- **With machine learning:** `lab/immich-server/up.sh --ml` and `seed.sh --ml` build `ind-immich-ml` beside the
plain server (its credentials in `.env.ind-immich-ml.local`, with `IMMICH_ML=1`). Smart search, face detection,
OCR and duplicate detection then work; seeding waits for their jobs, and the first build downloads the models.
Faces are detected, so its people differ from the plain seed: the general contract tests expect the plain
server, and the tests that need machine learning run only where `IMMICH_ML=1`.
- **The version floor beside the current one:** `IMMICH_INSTANCE=ind-immich-32 IMMICH_VERSION=v3.2.0 up.sh`, then
`seed.sh` with the same `IMMICH_INSTANCE`. Each server needs its own tunnel port from this host.
- **In CI:** `lab/immich-server/ci.sh <version>` runs the same seed in a runner's own Docker (the `contract` job in
`.github/workflows/ci.yml`); `fixtures.sh` downloads the fixtures for both.
- `up.sh` takes about 90 s; `seed.sh` about 90 s with cached fixtures, about 160 s from an empty cache.
- **Warm in NAT mode** (AGENTS.md, "Testing on Erebus"): `seed.sh` ends by taking a snapshot of the seeded server,
and every later `up.sh` restores it, so each check starts from the same seed, uploads of earlier checks gone;
`seed.sh` then has nothing to do. `--fresh` builds it again. A LAN-mode server is never kept warm. Dex is not in
the snapshot: run `oidc.sh` again after each `up.sh` that needs it.
- Everything lands in the git-ignored `lab/immich-server/.env.local` (`.env.<instance>.local` for another
`IMMICH_INSTANCE`, so two servers can run side by side): `IMMICH_URL`, a full-access and a read-only key, the
throwaway admin login, and after `oidc.sh` the Dex user (`DEX_EMAIL`, `DEX_PASSWORD`).
- Tear down with `lab/immich-server/down.sh`, always, and before anything else in a LAN-mode run: LAN mode exposes
the server and its throwaway login to the whole LAN.
## Reach it
| From | NAT (default) | LAN (`--lan`) |
|---|---|---|
| this host | only through a tunnel: `apt-get install socat` in the container, then `socat TCP-LISTEN:2283,bind=127.0.0.1,reuseaddr,fork EXEC:"$EREBUS_DIR/bin/incus exec ind-immich-srv -- socat STDIO TCP\:127.0.0.1\:2283"` | its LAN address, which changes between runs (`.env.local` has it) |
| another lab instance on NAT | `http://ind-immich-srv.incus:2283` | its LAN address; the `.incus` name does not resolve |
The lab project forbids proxy devices, so NAT mode has no port forward. Prefer LAN mode when this host runs the
daemon; NAT mode when only lab VMs talk to the server.
## What is in it
Contract tests (`crates/immich-api/tests/contract*.rs`; run them with `cargo test -p immich-api --tests -- --ignored
--test-threads=1` after sourcing `.env.local`) assert these numbers, so a change to the seed changes them. Tests that
change the library put it back before they end:
- **52 uploads:** 51 not trashed (47 images, 4 videos), 50 on the timeline; 40 month buckets across 1970 and
2008-2025; 7 countries and 11 cities; 10 photos with a date but no GPS.
- **One archived** ("Gargoyle water spouts 2") and **one trashed** ("Besættelsesmuseet - Dagligstue").
- **Albums:** "Holiday Mix" (5, one WebM) and "Persons" (3), named like a top-level folder on purpose.
- **One person,** made by hand (no machine learning): `POST /people`, then `POST /faces`.
- **Edge cases:** three different photos uploaded as `IMG_0001.JPG`; `no-date.jpg` with all metadata stripped
(Immich puts it in 1970-01); Unicode and punctuation names (`タテ弁 01.jpg`, `Loew's State Theatre.jpg`, a `…`).
- **Cities are GeoNames' nearest place,** not the obvious one: Times Square is Weehawken, Tokyo Station Hatchōbori.
Machine learning is off (a compose override keeps its container out, and `seed.sh` turns it off in the system
config), so faces are never detected and smart search is unavailable, unless the server was built with `--ml`.
## A large library
`lab/immich-server/bulk.sh 1997-01:450 1998:10` adds generated photos (ffmpeg's test pattern, so no licences and no
personal photos): 450 in January 1997, and 10 in each month of 1998. It waits until Immich has made their
thumbnails, about a minute for a thousand. Use it to measure how folders of many files behave (`lab-bazzite-vm`,
"How long Files is busy"), each measurement on a month the daemon has not seen. The seeded snapshot does not keep
them: run it again after each `up.sh`. Keep months under 500 photos to measure a folder of files: from 500, Photos
splits a month into day folders (`grouping.photos`). The contract tests' numbers count only the seed, so run them
before adding a bulk library, or on a server restored by `up.sh`.
## Fixtures
`fixtures/manifest.json` pins 50 Wikimedia Commons files (CC0, public domain, CC BY, CC BY-SA) with their URLs,
checksums, authors and licenses; `fixtures/ATTRIBUTION.md` is generated from it. The downloads go to the
git-ignored `fixtures/cache/`, which can be deleted at any time.
- **Commons' standard-size renditions, not originals:** `upload.wikimedia.org` answers bulk original downloads with
429 and `Retry-After: 600`. Renditions carry no EXIF, so the manifest pins each original's camera metadata and
`seed-container.sh` writes it back before uploading.
- **A checksum mismatch** means Wikimedia re-rendered a file: run `fixtures/build-manifest.py` to regenerate the
manifest. Set `WIKIMEDIA_UA` to a descriptive User-Agent, as their policy asks.
- **Never add personal photos.** New fixtures are Creative Commons or public domain, added through the manifest.
## Sign-in with OIDC
`oidc.sh` runs Dex beside the server with one static user (`admin@example.com`, so OIDC lands on the seeded
admin) and points Immich's OAuth settings at it. Dex's issuer is plain http, which Immich refuses unless the OAuth
setting `allowInsecureRequests` is on; the script sets it. Real servers use https.
`lab/immich-server/oidc-sign-in.py [path/to/immich-mount]` plays the person at the browser: it runs
`immich-mount login` with a private HOME, fills in Dex's form, and hands the `app.immich:///oauth-callback`
redirect back. It fails unless the CLI signs in and `status` reaches the library.
## Traps
- Source `$EREBUS_DIR/lib/erebus.sh` from bash, never zsh (it needs `BASH_SOURCE`).
- Docker runs in the unprivileged container with `security.nesting=true` alone. Immich supports Docker Compose
only, not Podman.
- The server's own OpenAPI spec is at `$IMMICH_URL/api/spec.json`; check a field there before guessing.
Versions
The database has no other skills named lab-immich-server.
Database snapshot: 13.11.2026 · package version 4223469319e3 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100lab-bazzite-vm
Use to check Immich Mount on Bazzite, GNOME or KDE edition, as its users have it - installed with Homebrew, in a home reached through the /home link, with SELinux enforcing and Bazzite's own file-manager plugins - for example the release check of the Homebrew install. Boots a… - 100lab-desktop-vm
Use to check Immich Mount on a real desktop - GNOME Files or KDE Dolphin, the GNOME or KDE app, thumbnails, sign-in in a browser, uploads by copy and move, keyrings - or to take README screenshots. Brings up a disposable Fedora 44 VM with a headless GNOME or Plasma session on… - 90add-service
Use when installing, adding, updating or moving a self-hosted app or container on the homeserver with Docker Compose (Immich, Jellyfin, Plex, Nextcloud, Vaultwarden and others), or when choosing which app fits a need. - 100incus
Use whenever you need to interact with an incus VM or container — create, destroy, exec, snapshot, list, restore from snapshot, debug, or wire SSH access. Auto-detects whether incus is reachable locally (you're on cypressMini) or whether you must `ssh cypressMini` to reach it.… - 100incus-gha-runners
Set up, extend and troubleshoot GitHub Actions self-hosted runners on one Linux host, each runner in its own long-lived unprivileged Incus system container with its own Docker. Use when someone wants several self-hosted runners on one machine without them interfering, wants to… - 90nvsentinel-lab
Test NVIDIA NVSentinel on a lab cluster through the nvsentinel-lab MCP server - read node and pipeline state, inject a fault into a simulated GPU, and check that NVSentinel detects it, cordons and drains the node, and recovers. Use when asked to test NVSentinel, check its fault…