Posts Install self-hosted Photo and Video server with Immich
Post
Cancel

Install self-hosted Photo and Video server with Immich

Immich is a self-hosted photo and video management solution. Easily back up, organize, and manage your photos on your own server.

Immich Picture

Why Immich?

  • Immich is a self-hosted photo and video management solution that allows you to easily back up, organize, and manage your photos and videos on your own server. It helps you browse, search, and organize your photos and videos with ease, without sacrificing your privacy.

  • It has a user-friendly interface, supports multiple devices, and offers advanced features like facial recognition and geolocation tagging.

  • Importantly, Immich is open-source and free to use and all data will be stored on your own server privately.

Installation using Docker

If you want to install with kubernetes then read this article.

Create a docker-compose.yaml file

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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
version: "3.8"
name: immich
services:
  immich-server:
    container_name: immich_server
    image: techthinkerorg/immich-server:v1.135.3
    restart: always
    volumes:
      - upload_location:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database

  immich-machine-learning:
    container_name: immich_machine_learning
    image: techthinkerorg/immich-machine-learning:v1.135.3
    restart: always
    volumes:
      - model-cache:/cache
    env_file:
      - .env

  redis:
    container_name: immich_redis
    image: techthinkerorg/immich-redis:v1.135.3
    restart: always
    healthcheck:
      test: redis-cli ping || exit 1

  database:
    container_name: immich_postgres
    image: techthinkerorg/immich-postgres:v1.135.3
    restart: always
    ports:
      - 5432:5432
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: --data-checksums
    volumes:
      - db_data_location:/var/lib/postgresql/data

volumes:
  upload_location:
    driver: local
    driver_opts:
      type: none
      device: ${UPLOAD_LOCATION}
      o: bind
  db_data_location:
    driver: local
    driver_opts:
      type: none
      device: ${DB_DATA_LOCATION}
      o: bind
  model-cache:
    driver: local
    driver_opts:
      type: none
      device: ${MODEL_CACHE}
      o: bind
networks: {}

Create .env file

1
2
3
4
5
6
7
8
9
10
11
TZ=Asia/Kolkata
VITE_SERVER_URL=https://immich.example.com
IMMICH_SERVER_URL=https://immich.example.com
# The location where your uploaded files are stored
UPLOAD_LOCATION=/srv/immich/upload
# The location where your database files are stored
DB_DATA_LOCATION=/srv/immich/pgdata
MODEL_CACHE=/srv/immich/model_cache
DB_DATABASE_NAME=immich
DB_USERNAME=postgres
DB_PASSWORD=postgres

Create data directories

Make sure you have updated the directories to .env file.

1
2
3
mkdir -p /srv/immich/upload
mkdir -p /srv/immich/pgdata
mkdir -p /srv/immich/model_cache

Run docker

1
docker-compose up -d

Your immich installation is complete. Now visit URL: http://localhost:2283