97 字
1 分钟
Immich 图片管理软件部署备忘录
2026-02-08

Immich 是一款自托管照片和视频管理软件,支持 Web、Android、iOS 多端同步,保护用户隐私。

官网:immich.app | 安装文档:docker-compose

下载配置文件#

wget -O docker-compose.yml https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
wget -O .env https://github.com/immich-app/immich/releases/latest/download/example.env

docker-compose.yml(支持 Intel 核显 OpenVINO)#

docker-compose.yaml
name: immich
services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
devices:
- /dev/dri:/dev/dri
volumes:
- ${UPLOAD_LOCATION}:/data
- /etc/localtime:/etc/localtime:ro
# 反向地理编码汉化
- ./geodata-cn/geodata:/build/geodata
- ./geodata-cn/i18n-iso-countries/langs:/usr/src/app/server/node_modules/i18n-iso-countries/langs
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}-openvino
devices:
- /dev/dri:/dev/dri
volumes:
- model-cache:/cache
env_file:
- .env
restart: always
redis:
container_name: immich_redis
image: docker.io/valkey/valkey:9
restart: always
database:
container_name: immich_postgres
image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
volumes:
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
restart: always
volumes:
model-cache:

.env 配置#

.env
UPLOAD_LOCATION=./library
DB_DATA_LOCATION=./postgres
TZ=Asia/Shanghai
IMMICH_VERSION=v2
DB_PASSWORD=postgres
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
TIP

使用国内镜像加速:

sed -i 's|ghcr\.io|ghcr.example.com|g' docker-compose.yml
sed -i 's|docker\.io|docker.example.com|g' docker-compose.yml

扩展功能#

分享

如果这篇文章对你有帮助,欢迎分享给更多人!

Immich 图片管理软件部署备忘录
https://blog.olinl.com/posts/immich-deploy/
作者
顾拾柒
发布于
2026-02-08
许可协议
CC BY-NC-SA 4.0

目录