# 安装 Immich

**URL:** <https://yangyang.si/t/topic/62>\
**Category:** 博客归档\
**Created:** [2025 年11 月 8 日 01:19 UTC](https://yangyang.si/t/topic/62 "2025-11-08T01:19:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

作者： ![wenxin](https://yangyang.si/user_avatar/yangyang.si/wenxin/32/84_2.png) [@wenxin](https://yangyang.si/u/wenxin)\
发布日期： [2025 年11 月 8 日 01:19 UTC](https://yangyang.si/t/topic/62/1 "2025-11-08T01:19:55Z")

</div>

## 要求

- 具有至少 4GB RAM 和 2 个 CPU 内核的系统。
- [Docker](https://docs.docker.com/engine/install/) 

## 设置服务器

### 第 1 步 - 下载所需的文件

创建一个您选择的目录（例如 ）来保存 和 文件。`./immich-app``docker-compose.yml``.env`

移动到您创建的目录

```
mkdir ./immich-appcd ./immich-app
```

通过运行以下命令下载&nbsp;[`docker-compose.yml`](https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml)&nbsp;和&nbsp;[`example.env`](https://github.com/immich-app/immich/releases/latest/download/example.env)：

获取docker-compose.yml文件

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

获取 .env 文件

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

或者，您可以从浏览器下载这两个文件，并将它们移动到您创建的目录，在这种情况下，请确保将重命名为 。`example.env``.env`

### 步骤 2 - 使用自定义值填充 .env 文件

默认环境变量内容

```
# You can find documentation for all the supported env variables at https://docs.immich.app/install/environment-variables# The location where your uploaded files are storedUPLOAD_LOCATION=./library# The location where your database files are stored. Network shares are not supported for the databaseDB_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# TZ=Etc/UTC# The Immich version to use. You can pin this to a specific version like "v2.1.0"IMMICH_VERSION=v2# 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 spacesDB_PASSWORD=postgres# The values below this line do not need to be changed###################################################################################DB_USERNAME=postgresDB_DATABASE_NAME=immich
```

- 填充您存储备份资产的首选位置。它应该是服务器上具有足够可用空间的新目录。`UPLOAD_LOCATION`
- 考虑更改为自定义值。Postgres 不公开，因此此密码仅用于本地身份验证。 为避免 Docker 解析此值时出现问题，最好仅使用字符 。 是一个方便的实用程序。`DB_PASSWORD``A-Za-z0-9``pwgen`
- 通过取消注释该行来设置您的时区。`TZ=`
- 如有必要，填充自定义数据库信息。

### 第 3 步 - 启动容器

从您在步骤 1 中创建的目录（现在应该包含您的自定义和文件），运行以下命令以将 Immich 作为后台服务启动：`docker-compose.yml``.env`

启动容器

```
docker compose up -d
```

* * *

## 试用 Web 应用

第一个注册的用户将是管理员用户。管理员用户将能够将其他用户添加到应用程序中。

要注册管理员用户，请访问 Web 应用程序，然后单击“ **入门** ”按钮。`http://<machine-ip-address>:2283`

按照提示注册为管理员用户并登录应用程序。

### 下载移动应用程序

手机应用程式可从以下位置下载：

- Obtainium：您可以从&nbsp;[Immich 服务器的实用程序页面](https://my.immich.app/utilities)获取 Obtainium 配置链接。
- [Google Play 商店](https://play.google.com/store/apps/details?id=app.alextran.immich)
- [苹果应用商店](https://apps.apple.com/us/app/immich/id1613945652)
- [F-机器人](https://f-droid.org/packages/app.alextran.immich)
- [GitHub 发布 （apk）](https://github.com/immich-app/immich/releases)
