# Immich — self-hosting guide (Docker Compose + reverse proxy)

> High-performance self-hosted photo and video backup (Google Photos alternative) with mobile apps and ML search.

- Page: https://deploy.cc/en/apps/immich
- Category: Cloud storage & files
- Server: Official: RAM min 6GB (8GB recommended); CPU min 2 cores (4 recommended). 4GB works with ML disabled; our generic suggestion: 4 vCPU / 8 GB RAM and up
- Ports: 2283 (Web / API)
- Repository: https://github.com/immich-app/immich
- Docs: https://docs.immich.app/
- Deploy source: https://docs.immich.app/install/docker-compose
- Verification: official method (not modified or run by us)
- Last verified: 2026-11-13

## Official install steps

```bash
mkdir -p /opt/immich && cd /opt/immich
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
sed -i "s/^DB_PASSWORD=.*/DB_PASSWORD=$(openssl rand -hex 16)/" .env
docker compose up -d
```

## Notes

- Use the compose file from the current release, not from main.
- Change DB_PASSWORD in example.env (letters and digits only).

## Nginx

```nginx
# Immich 反向代理 / reverse proxy — generated by deploy.cc
# 把 example.com 换成你的域名，证书路径按实际修改（certbot / acme.sh 签发）。
# Replace example.com and the certificate paths. More options: https://nginx.cc/zh/gen
# 放到 /etc/nginx/conf.d/<name>.conf，然后 nginx -t && systemctl reload nginx

map $http_upgrade $connection_upgrade_immich {
    default upgrade;
    ''      close;
}

server {
    listen 80;
    listen [::]:80;
    server_name example.com;

    location /.well-known/acme-challenge/ {
        root /var/www/html;
    }

    location / {
        return 301 https://$host$request_uri;
    }
}

server {
    listen 443 ssl;
    listen [::]:443 ssl;
    http2 on;  # nginx < 1.25.1: 删除此行，改为 listen 443 ssl http2;
    server_name example.com;

    ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
    ssl_protocols TLSv1.2 TLSv1.3;

    client_max_body_size 50000M;

    location / {
        proxy_pass http://127.0.0.1:2283;
        proxy_http_version 1.1;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $connection_upgrade_immich;
        proxy_read_timeout 3600s;
    }
}
```

## Caddy

```caddy
# Immich — Caddyfile (deploy.cc). Caddy 会自动申请 HTTPS 证书 / automatic HTTPS
example.com {
    reverse_proxy 127.0.0.1:2283
}
```

## Update

```bash
cd /opt/immich && docker compose pull && docker compose up -d   # 先读官方版本说明，有破坏性变更时按说明操作
```

## FAQ

### What is Immich?

High-performance self-hosted photo and video backup (Google Photos alternative) with mobile apps and ML search. Repository: https://github.com/immich-app/immich

### What server do I need for Immich?

Official: RAM min 6GB (8GB recommended); CPU min 2 cores (4 recommended). 4GB works with ML disabled; our generic suggestion: 4 vCPU / 8 GB RAM and up (source: https://docs.immich.app/install/requirements)

### Which ports does Immich use?

2283 (Web / API)

### How do I update Immich?

cd /opt/immich && docker compose pull && docker compose up -d   # 先读官方版本说明，有破坏性变更时按说明操作. Back up and read the release notes before major upgrades.

---
deploy.cc (unofficial; trademarks belong to their owners) · v0.2.2
