SelfHostPlanner
Troubleshooting guide · verified July 14, 2026

Running Immich on 4GB RAM means accepting a reduced feature set.

Immich lists 6GB RAM as the minimum and 8GB as recommended. Its requirements page makes one narrow exception: a 4GB system can run with machine-learning features disabled. This guide turns that exception into a reversible operating plan.

Fast answer: if the host has only 4GB, disable Smart Search and Facial Recognition first, set heavy job concurrency to 1, and confirm uploads, thumbnails, playback and database backups remain healthy. Upgrade RAM or move ML to another trusted host if you need the missing features.

What you give up

ChangeLikely effectWhat remains
Disable Smart SearchNo contextual CLIP search; duplicate detection that uses CLIP is also unavailable.Filename, path, metadata and other non-ML search filters.
Disable Facial RecognitionNo new face detection or people clustering.Core photo storage, albums and sharing.
Keep ML but use a smaller face modelLower memory demand, with a possible quality tradeoff.Facial recognition remains available.
Move ML to another hostPreview images cross the private network; another service must be secured and updated.Smart Search and face features can remain enabled.

Safe reduction sequence

  1. Record a baseline. Save the current Immich version and copy the current configuration from Administration → Settings. Check free memory and the Administration → Jobs page before changing anything.
  2. Disable by feature in the admin UI. Under Administration → Settings → Machine Learning Settings, disable Smart Search and Facial Recognition. Immich's FAQ says disabling jobs does not stop the ML service itself; feature disabling is about workload, not container removal.
  3. Reduce concurrency. Immich recommends lowering Smart Search, Face Detection and video-transcoding job concurrency to 1 on constrained systems. Set transcoding threads to 1 or 2 if video work is also causing pressure.
  4. Restart during a quiet window. Restart the stack using the same supported Docker Compose deployment method you already use. Do not delete the database, upload library, generated media or model cache as part of this change.
  5. Verify core workflows. Upload one photo and one representative video. Confirm thumbnail generation, timeline viewing, original download, video playback and the scheduled database dump. Watch memory and failed jobs during the test.
  6. Choose the durable path. If the host stays stable and the missing features are acceptable, document the reduced mode. Otherwise upgrade to at least the official minimum or use remote ML on a trusted machine.

Do not “optimize” the database below its needs

Immich says Postgres needs at least 2GB RAM when Docker resource limits are used, and its data should be on local SSD storage rather than a network share. On a 4GB host, tight container limits can simply move the failure from ML to the database. Treat database stability and backups as non-negotiable.

Recovery checklist

Planning assumptions: this is a stability-first configuration for an existing constrained host, not a claim that 4GB is adequate for every library. No performance benchmark or product test is implied. Library mix, concurrent users, video transcodes and imports can change memory pressure materially.

When remote ML is better

If Smart Search or faces matter, use the remote machine-learning guide. Prefer adding the remote URL while retaining local fallback only when the 4GB host can safely absorb fallback work; otherwise force remote processing and accept that ML jobs fail while the remote host is offline. Never expose the ML service directly to the public internet.

Compare this exception with normal Immich hardware sizing →

故障排查指南 · 核对于 2026 年 7 月 14 日

用 4GB 内存运行 Immich,意味着接受功能精简。

Immich 官方把 6GB 列为最低内存、8GB 列为建议内存。要求页面只给出一个有限例外:关闭机器学习功能后,4GB 系统可以运行。本指南把这个例外变成可回退的操作方案。

快速结论:如果主机只有 4GB,先关闭智能搜索和人脸识别,把高负载任务并发设为 1,并确认上传、缩略图、播放和数据库备份正常。如果需要缺失功能,应升级内存或把 ML 移到另一台可信主机。

会失去什么

变更影响仍然保留
关闭智能搜索无法使用 CLIP 语义搜索;依赖 CLIP 的重复检测也不可用。文件名、路径、元数据等非 ML 搜索过滤。
关闭人脸识别不再进行新人脸检测和人物聚类。照片存储、相册和共享等核心功能。
保留 ML,但使用较小人脸模型降低内存需求,但可能牺牲识别质量。继续使用人脸识别。
把 ML 移到另一台主机预览图会经过私有网络,还要保护和更新额外服务。可保留智能搜索和人脸功能。

安全精简顺序

  1. 记录基线。保存当前 Immich 版本,并从“管理 → 设置”复制当前配置。变更前检查可用内存和“管理 → 任务”页面。
  2. 在管理界面按功能关闭。进入“管理 → 设置 → 机器学习设置”,关闭智能搜索和人脸识别。Immich FAQ 说明:关闭所有任务并不会自动停止 ML 服务;这里首先减少的是工作负载。
  3. 降低并发。Immich 建议受限系统把智能搜索、人脸检测和视频转码任务并发降到 1。若视频处理也造成压力,把转码线程设为 1 或 2。
  4. 在低峰期重启。沿用现有、受支持的 Docker Compose 部署方式重启。不要在本次变更中删除数据库、上传目录、生成媒体或模型缓存。
  5. 验证核心流程。上传一张照片和一个有代表性的视频,确认缩略图、时间线、原图下载、视频播放和计划数据库转储正常,并观察内存和失败任务。
  6. 选择长期方案。如果系统稳定且可以接受缺失功能,记录精简模式;否则升级到官方最低配置,或在可信机器上运行远程 ML。

不要把数据库“优化”到无法稳定运行

Immich 说明:使用 Docker 资源限制时,Postgres 至少需要 2GB 内存;数据库数据应放在本地 SSD,而不是网络共享。4GB 主机上的过紧限制,可能只是把故障从 ML 转移到数据库。数据库稳定性和备份不能妥协。

恢复检查表

规划假设:这是为现有受限主机准备的稳定优先配置,并不表示 4GB 对所有图库都足够,也不构成性能测试。图库内容、并发用户、视频转码和批量导入都会显著改变内存压力。

何时应改用远程 ML

如果智能搜索或人脸功能很重要,请使用远程机器学习指南。只有当 4GB 主机能够安全承受回退负载时,才保留本地回退;否则强制远程处理,并接受远程主机离线时 ML 任务失败。不要把 ML 服务直接暴露到公网。

把这个例外与常规 Immich 硬件规划比较 →

Primary sources / 主要来源