Immich.json config file values not normalized #4617

Closed
opened 2026-02-05 10:44:16 +03:00 by OVERLORD · 0 comments
Owner

Originally created by @aclerici38 on GitHub (Oct 23, 2024).

The bug

I run immich using the helm chart, which offers defining the config file in the values. I entered bools as strings for the Oauth section which led to a very confusing week as the Immich server and web browsers interpret "true" as truthy, but the iOS app interprets it as a string which leads to a mismatch in the configuration.

Here is a screenshot of the string-enclosed values and the ui interpreting them
image

Here is the /api/server/features endpoint with bools wrapped in quotes in the config file:
{"smartSearch":true,"facialRecognition":true,"duplicateDetection":true,"map":true,"reverseGeocoding":true,"importFaces":false,"sidecar":true,"search":true,"trash":true,"oauth":"true","oauthAutoLaunch":"false","passwordLogin":"true","configFile":true,"email":false}

Versus no quotes:
{"smartSearch":true,"facialRecognition":true,"duplicateDetection":true,"map":true,"reverseGeocoding":true,"importFaces":false,"sidecar":true,"search":true,"trash":true,"oauth":true,"oauthAutoLaunch":false,"passwordLogin":true,"configFile":true,"email":false}

The OS that Immich Server is running on

k3s v1.30.5+k3s1 on Debian 12 Bookworm

Version of Immich Server

v1.118.2

Version of Immich Mobile App

v1.118.0 build.180

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

Helm values.yaml*

env:
  TZ: America/Los_Angeles
  IMMICH_LOG_LEVEL: verbose
  DB_HOSTNAME:
    valueFrom:
      secretKeyRef:
        name: immich-secret
        key: DB_HOSTNAME
  DB_USERNAME:
    valueFrom:
      secretKeyRef:
        name: immich-secret
        key: DB_USERNAME
  DB_DATABASE_NAME:
    valueFrom:
      secretKeyRef:
        name: immich-secret
        key: DB_DATABASE_NAME
  DB_PASSWORD:
    valueFrom:
      secretKeyRef:
        name: immich-secret
        key: DB_PASSWORD
  PUBLIC_IMMICH_SERVER_URL:
    valueFrom:
      secretKeyRef:
        name: immich-secret
        key: PUBLIC_IMMICH_SERVER_URL

immich:
  metrics:
    enabled: true

  persistence:
    library:
      existingClaim: immich-library

  configuration:
    trash:
      enabled: true
      days: 30
    ffmpeg:
      preset: p7
      twoPass: true
      preferredHwDevice: cuda
      transcode: required
      accel: nvenc
      accelDecode: true

    job:
      backgroundTask:
        concurrency: 10
      smartSearch:
        concurrency: 4
      metadataExtraction:
        concurrency: 10
      faceDetection:
        concurrency: 4
      search:
        concurrency: 10
      sidecar:
        concurrency: 10
      library:
        concurrency: 10
      migration:
        concurrency: 10
      thumbnailGeneration:
        concurrency: 6
      videoConversion:
        concurrency: 2
      notifications:
        concurrency: 10

    oauth:
      enabled: "true"
      issuerUrl: https://auth.mydomain.com/application/o/immich/
      autoLaunch: "false"
      autoRegister: "true"
      buttonText: Login with Authentik
      clientId: secret
      clientSecret: secret
    
    passwordLogin:
      enabled: "true"

  resources:
    limits:
      nvidia.com/gpu: 1

redis:
  enabled: true
  architecture: standalone
  auth:
    enabled: false

server:
  enabled: true
  runtimeClassName: nvidia
  securityContext:
    runAsUser: 999
    runAsGroup: 993
  
  image:
    repository: ghcr.io/immich-app/immich-server
    tag: v1.118.2
    pullPolicy: IfNotPresent
  ingress:
    main:
      enabled: true
      className: internal
      annotations:
        nginx.ingress.kubernetes.io/proxy-body-size: "0"
        cert-manager.io/cluster-issuer: "letsencrypt-production"
      hosts:
        - host: &fqdn immich.mydomain.com
          paths:
            - path: /
      tls:
        - hosts:
          - *fqdn
          secretName: "{{ .Release.Name }}-tls"

  resources:
    requests:
      nvidia.com/gpu: 1
    limits:
      nvidia.com/gpu: 1

machine-learning:
  enabled: true
  runtimeClassName: nvidia
  image:
    repository: ghcr.io/immich-app/immich-machine-learning
    tag: v1.118.2-cuda
    pullPolicy: IfNotPresent
  env:
    TRANSFORMERS_CACHE: /cache
      volumeMounts:
        - name: cache
          mountPath: /cache
  persistence:
    cache:
      enabled: true
      size: 50Gi
      accessMode: ReadWriteOnce
      storageClass: longhorn-nvme
  resources:
    requests:
      nvidia.com/gpu: 1
    limits:
      nvidia.com/gpu: 1

defaultPodOptions:
  fsGroup: 993
  fsGroupChangePolicy: OnRootMismatch

persistence:
  family-photos:
    enabled: true
    type: nfs
    server: 10.0.30.25
    path: /mnt/tank/family

Your .env content

Kubernetes secret*

apiVersion: v1
kind: Secret
metadata:
  name: immich-secret
  namespace: home
type: Opaque
data:
  DB_HOSTNAME: 
  DB_USERNAME: 
  DB_DATABASE_NAME: 
  DB_PASSWORD: 
  PUBLIC_IMMICH_SERVER_URL: 

  # username and password for cnpg db init
  username:
  password:

Reproduction steps

  1. Configure oauth in Immich using the Immich.json config file
  2. Wrap bools in quotes
  3. Navigate to Immich login in a browser. The "sign in with Oauth" button will appear
  4. Attempt to sign into immich in the iOS app. the Oauth button will not appear

Relevant log output

No response

Additional information

https://discord.com/channels/979116623879368755/1296352676358918217

Originally created by @aclerici38 on GitHub (Oct 23, 2024). ### The bug I run immich using the helm chart, which offers defining the config file in the values. I entered bools as strings for the Oauth section which led to a very confusing week as the Immich server and web browsers interpret "true" as truthy, but the iOS app interprets it as a string which leads to a mismatch in the configuration. Here is a screenshot of the string-enclosed values and the ui interpreting them ![image](https://github.com/user-attachments/assets/28e77f24-7862-4cca-bfa2-ecb7edc1b447) Here is the /api/server/features endpoint with bools wrapped in quotes in the config file: `{"smartSearch":true,"facialRecognition":true,"duplicateDetection":true,"map":true,"reverseGeocoding":true,"importFaces":false,"sidecar":true,"search":true,"trash":true,"oauth":"true","oauthAutoLaunch":"false","passwordLogin":"true","configFile":true,"email":false}` Versus no quotes: `{"smartSearch":true,"facialRecognition":true,"duplicateDetection":true,"map":true,"reverseGeocoding":true,"importFaces":false,"sidecar":true,"search":true,"trash":true,"oauth":true,"oauthAutoLaunch":false,"passwordLogin":true,"configFile":true,"email":false}` ### The OS that Immich Server is running on k3s v1.30.5+k3s1 on Debian 12 Bookworm ### Version of Immich Server v1.118.2 ### Version of Immich Mobile App v1.118.0 build.180 ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML Helm values.yaml* env: TZ: America/Los_Angeles IMMICH_LOG_LEVEL: verbose DB_HOSTNAME: valueFrom: secretKeyRef: name: immich-secret key: DB_HOSTNAME DB_USERNAME: valueFrom: secretKeyRef: name: immich-secret key: DB_USERNAME DB_DATABASE_NAME: valueFrom: secretKeyRef: name: immich-secret key: DB_DATABASE_NAME DB_PASSWORD: valueFrom: secretKeyRef: name: immich-secret key: DB_PASSWORD PUBLIC_IMMICH_SERVER_URL: valueFrom: secretKeyRef: name: immich-secret key: PUBLIC_IMMICH_SERVER_URL immich: metrics: enabled: true persistence: library: existingClaim: immich-library configuration: trash: enabled: true days: 30 ffmpeg: preset: p7 twoPass: true preferredHwDevice: cuda transcode: required accel: nvenc accelDecode: true job: backgroundTask: concurrency: 10 smartSearch: concurrency: 4 metadataExtraction: concurrency: 10 faceDetection: concurrency: 4 search: concurrency: 10 sidecar: concurrency: 10 library: concurrency: 10 migration: concurrency: 10 thumbnailGeneration: concurrency: 6 videoConversion: concurrency: 2 notifications: concurrency: 10 oauth: enabled: "true" issuerUrl: https://auth.mydomain.com/application/o/immich/ autoLaunch: "false" autoRegister: "true" buttonText: Login with Authentik clientId: secret clientSecret: secret passwordLogin: enabled: "true" resources: limits: nvidia.com/gpu: 1 redis: enabled: true architecture: standalone auth: enabled: false server: enabled: true runtimeClassName: nvidia securityContext: runAsUser: 999 runAsGroup: 993 image: repository: ghcr.io/immich-app/immich-server tag: v1.118.2 pullPolicy: IfNotPresent ingress: main: enabled: true className: internal annotations: nginx.ingress.kubernetes.io/proxy-body-size: "0" cert-manager.io/cluster-issuer: "letsencrypt-production" hosts: - host: &fqdn immich.mydomain.com paths: - path: / tls: - hosts: - *fqdn secretName: "{{ .Release.Name }}-tls" resources: requests: nvidia.com/gpu: 1 limits: nvidia.com/gpu: 1 machine-learning: enabled: true runtimeClassName: nvidia image: repository: ghcr.io/immich-app/immich-machine-learning tag: v1.118.2-cuda pullPolicy: IfNotPresent env: TRANSFORMERS_CACHE: /cache volumeMounts: - name: cache mountPath: /cache persistence: cache: enabled: true size: 50Gi accessMode: ReadWriteOnce storageClass: longhorn-nvme resources: requests: nvidia.com/gpu: 1 limits: nvidia.com/gpu: 1 defaultPodOptions: fsGroup: 993 fsGroupChangePolicy: OnRootMismatch persistence: family-photos: enabled: true type: nfs server: 10.0.30.25 path: /mnt/tank/family ``` ### Your .env content ```Shell Kubernetes secret* apiVersion: v1 kind: Secret metadata: name: immich-secret namespace: home type: Opaque data: DB_HOSTNAME: DB_USERNAME: DB_DATABASE_NAME: DB_PASSWORD: PUBLIC_IMMICH_SERVER_URL: # username and password for cnpg db init username: password: ``` ### Reproduction steps 1. Configure oauth in Immich using the Immich.json config file 2. Wrap bools in quotes 3. Navigate to Immich login in a browser. The "sign in with Oauth" button will appear 4. Attempt to sign into immich in the iOS app. the Oauth button will not appear ### Relevant log output _No response_ ### Additional information https://discord.com/channels/979116623879368755/1296352676358918217
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#4617