immich cli auth fails with "error: missing required argument 'url'" #7763

Closed
opened 2026-02-20 05:06:44 -05:00 by deekerman · 1 comment
Owner

Originally created by @fiveangle on GitHub (Jan 9, 2026).

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

  • Yes

The bug

Mounded volume to import within immich-server container:
image: ghcr.io/immich-app/immich-server:v2.4.1-cuda
Within shell of running docker image, attempt to authenticate with localhost using generated API key:

root@35abc75e9b51:/import/library# immich -V
2.2.105
root@35abc75e9b51:/import/library# immich
Usage: immich [options] [command]

Command line interface for Immich

Options:
-V, --version output the version number
-d, --config-directory Configuration directory where auth.yml will be stored (default: "/root/.config/immich/", env: IMMICH_CONFIG_DIR)
-u, --url [url] Immich server URL (env: IMMICH_INSTANCE_URL)
-k, --key [key] Immich API key (env: IMMICH_API_KEY)
-h, --help display help for command

Commands:
login|login-key Login using an API key
logout Remove stored credentials
server-info Display server information
upload [options] [paths...] Upload assets
help [command] display help for command
root@35abc75e9b51:/import/library# immich login -u http://127.0.0.1:2383/api -k [api key redacted]
error: missing required argument 'url'
root@35abc75e9b51:/import/library# uname -a
Linux 35abc75e9b51 6.14.11-5-pve #2 SMP PREEMPT_DYNAMIC PMX 6.14.11-5 (2025-12-15T08:44Z) x86_64 GNU/Linux
root@35abc75e9b51:/import/library#

The OS that Immich Server is running on

Proxmox 9.1 (Debian 13), Docker 29.1.3, build f52814d

Version of Immich Server

v2.4.1

Version of Immich Mobile App

NA

Platform with the issue

  • Server
  • Web
  • Mobile

Device make and model

NA

Your docker-compose.yml content

name: immich
services:
  immich-server:
    container_name: immich_server
    image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
    volumes:
      # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
      - ${UPLOAD_LOCATION}:/data
      # Location to bulk-import media into immich via cli
      - /var/lib/docker/volumes/immich/import:/import
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - stack.env
    ports:
      - '2283:2283'
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false

  immich-machine-learning:
    container_name: immich_machine_learning
    image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-cuda
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities:
                - gpu

    env_file:
      - stack.env
    volumes:
      - model-cache:/cache
    restart: always
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/valkey/valkey:9@sha256:fb8d272e529ea567b9bf1302245796f21a2672b8368ca3fcb938ac334e613c8f
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

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

volumes:
  model-cache:

Your .env content

TZ=America/Los_Angeles
IMMICH_VERSION=v2.4.1
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_DATABASE_NAME=immich
UPLOAD_LOCATION=/var/lib/docker/volumes/immich/data
DB_DATA_LOCATION=/var/lib/docker/volumes/immich/postgres

Reproduction steps

  1. shell into running immich-server docker image
  2. execute immich login -u http://127.0.0.1:2383/api -k [api key redacted]
  3. bombs away…
    ...

Relevant log output


Additional information

There was countless conflicting methods for authenticating with the server found on teh iterwebs, but this procedure was from your docs site, so if this is the wrong syntax, prob just needs docs and helptext updated 🤷

Thanks a bunch !

-=dave

Originally created by @fiveangle on GitHub (Jan 9, 2026). ### I have searched the existing issues, both open and closed, to make sure this is not a duplicate report. - [x] Yes ### The bug Mounded volume to import within immich-server container: image: ghcr.io/immich-app/immich-server:v2.4.1-cuda Within shell of running docker image, attempt to authenticate with localhost using generated API key: > root@35abc75e9b51:/import/library# immich -V > 2.2.105 > root@35abc75e9b51:/import/library# immich > Usage: immich [options] [command] > > Command line interface for Immich > > Options: > -V, --version output the version number > -d, --config-directory <directory> Configuration directory where auth.yml will be stored (default: "/root/.config/immich/", env: IMMICH_CONFIG_DIR) > -u, --url [url] Immich server URL (env: IMMICH_INSTANCE_URL) > -k, --key [key] Immich API key (env: IMMICH_API_KEY) > -h, --help display help for command > > Commands: > login|login-key <url> <key> Login using an API key > logout Remove stored credentials > server-info Display server information > upload [options] [paths...] Upload assets > help [command] display help for command > root@35abc75e9b51:/import/library# immich login -u http://127.0.0.1:2383/api -k [api key redacted] > error: missing required argument 'url' > root@35abc75e9b51:/import/library# uname -a > Linux 35abc75e9b51 6.14.11-5-pve #2 SMP PREEMPT_DYNAMIC PMX 6.14.11-5 (2025-12-15T08:44Z) x86_64 GNU/Linux > root@35abc75e9b51:/import/library# ### The OS that Immich Server is running on Proxmox 9.1 (Debian 13), Docker 29.1.3, build f52814d ### Version of Immich Server v2.4.1 ### Version of Immich Mobile App NA ### Platform with the issue - [x] Server - [ ] Web - [ ] Mobile ### Device make and model NA ### Your docker-compose.yml content ```YAML name: immich services: immich-server: container_name: immich_server image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release} volumes: # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file - ${UPLOAD_LOCATION}:/data # Location to bulk-import media into immich via cli - /var/lib/docker/volumes/immich/import:/import - /etc/localtime:/etc/localtime:ro env_file: - stack.env ports: - '2283:2283' depends_on: - redis - database restart: always healthcheck: disable: false immich-machine-learning: container_name: immich_machine_learning image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}-cuda deploy: resources: reservations: devices: - driver: nvidia count: all capabilities: - gpu env_file: - stack.env volumes: - model-cache:/cache restart: always healthcheck: disable: false redis: container_name: immich_redis image: docker.io/valkey/valkey:9@sha256:fb8d272e529ea567b9bf1302245796f21a2672b8368ca3fcb938ac334e613c8f healthcheck: test: redis-cli ping || exit 1 restart: always database: container_name: immich_postgres image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0@sha256:bcf63357191b76a916ae5eb93464d65c07511da41e3bf7a8416db519b40b1c23 environment: POSTGRES_PASSWORD: ${DB_PASSWORD} POSTGRES_USER: ${DB_USERNAME} POSTGRES_DB: ${DB_DATABASE_NAME} POSTGRES_INITDB_ARGS: '--data-checksums' DB_STORAGE_TYPE: 'HDD' volumes: - ${DB_DATA_LOCATION}:/var/lib/postgresql/data shm_size: 128mb restart: always volumes: model-cache: ``` ### Your .env content ```Shell TZ=America/Los_Angeles IMMICH_VERSION=v2.4.1 DB_USERNAME=postgres DB_PASSWORD=postgres DB_DATABASE_NAME=immich UPLOAD_LOCATION=/var/lib/docker/volumes/immich/data DB_DATA_LOCATION=/var/lib/docker/volumes/immich/postgres ``` ### Reproduction steps 1. shell into running _immich-server_ docker image 2. execute `immich login -u http://127.0.0.1:2383/api -k [api key redacted]` 3. bombs away… ... ### Relevant log output ```shell ``` ### Additional information There was countless conflicting methods for authenticating with the server found on teh iterwebs, but this procedure was from your docs site, so if this is the wrong syntax, prob just needs docs and helptext updated 🤷 Thanks a bunch ! -=dave
Author
Owner

@fiveangle commented on GitHub (Jan 9, 2026):

Okay, have new info… apparently the options for denoting the url and key tokens are in fact useless, and the cli will not accept it the command with them, even tho helptext indicates they denote the field tokens. Perhaps they should be removed from the helptext ?

root@35abc75e9b51:/import/library# immich login-key http://127.0.0.1:2283/api [api key redacted]
Logging in to http://127.0.0.1:2283/api
Logged in as [emalredacted]@gmail.com
Wrote auth info to /root/.config/immich/auth.yml

I guess if I want it fixed, I should send a pr grrr. Anyway, thx.

-=dave

@fiveangle commented on GitHub (Jan 9, 2026): Okay, have new info… apparently the options for denoting the url and key tokens are in fact useless, and the cli will not accept it the command with them, even tho helptext indicates they denote the field tokens. Perhaps they should be removed from the helptext ? > root@35abc75e9b51:/import/library# immich login-key http://127.0.0.1:2283/api [api key redacted] > Logging in to http://127.0.0.1:2283/api > Logged in as [emalredacted]@gmail.com > Wrote auth info to /root/.config/immich/auth.yml > I guess if I want it fixed, I should send a pr grrr. Anyway, thx. -=dave
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/immich#7763
No description provided.