Immich CLI skips all photos despite being new #7199

Closed
opened 2026-02-05 12:51:45 +03:00 by OVERLORD · 4 comments
Owner

Originally created by @crashmit on GitHub (Sep 14, 2025).

I have searched the existing issues, both open and closed, to make sure this is not a duplicate report.

  • Yes

The bug

I'm trying to create a small script that among others, uploads images from a folder to immich. The curious issue is that it detects the images for hashing and dupe check, but in the next steps, it says "Found 0 new files and 0 duplicates.

CLI Output:

$ immich upload . -r --delete
Crawling for assets...
Hashing files           | ████████████████████████████████████████ | 100% | ETA: 0s | 26/26 assets
Checking for duplicates | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 0s | 0/26 assets
Found 0 new files and 0 duplicates
All assets were already uploaded, nothing to do.
Deleting assets that have been uploaded...
Deleting local assets | ████████████████████████████████████████ | 100% | ETA: 0s | 0/0 assets

Python Script:

def upload_photos():
    # Login to Immich
    cmd = [
        "immich", "login", IMMICH_API_URL, IMMICH_API_KEY
    ]
    output = subprocess.run(cmd, capture_output=True, text=True, check=True)
    print(output.stdout)

    # Upload photos
    cmd = [
        "immich", "upload", PHOTO_DIR, "-r", "--delete"
    ]
    output = subprocess.run(cmd, capture_output=True, text=True, check=True)
    print(output.stdout)

The OS that Immich Server is running on

Raspbian, Based on Debain 12

Version of Immich Server

v141.1

Version of Immich Mobile App

Irrelevant

Platform with the issue

  • Server
  • Web
  • Mobile

Device make and model

No response

Your docker-compose.yml content

#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    volumes:
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
      # - /volume1/homes/Leo/Fotos/Fertig:/usr/src/app/leo-to-be-uploaded
    env_file:
      - .env
    ports:
      - 2283:2283
    depends_on:
      - redis
      - database
    restart: always

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:148bb5411c184abd288d9aaed139c98123eeb8824c5d3fce03cf721db58066d8
    restart: always

  database:
    container_name: immich_postgres
    image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:5f6a838e4e44c8e0e019d0ebfe3ee8952b69afc2809b2c25f7b0119641978e91
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    restart: always

volumes:
  model-cache:

Your .env content

# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables

# The location where your uploaded files are stored
UPLOAD_LOCATION=./library
# The location where your database files are stored
DB_DATA_LOCATION=./postgres

# The Immich version to use. You can pin this to a specific version like "v1.71.0"
IMMICH_VERSION=release

# Connection secret for postgres. You should change it to a random password
DB_PASSWORD=postgres

# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich

Reproduction steps

  1. Upload Images through Immich CLI
  2. Observe Output

Relevant log output


Additional information

No response

Originally created by @crashmit on GitHub (Sep 14, 2025). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug I'm trying to create a small script that among others, uploads images from a folder to immich. The curious issue is that it detects the images for hashing and dupe check, but in the next steps, it says "Found 0 new files and 0 duplicates. CLI Output: ```Bash $ immich upload . -r --delete Crawling for assets... Hashing files | ████████████████████████████████████████ | 100% | ETA: 0s | 26/26 assets Checking for duplicates | ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | 0% | ETA: 0s | 0/26 assets Found 0 new files and 0 duplicates All assets were already uploaded, nothing to do. Deleting assets that have been uploaded... Deleting local assets | ████████████████████████████████████████ | 100% | ETA: 0s | 0/0 assets ``` Python Script: ```Python def upload_photos(): # Login to Immich cmd = [ "immich", "login", IMMICH_API_URL, IMMICH_API_KEY ] output = subprocess.run(cmd, capture_output=True, text=True, check=True) print(output.stdout) # Upload photos cmd = [ "immich", "upload", PHOTO_DIR, "-r", "--delete" ] output = subprocess.run(cmd, capture_output=True, text=True, check=True) print(output.stdout) ``` ### The OS that Immich Server is running on Raspbian, Based on Debain 12 ### Version of Immich Server v141.1 ### Version of Immich Mobile App Irrelevant ### Platform with the issue - [x] Server - [ ] Web - [ ] Mobile ### Device make and model _No response_ ### Your docker-compose.yml content ```YAML # # WARNING: Make sure to use the docker-compose.yml of the current release: # # https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml # # The compose file on main may not be compatible with the latest release. # name: immich services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} volumes: - ${UPLOAD_LOCATION}:/usr/src/app/upload - /etc/localtime:/etc/localtime:ro # - /volume1/homes/Leo/Fotos/Fertig:/usr/src/app/leo-to-be-uploaded env_file: - .env ports: - 2283:2283 depends_on: - redis - database restart: always immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release} volumes: - model-cache:/cache env_file: - .env restart: always healthcheck: disable: false redis: container_name: immich_redis image: docker.io/redis:6.2-alpine@sha256:148bb5411c184abd288d9aaed139c98123eeb8824c5d3fce03cf721db58066d8 restart: always database: container_name: immich_postgres image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:5f6a838e4e44c8e0e019d0ebfe3ee8952b69afc2809b2c25f7b0119641978e91 environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} POSTGRES_INITDB_ARGS: '--data-checksums' volumes: - ${DB_DATA_LOCATION}:/var/lib/postgresql/data restart: always volumes: model-cache: ``` ### Your .env content ```Shell # You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables # The location where your uploaded files are stored UPLOAD_LOCATION=./library # The location where your database files are stored DB_DATA_LOCATION=./postgres # The Immich version to use. You can pin this to a specific version like "v1.71.0" IMMICH_VERSION=release # Connection secret for postgres. You should change it to a random password DB_PASSWORD=postgres # The values below this line do not need to be changed ################################################################################### DB_USERNAME=postgres DB_DATABASE_NAME=immich ``` ### Reproduction steps 1. Upload Images through Immich CLI 2. Observe Output ### Relevant log output ```shell ``` ### Additional information _No response_
Author
Owner

@github-actions[bot] commented on GitHub (Sep 14, 2025):

This issue has automatically been closed as it is likely a duplicate. We get a lot of duplicate threads each day, which is why we ask you in the template to confirm that you searched for duplicates before opening one. If you're sure this is not a duplicate, please leave a comment and we will reopen the thread if necessary.

@github-actions[bot] commented on GitHub (Sep 14, 2025): This issue has automatically been closed as it is likely a duplicate. We get a lot of duplicate threads each day, which is why we ask you in the template to confirm that you searched for duplicates before opening one. If you're sure this is not a duplicate, please leave a comment and we will reopen the thread if necessary.
Author
Owner

@crashmit commented on GitHub (Sep 14, 2025):

I could not find a similar issue.

@crashmit commented on GitHub (Sep 14, 2025): I could not find a similar issue.
Author
Owner

@bo0tzz commented on GitHub (Sep 14, 2025):

Sounds like those files are already on the server? You can try with --skip-hash to troubleshoot.

@bo0tzz commented on GitHub (Sep 14, 2025): Sounds like those files are already on the server? You can try with --skip-hash to troubleshoot.
Author
Owner

@flibustier commented on GitHub (Oct 1, 2025):

I got the same issue, turns out to be just missing API rights : https://github.com/immich-app/immich/issues/21456

@flibustier commented on GitHub (Oct 1, 2025): I got the same issue, turns out to be just missing API rights : https://github.com/immich-app/immich/issues/21456
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#7199