• 跳过至主导航
  • 跳过前往主要内容
  • 跳过至主侧边栏

三十而立

立志,躬行

  • 静女其姝

Immich 文档:Config File

2025年2月27日 by glacier 请您留言

可以提供配置文件来替代用户界面配置。

第 1 步 – 创建一个新的配置文件

以 JSON 格式创建一个新的配置文件(如 immich.json),并将其放在 Immich 可以访问的位置。默认配置如下:

# immich.json
{
  "ffmpeg": {
    "crf": 23,
    "threads": 0,
    "preset": "ultrafast",
    "targetVideoCodec": "h264",
    "acceptedVideoCodecs": ["h264"],
    "targetAudioCodec": "aac",
    "acceptedAudioCodecs": ["aac", "mp3", "libopus", "pcm_s16le"],
    "acceptedContainers": ["mov", "ogg", "webm"],
    "targetResolution": "720",
    "maxBitrate": "0",
    "bframes": -1,
    "refs": 0,
    "gopSize": 0,
    "temporalAQ": false,
    "cqMode": "auto",
    "twoPass": false,
    "preferredHwDevice": "auto",
    "transcode": "required",
    "tonemap": "hable",
    "accel": "disabled",
    "accelDecode": false
  },
  "backup": {
    "database": {
      "enabled": true,
      "cronExpression": "0 02 * * *",
      "keepLastAmount": 14
    }
  },
  "job": {
    "backgroundTask": {
      "concurrency": 5
    },
    "smartSearch": {
      "concurrency": 2
    },
    "metadataExtraction": {
      "concurrency": 5
    },
    "faceDetection": {
      "concurrency": 2
    },
    "search": {
      "concurrency": 5
    },
    "sidecar": {
      "concurrency": 5
    },
    "library": {
      "concurrency": 5
    },
    "migration": {
      "concurrency": 5
    },
    "thumbnailGeneration": {
      "concurrency": 3
    },
    "videoConversion": {
      "concurrency": 1
    },
    "notifications": {
      "concurrency": 5
    }
  },
  "logging": {
    "enabled": true,
    "level": "log"
  },
  "machineLearning": {
    "enabled": true,
    "urls": ["http://immich-machine-learning:3003"],
    "clip": {
      "enabled": true,
      "modelName": "ViT-B-32__openai"
    },
    "duplicateDetection": {
      "enabled": true,
      "maxDistance": 0.01
    },
    "facialRecognition": {
      "enabled": true,
      "modelName": "buffalo_l",
      "minScore": 0.7,
      "maxDistance": 0.5,
      "minFaces": 3
    }
  },
  "map": {
    "enabled": true,
    "lightStyle": "https://tiles.immich.cloud/v1/style/light.json",
    "darkStyle": "https://tiles.immich.cloud/v1/style/dark.json"
  },
  "reverseGeocoding": {
    "enabled": true
  },
  "metadata": {
    "faces": {
      "import": false
    }
  },
  "oauth": {
    "autoLaunch": false,
    "autoRegister": true,
    "buttonText": "Login with OAuth",
    "clientId": "",
    "clientSecret": "",
    "defaultStorageQuota": 0,
    "enabled": false,
    "issuerUrl": "",
    "mobileOverrideEnabled": false,
    "mobileRedirectUri": "",
    "scope": "openid email profile",
    "signingAlgorithm": "RS256",
    "profileSigningAlgorithm": "none",
    "storageLabelClaim": "preferred_username",
    "storageQuotaClaim": "immich_quota"
  },
  "passwordLogin": {
    "enabled": true
  },
  "storageTemplate": {
    "enabled": false,
    "hashVerificationEnabled": true,
    "template": "{{y}}/{{y}}-{{MM}}-{{dd}}/{{filename}}"
  },
  "image": {
    "thumbnail": {
      "format": "webp",
      "size": 250,
      "quality": 80
    },
    "preview": {
      "format": "jpeg",
      "size": 1440,
      "quality": 80
    },
    "colorspace": "p3",
    "extractEmbedded": false
  },
  "newVersionCheck": {
    "enabled": true
  },
  "trash": {
    "enabled": true,
    "days": 30
  },
  "theme": {
    "customCss": ""
  },
  "library": {
    "scan": {
      "enabled": true,
      "cronExpression": "0 0 * * *"
    },
    "watch": {
      "enabled": false
    }
  },
  "server": {
    "externalDomain": "",
    "loginPageMessage": ""
  },
  "notifications": {
    "smtp": {
      "enabled": false,
      "from": "",
      "replyTo": "",
      "transport": {
        "ignoreCert": false,
        "host": "",
        "port": 587,
        "username": "",
        "password": ""
      }
    }
  },
  "user": {
    "deleteDelay": 7
  }
}

提示
在 “管理工具”>“设置 ”中有一个按钮,可将当前配置复制到剪贴板。因此,你只需从那里抓取配置,粘贴到文件中就可以了。

第 2 步 – 指定文件位置

在 .env 文件中,将变量 IMMICH_CONFIG_FILE 设置为配置文件的路径。有关详细信息,请参阅环境变量部分。

提示
也支持 YAML 格式的配置文件。

分类: Immich 文档

读者互动

发表回复 取消回复

您的邮箱地址不会被公开。 必填项已用 * 标注

主侧边栏

近期文章

  • Immich 文档:硬件转码
  • Immich 文档:反向代理
  • Immich 文档:Config File
  • Immich 文档:外部图库
  • Immich 文档:快速开始

近期评论

  • 一位WordPress评论者 发表在《世界,您好!》

归档

  • 2025 年 3 月
  • 2025 年 2 月
  • 2019 年 6 月
  • 2019 年 5 月
  • 2019 年 4 月

分类

  • Immich 文档
  • PhotoPrism 文档
  • 未分类

其他操作

  • 登录
  • 条目 feed
  • 评论 feed
  • WordPress.org

Copyright © 2025 · Genesis Sample on Genesis Framework · WordPress · 登录