brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: immich upload --dry-run shows what the Immich CLI would upload

Immich
~/tips/tip-immich-cli-upload-dry-run

immich login http://192.168.1.x:2283/api <api-key>

Lists what the Immich command line tool would upload, without uploading anything.

Before a big folder of photos goes into Immich, I would want to see the list first. The Immich command line tool has a --dry-run option for exactly that, and it pairs well with the ignore patterns for raw files and other things you do not want uploaded.

The CLI needs Node.js 22 or newer, or you can use the Docker image. Install it and log in with an API key from your user settings:

npm i -g @immich/cli
immich login http://192.168.1.x:2283/api <api-key>

Then run the upload with --dry-run. It does nothing except show what it would do:

immich upload --dry-run --recursive --ignore '**/Raw/**' ~/Pictures/import/

Without --recursive subfolders are skipped, and --ignore takes a glob pattern, which you can repeat for several patterns. If you want to process the result further, add --json-output. The output has the keys newFiles, duplicates and newAssets, but the first lines are log output, so the docs strip them with tail -n +6 before piping to jq.

Be careful with two options that can remove your originals. --delete removes local files after the upload, and --delete-duplicates removes local files that already exist on the server. Run the same command with --dry-run first, and only drop it when the list looks right.

A smaller caveat: the CLI stores your API key in auth.yml in ~/.config/immich/. The docs ask you to keep that file secure and to run immich logout when you are done.

Further reading: The Immich CLI (Immich docs)

Going deeper: Guide: link Prowlarr to Sonarr and Radarr once, and stop typing indexers into every app

More Immich tips immich upload --skip-hash --recursive directory/ docker exec -it immich_server immich-admin enable-password-login docker exec -it immich_server immich-admin enable-maintenance-mode immich upload --album --recursive ~/Pictures/archive immich upload --ignore "**/Raw/**" --recursive ~/Pictures/2025 All Immich tips (7) All topics

Link