Immich is a high performance self-hosted photo and video backup solution.
We use Docker manifest for cross-platform compatibility. More details can be found on Docker's website.
To obtain the appropriate image for your architecture, simply pull ghcr.io/imagegenius/immich:latest
. Alternatively, you can also obtain specific architecture images by using tags.
This image supports the following architectures:
Architecture | Available | Tag |
---|---|---|
x86-64 | ✅ | amd64-<version tag> |
arm64 | ✅ | arm64v8-<version tag> |
armhf | ❌ |
This image offers different versions via tags. Be cautious when using unstable or development tags, and read their descriptions carefully.
Tag | Available | Description |
---|---|---|
latest | ✅ | Latest Immich release with an Ubuntu base. |
noml | ✅ | Latest Immich release with an Alpine base. Machine-learning is completly removed. (tinnny image), use this if your CPU does not support AVX |
The WebUI can be accessed at http://your-ip:8080
Follow the wizard to set up Immich.
To use Immich, you need to have PostgreSQL 14 and Redis set up either externally or within the container using docker-mods.
To set up the dependencies using docker-mods, use the following:
- Redis:
DOCKER_MODS=imagegenius/mods:universal-redis
- SetREDIS_HOSTNAME
tolocalhost
. - PostgreSQL:
DOCKER_MODS=imagegenius/mods:universal-postgres
- SetDB_HOSTNAME
tolocalhost
and setDB_USERNAME
,DB_PASSWORD
, andDB_DATABASE_NAME
topostgres
.
If you want to use both, set DOCKER_MODS
to imagegenius/mods:universal-redis|imagegenius/mods:universal-postgres
.
When using the official Immich docker-compose, the PostgreSQL data is stored in a docker volume which should be located at /var/lib/docker/volumes/pgdata/_data
. Before preceeding you must stop the docker-compose stack.
To move the PostgreSQL data to the unraid array run:
mv /var/lib/docker/volumes/pgdata/_data /mnt/user/appdata/postgres14
Install postgresql14
from the Unraid CA and remove these variables from the template: POSTGRES_USER
, POSTGRES_PASSWORD
, POSTGRES_DB
.
The database is already initialised and these variables don't do anything.
Also set Database Storage Path
to /mnt/user/appdata/postgres14
.
In the docker-compose .env you would have set the UPLOAD_LOCATION
, copy that down and use it below:
uploads
folder within the UPLOAD_LOCATION
.
mv <upload_location>/uploads /mnt/user/<elsewhere>
Search the unraid CA for immich
, choose either CorneliousJD
's or vcxpz
's templates (vcxpz
is the official imagegenius template).
Ensure that the template matches the DB_USERNAME
, DB_PASSWORD
, DB_DATABASE_NAME
and JWT_SECRET
from the .env. Set Path: /photos
to /mnt/user/<elsewhere>
.
Click Apply, Open the WebUI and login. Everything Should be as it was.
Example snippets to start creating a container:
---
version: "2.1"
services:
immich:
image: ghcr.io/imagegenius/immich:latest
container_name: immich
environment:
- PUID=1000
- PGID=1000
- TZ=Etc/UTC
- DB_HOSTNAME=192.168.1.x
- DB_USERNAME=postgres
- DB_PASSWORD=postgres
- DB_DATABASE_NAME=immich
- REDIS_HOSTNAME=redis
- JWT_SECRET=somelongrandomstring
- DB_PORT=5432 #optional
- REDIS_PORT=6379 #optional
- REDIS_PASSWORD= #optional
volumes:
- path_to_appdata:/config
- path_to_photos:/photos
ports:
- 8080:8080
restart: unless-stopped
# This container requires an external application to be run separately to be run separately.
# Redis:
redis:
image: redis
ports:
- 6379:6379
container_name: redis
# PostgreSQL 14:
postgres14:
image: postgres:14
ports:
- 5432:5432
container_name: postgres14
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: immich
volumes:
- path_to_postgres:/var/lib/postgresql/data
Docker CLI (Click here for more info)
docker run -d \
--name=immich \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
-e DB_HOSTNAME=192.168.1.x \
-e DB_USERNAME=postgres \
-e DB_PASSWORD=postgres \
-e DB_DATABASE_NAME=immich \
-e REDIS_HOSTNAME=redis \
-e JWT_SECRET=somelongrandomstring \
-e DB_PORT=5432 `#optional` \
-e REDIS_PORT=6379 `#optional` \
-e REDIS_PASSWORD= `#optional` \
-p 8080:8080 \
-v path_to_appdata:/config \
-v path_to_photos:/photos \
--restart unless-stopped \
ghcr.io/imagegenius/immich:latest
# This container requires an external application to be run separately.
# Redis:
docker run -d \
--name=redis \
-p 6379:6379 \
redis
# PostgreSQL 14:
docker run -d \
--name=postgres14 \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-e POSTGRES_DB=immich \
-v path_to_postgres:/var/lib/postgresql/data \
-p 5432:5432 \
postgres:14
To configure the container, pass variables at runtime using the format <external>:<internal>
. For instance, -p 8080:80
exposes port 80
inside the container, making it accessible outside the container via the host's IP on port 8080
.
Variable | Description |
---|---|
-p 8080 |
WebUI Port |
-e PUID=1000 |
for UserID - see below for explanation |
-e PGID=1000 |
for GroupID - see below for explanation |
-e TZ=Etc/UTC |
specify a timezone to use, see this list. |
-e DB_HOSTNAME=192.168.1.x |
PostgreSQL Host |
-e DB_USERNAME=postgres |
PostgreSQL Username |
-e DB_PASSWORD=postgres |
PostgreSQL Password |
-e DB_DATABASE_NAME=immich |
PostgreSQL Database Name |
-e REDIS_HOSTNAME=redis |
Redis Hostname |
-e JWT_SECRET=somelongrandomstring |
Run openssl rand -base64 128 |
-e DB_PORT=5432 |
PostgreSQL Port |
-e REDIS_PORT=6379 |
Redis Port |
-e REDIS_PASSWORD= |
Redis password |
-v /config |
Contains the logs |
-v /photos |
Contains all the photos uploaded to Immich |
All of our images allow overriding the default umask setting for services started within the containers using the optional -e UMASK=022 option. Note that umask works differently than chmod and subtracts permissions based on its value, not adding. For more information, please refer to the Wikipedia article on umask here.
To avoid permissions issues when using volumes (-v
flags) between the host OS and the container, you can specify the user (PUID
) and group (PGID
). Make sure that the volume directories on the host are owned by the same user you specify, and the issues will disappear.
Example: PUID=1000
and PGID=1000
. To find your PUID and PGID, run id user
.
$ id username
uid=1000(dockeruser) gid=1000(dockergroup) groups=1000(dockergroup)
Most of our images are static, versioned, and require an image update and container recreation to update the app. We do not recommend or support updating apps inside the container. Check the Application Setup section for recommendations for the specific image.
Instructions for updating containers:
- Update all images:
docker-compose pull
- or update a single image:
docker-compose pull immich
- or update a single image:
- Let compose update all containers as necessary:
docker-compose up -d
- or update a single container:
docker-compose up -d immich
- or update a single container:
- You can also remove the old dangling images:
docker image prune
- Update the image:
docker pull ghcr.io/imagegenius/immich:latest
- Stop the running container:
docker stop immich
- Delete the container:
docker rm immich
- Recreate a new container with the same docker run parameters as instructed above (if mapped correctly to a host folder, your
/config
folder and settings will be preserved) - You can also remove the old dangling images:
docker image prune
- 11.02.23: - use external app block
- 09.02.23: - Use Immich environment variables for immich services instead of hosts file
- 09.02.23: - execute CLI with the command immich
- 04.02.23: - shrink image
- 26.01.23: - add unraid migration to readme
- 26.01.23: - use find to apply chown to /app, excluding node_modules
- 26.01.23: - enable ci testing
- 24.01.23: - fix services starting prematurely, causing permission errors.
- 23.01.23: - add noml image to readme and add aarch64 image to readme, make github release stable
- 21.01.23: - BREAKING: Redis is removed. Update missing param_env_vars & opt_param_env_vars for redis & postgres
- 02.01.23: - Initial Release.