快速使用 Immich
快速使用 Immich
Immich 提供高性能自托管照片和视频管理解决方案,告别商业云盘,释放设备空间。
1.准备文件
根据官方文档说明运行 Immich 的最佳方法是使用 Docker Compose,这里创建一个目录来保存docker-compose.yml和.env文件。
1
2
mkdir ./immich-app
cd ./immich-app
下载 docker-compose.yml 和 example.env到 immich-app目录下。
1
2
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
2.修改配置
根据需求修改.env文件内的变量值。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# You can find documentation for all the supported env variables at https://immich.app/docs/install/environment-variables
# The location where your uploaded files are stored
# 上传文件存储位置
UPLOAD_LOCATION=./library
# The location where your database files are stored. Network shares are not supported for the database
# 存储数据库文件的位置,数据库不支持网络共享
DB_DATA_LOCATION=./postgres
# To set a timezone, uncomment the next line and change Etc/UTC to a TZ identifier from this list: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List
# 要设置时区,取消下一行注释,并将 Etc/UTC 更改为正确的 TZ 标识符
TZ=Asia/Shanghai
# The Immich version to use. You can pin this to a specific version like "v1.71.0"
# 要使用的 Immich 版本,可以将其固定到特定版本,如:v1.71.0
IMMICH_VERSION=release
# Connection secret for postgres. You should change it to a random password
# Please use only the characters `A-Za-z0-9`, without special characters or spaces
# 请仅使用字符“A-Za-z0-9”,不得使用特殊字符或空格
DB_PASSWORD=123456Aa
# The values below this line do not need to be changed
# 此行以下的值不需要更改
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
3.启动容器
1
docker compose up -d
更多内容参考 Immich GitHub 和 Immich 官网。
本文由作者按照 CC BY 4.0 进行授权