Wir alle kennen und nutzen Google. Die Suchmaschine und auch Google Fotos sind spitze. Mal eben ein Foto oder Album Plattform übergreifend teilen, mit Google kein Problem.
Doch Google lebt von unserem Internet verhalten und wirklich wissen tut keiner, was der Riese mit unseren Daten macht. Vielleicht stört dich das nicht, doch du lebst ständig an der Cloud Speicher Grenze. 15 Gb kostenloser Cloud Speicher sind zwar ganz nett, aber reicht für Fotoalben und Backups nicht lange.
Vielleicht war das der Grund, dass ein paar Programmierer das Open Source Projekt Immich in die Welt gerufen haben.
Immich ist angelehnt an Google Fotos nur als SalfHost Lösung. Es gibt eine App für Apple und Google Geräte, sowie eine Weboberfläche.
Was du dafür brauchst ist ein kleiner MiniPC. Vermutlich reicht ein Raspberry Pi 5 schon aus.
Installation
Mit der Anleitung tue ich mich tatsächlich schwer. Ich sag dir mal, wie es bei mir läuft. Solltest du dies bei dir ähnlich aufsetzen wollen, kannst du dich melden.
Ich nutze Proxmox und habe dort einen Priviligierten LXC am laufen. Der LXC hat eine Anbindung zu einem Netzlaufwerk. Ich nutze hier das SMB Protokoll da dies System übergreifend ist. Unter iOS, MacOS, Linux, Androide und Windows wird die SMB Freigaben erkannt. Möchte ich an meine Fotos ohne den „Umweg“ über die Webseite oder App, kann ich mein Netzlaufwerk aufrufen und die nötigen Fotos dort raus kopieren. Dies ist z.B. eine gute Option wenn du einen NAS zu Hause im Einsatz hast. Immich bietet dir eine schöne grafische Weboberfläche, die Daten selbst sind auf dem NAS gesichert.
Ich greife auf mein Immich über mein internes Netzwerk zu. Von unterwegs nutze ich einen VPN mit OnDemond Einstellung. Ich bin praktisch mit meinem Handy immer zu Hause und aus dem Grund habe ich keinen Reverse Proxy dazwischen geschaltet, ist aber möglich.
Docker und Dockge installation
Ausgehend von einem Linux System auf Debian.
# System Aktualisierung
apt update && apt upgrade -y && apt autoremove -y && reboot
# Installation von Docker
## Installation von curl
apt install curl -y
## Installation von Docker
curl -sSL https://get.docker.com | sh
## Installation von Docker Compose
apt install docker-compose -y
# Installation von Dockge
## Ordner erstellen
mkdir -p /opt/stacks /opt/dockge
## und ins Verzeichnis wechseln
cd /opt/dockge
## Nun das Compose Skript herunterladen
curl https://raw.githubusercontent.com/louislam/dockge/master/compose.yaml --output compose.yaml
## nun noch den Container ausrollen
docker compose up -d
## Dockge ist unter erreichbar
http://192.168.IP.IP:5001
Installation von Immich
Von der GitHub Seite habe ich mir das Skript herunter geladen und unter Dockge auf +Compose geklickt. Dort folgendes Skript eingefügt:
#
# WARNING: 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, openvino] 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, openvino, openvino-wsl] 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/redis:6.2-alpine@sha256:905c4ee67b8e0aa955331960d2aa745781e6bd89afc44a8584bfd13bc890f0ae
healthcheck:
test: redis-cli ping || exit 1
restart: always
database:
container_name: immich_postgres
image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
environment:
POSTGRES_PASSWORD: ${DB_PASSWORD}
POSTGRES_USER: ${DB_USERNAME}
POSTGRES_DB: ${DB_DATABASE_NAME}
POSTGRES_INITDB_ARGS: --data-checksums
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
healthcheck:
test: pg_isready --dbname="$${POSTGRES_DB}" --username="$${POSTGRES_USER}" ||
exit 1; Chksum="$$(psql --dbname="$${POSTGRES_DB}"
--username="$${POSTGRES_USER}" --tuples-only --no-align
--command='SELECT COALESCE(SUM(checksum_failures), 0) FROM
pg_stat_database')"; echo "checksum failure count is $$Chksum"; [
"$$Chksum" = '0' ] || exit 1
interval: 5m
start_interval: 30s
start_period: 5m
command: postgres -c shared_preload_libraries=vectors.so -c
'search_path="$$user", public, vectors' -c logging_collector=on -c
max_wal_size=2GB -c shared_buffers=512MB -c wal_compression=on
restart: always
volumes:
model-cache: null
networks: {}
und nun noch die .env Datei. Diese muss bearbeitet werden und zwar an folgenden Punkten:
UPLOAD_LOCATION –> Hier dein bevorzugtes Verzeichnis eintragen. Wie oben beschrieben, nutze ich eine SMB Freigabe die unter /mnt/immich zu finden ist.
DB_DATA_LOCATION –> Das Datenbank Verzeichnis habe ich gelassen. Kann optional angepasst werden.
TZ –> Die Zeitzone habe ich auf Deutsch gestellt. (Europe/Berlin)
DB_PASSWORD –> Das Datenbank Passwort sollte keine Sonderzeichen beinhalten. Nur a-Z, A-Z und 0-9.
DB_USERNAME –> Optional kann man dies noch anpassen.
DB_DATABASE_NAME –> Optional kann man die noch anpassen.
# 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=./upload
## Es kann wie bei mir ein Verweis auf einen gemounteten Ordner gemacht werden. Beispiel: /mnt/immich/upload
# The location where your database files are stored
DB_DATA_LOCATION=./datenbank
# 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=Europe/Berlin
# 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=PASSWORT
# The values below this line do not need to be changed
###################################################################################
DB_USERNAME=postgres
DB_DATABASE_NAME=immich
Nun auf Deploy und der Container wird erstellt. In Immich kann ich dir 2 Einstellungen noch empfehlen. Unter Verwaltung – Einstellungen – Speichervorlage – Speichervorlagen-Engine aktivieren.
Diese Einstellung legt einen Ordner an nach deinen Einstellungen. Zum Beispiel /2025/Januar/ Foto.jpg oder /2025/2025-01-31/Foto.jpg
Meine Vorlage sieht so aus:
{{y}}/{{y}}-{{MM}}-{{dd}}/{{y}}-{{MM}}-{{dd}}_{{H}}-{{mm}}-{{ss}}-{{filename}}
/2022/2022-02-03/2022-02-03_4-56-05-IMAGE_56437.jpg
Eine zweite Einstellung ist der User Name. Nach der Installation wird der Ordner Admin genannt. Diesen habe ich geändert in meinen Namen. Dies kannst du unter Kontoeinstellungen – Konto – Speicherpfad.