Deploying Immich, an Open-Source Alternative to Google Photos, on Ubuntu 24.04

작성자

카테고리:

← 피드로
DEV Community · Sanskriti Harmukh · 2026-06-17 개발(SW)

Immich is an open-source photo and video management platform — a self-hosted alternative to Google Photos — with native mobile apps, machine-learning search, and automatic backup. This guide deploys Immich using Docker Compose, fronts it with Nginx, and secures it with a Let’s Encrypt TLS certificate. By the end, you’ll have Immich syncing photos and videos securely at your domain.

Set Up the Directory Structure

1. Create the project directory:

$ mkdir ~/immich
$ cd ~/immich

Enter fullscreen mode Exit fullscreen mode

2. Download the official .env template:

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

Enter fullscreen mode Exit fullscreen mode

3. Edit the environment file:

$ nano .env

Enter fullscreen mode Exit fullscreen mode

Uncomment and set the timezone, plus customize secrets:

TZ=Europe/London

Enter fullscreen mode Exit fullscreen mode

Key variables in the file:

  • UPLOAD_LOCATION — where uploaded media is stored
  • DB_DATA_LOCATION — PostgreSQL data path
  • IMMICH_VERSION — Immich release tag
  • DB_PASSWORD, DB_USERNAME, DB_DATABASE_NAME — database credentials

Deploy with Docker Compose

1. Download the official Compose manifest:

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

Enter fullscreen mode Exit fullscreen mode

This brings up three services: immich-server, postgres, and valkey for cache/queues.

2. Add your user to the Docker group:

$ sudo usermod -aG docker $USER
$ newgrp docker

Enter fullscreen mode Exit fullscreen mode

3. Start the stack:

$ docker compose up -d

Enter fullscreen mode Exit fullscreen mode

4. Verify the services are running and the API responds:

$ docker compose ps
$ curl -X GET 127.0.0.1:2283

Enter fullscreen mode Exit fullscreen mode

Front Immich with Nginx

1. Install and enable Nginx:

$ sudo apt update
$ sudo apt install nginx -y
$ sudo systemctl enable nginx

Enter fullscreen mode Exit fullscreen mode

2. Remove the default site:

$ sudo rm /etc/nginx/sites-enabled/default

Enter fullscreen mode Exit fullscreen mode

3. Create the Immich virtual host:

$ sudo nano /etc/nginx/sites-available/immich.conf

Enter fullscreen mode Exit fullscreen mode

server {
    listen 80;
    server_name immich.example.com;

    location / {
        client_max_body_size 10M;
        proxy_pass http://127.0.0.1:2283;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        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;
    }
}

Enter fullscreen mode Exit fullscreen mode

4. Enable the site and reload:

$ sudo ln -s /etc/nginx/sites-available/immich.conf /etc/nginx/sites-enabled/
$ sudo nginx -t
$ sudo systemctl restart nginx

Enter fullscreen mode Exit fullscreen mode

5. Open the firewall:

$ sudo ufw allow 80/tcp
$ sudo ufw allow 443/tcp
$ sudo ufw reload

Enter fullscreen mode Exit fullscreen mode

Issue a Let’s Encrypt Certificate

$ sudo apt install certbot python3-certbot-nginx -y
$ sudo certbot --nginx -d immich.example.com -m [email protected] --non-interactive

Enter fullscreen mode Exit fullscreen mode

Certbot edits the Nginx config in place and enables auto-renewal.

Access and Configure Immich

  1. Open https://immich.example.com and click Getting Started.
  2. Create the admin account with email, password, and display name.
  3. Sign in and walk through the initial settings: theme, language, privacy, storage template, backup strategy.
  4. Click Upload to add a batch of photos. They appear under Photos once processed.

Add team members from Administration → Users with per-user storage quotas.

Next Steps

Immich is running and served securely over HTTPS. From here you can:

  • Install the iOS / Android app and point it at your domain for automatic phone backup
  • Enable machine-learning search and face recognition for richer organisation
  • Move UPLOAD_LOCATION to Vultr Block Storage to scale beyond the host disk

For the full guide with additional tips, visit the original article on Vultr Docs.

원문에서 계속 ↗

코멘트

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다