Take control of your photos, setup/Install Immich
Installing Immich and setup tutorial.
Time to ditch google photos, switch to immich today and start self hosting your photos on your NAS at home.
Theres several reasons todo this, personally mine is I already have a NAS at home and would rather stop paying to backup my photos. Today I will walk you through a few methods on how to setup Immich.
What is Immich?
Immich is a open source self hosted alternative to cloud based photo storage. Designed to put the control back into your hands allowing you to easily back up, organize, and manage your photos on your own server. Immich helps you browse, search and organize your photos and videos with ease, without sacrificing your privacy.
Info
Find more about immich
Method 1: Installing on UnRaid Server (With Docker Compose) (Official Method)
This is the method I opted for as my unraid server made the most sense, its already got several TB of storage available directly on the host. That being said you can always check the other methods below if you dont own or run UnRaid.
Requirements
You will need the following to be installed on your UnRaid environment before you can proceed.
- Docker Compose Manager plugin from the Unraid Community Apps
Installation Steps
- Go to “Plugins” and click on “Compose Manager”
- Click “Add New Stack” and when prompted for a label enter “Immich”
- Select the cogwheel ⚙️ next to Immich and click “Edit Stack”
- Click “Compose File” and then paste the entire contents of the below codeblock into the Unraid editor. Remove any text that may be in the text area by default.
Note
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
69
70
71
72
73
#
# WARNING: To install Immich, follow our guide: https://immich.app/docs/install/docker-compose
#
# Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
name: immich
services:
immich-server:
container_name: immich_server
image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}
# extends:
# file: hwaccel.transcoding.yml
# service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
volumes:
# Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
- ${UPLOAD_LOCATION}:/usr/src/app/upload
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
ports:
- '2283:2283'
depends_on:
- redis
- database
restart: always
healthcheck:
disable: false
immich-machine-learning:
container_name: immich_machine_learning
# For hardware acceleration, add one of -[armnn, cuda, rocm, openvino, rknn] to the image tag.
# Example tag: ${IMMICH_VERSION:-release}-cuda
image: ghcr.io/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
# extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
# file: hwaccel.ml.yml
# service: cpu # set to one of [armnn, cuda, rocm, openvino, openvino-wsl, rknn] for accelerated inference - use the `-wsl` version for WSL2 where applicable
volumes:
- model-cache:/cache
env_file:
- .env
restart: always
healthcheck:
disable: false
redis:
container_name: immich_redis
image: docker.io/valkey/valkey:8-bookworm@sha256:fec42f399876eb6faf9e008570597741c87ff7662a54185593e74b09ce83d177
healthcheck:
test: redis-cli ping || exit 1
restart: always
database:
container_name: immich_postgres
image: ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: '--data-checksums'
# Uncomment the DB_STORAGE_TYPE: 'HDD' var if your database isn't stored on SSDs
# DB_STORAGE_TYPE: 'HDD'
volumes:
# Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
- ${DB_DATA_LOCATION}:/var/lib/postgresql/data
restart: always
volumes:
model-cache:
- Click “Save Changes”, you will be prompted to edit stack UI labels, just leave this blank and click “Ok”
- Select the cog ⚙️ next to Immich, click “Edit Stack”, then click “Env File”
Paste the entire contents of the codeblock below into the Unraid editor, then before saving edit the following:
i.
UPLOAD_LOCATION
: Create a folder in your Images Unraid share and place the absolute location here > For example my “/data/media” share has a folder within it called “photos”. If I browse to this directory in the terminal and type pwd the output is /mnt/user/data/media/photos. This is the exact value I need to enter as myUPLOAD_LOCATION
ii.
DB_DATA_LOCATION
: Change this to use an Unraid share (preferably a cache pool, e.g. /mnt/user/appdata/postgresql/data). This uses the appdata share. Do also create the postgresql folder, by runningmkdir /mnt/user/appdata/postgresql/data
.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 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
# TZ=Etc/UTC
# The Immich version to use. You can pin this to a specific version like "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
DB_PASSWORD=postgres
# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
Click “Save Changes” followed by “Compose Up” and Unraid will begin to create the Immich containers in a popup window. Once complete you will see a message on the popup window stating “Connection Closed”. Click “Done” and go to the Unraid “Docker” page.
Once on the Docker page you will see several Immich containers, one of them will be labelled immich_server and will have a port mapping. Visit the
IP:PORT
displayed in your web browser and you should see the Immich admin setup page.
Method 2: Installing on UnRaid Server (With Community Apps)
Theres a community made application for Immich if you’d prefer to use the UnRaid app store.
I prefer this method as it allows for updating the containers through UnRaids native user interface.
Installation Steps
We need to install a few dependancies before we can install Immich.
- Navigate to the “Apps” tab on UnRaid and search for
Immich_PostgreSQL
. - Click install and configure the following options:
POSTGRES_PASSWORD:
Change this to a strong password and make a note we will need it later.
Click “Apply” and wait for the container to come up.
- Next we’re going to install redis go back to “Apps” tab on UnRaid and search for
Immich_Redis
. - Click install and configure the following options:
Password:
Change this to a strong password again and make another note we will need it next.Click “Apply” and wait for the container to come up.
- Lastly we’re going to go back to the “Apps” once more and search for
Immich
. - Click install and configure the below options:
Path: /photos:
Set this to your media location for example mine is “/mnt/user/data/media/photos/”.DB_HOSTNAME:
Set this to the IP address of your previously setup docker container (Also the same address as your UnRaid host).DB_USERNAME:
Leave this as default unless you changed the username when setting up your postgreSQL database.DB_PASSWORD:
Set this to the password we set when setting up the Immich_PostgreSQL container.REDIS_HOSTNAME:
Set this to the IP address of your previously setup docker container (Also the same address as your UnRaid host).REDIS_PASSWORD
Set this to the password we set when setting up the Immich_PostgreSQL container.
- Click “Apply” and wait for the container to come up.
Visit the IP:PORT
of the Immich container displayed in your web browser and you should see the Immich admin setup page.