immich
High-performance self-hosted photo and video management solution with AI-powered features
About this chart
Immich Helm Chart
Immich is a high-performance self-hosted photo and video management solution with AI-powered features including facial recognition, object detection, and smart search.
TL;DR
helm repo add scripton-charts https://scriptonbasestar-container.github.io/sb-helm-charts
helm install my-immich scripton-charts/immich \
--set postgresql.external.host=postgres.default.svc \
--set postgresql.external.password=strongpass \
--set redis.external.host=redis.default.svc
Introduction
This chart bootstraps an Immich deployment on a Kubernetes cluster using microservices architecture.
Key Features:
- 🎯 Microservices architecture (server + machine-learning)
- 🤖 AI-powered features (facial recognition, object detection, CLIP search)
- 📦 External PostgreSQL + Redis (pgvecto.rs extension required)
- 🚀 Hardware acceleration support (CUDA, ROCm, OpenVINO, ARMNN)
- 📱 Mobile app support (iOS & Android)
- 🔒 Production-ready with HPA, PDB, NetworkPolicy
Prerequisites
Deployment Scenarios
This chart includes three pre-configured deployment scenarios optimized for different use cases:
Home Server (values-home-single.yaml)
Minimal resources for personal servers, home labs, Raspberry Pi, or Intel NUC:
helm install immich-home charts/immich \
-f charts/immich/values-home-single.yaml \
--set postgresql.external.password=your-db-password \
--set postgresql.external.host=postgres.default.svc.cluster.local
Resource allocation: 100-500m CPU, 256-512Mi RAM, 20Gi storage
Startup Environment (values-startup-single.yaml)
Balanced configuration for small teams, startups, and development environments:
helm install immich-startup charts/immich \
-f charts/immich/values-startup-single.yaml \
--set postgresql.external.password=your-db-password \
--set postgresql.external.host=postgres.default.svc.cluster.local
Resource allocation: 250m-1000m CPU, 512Mi-1Gi RAM, 50Gi storage
Production HA (values-prod-master-replica.yaml)
High availability deployment with machine learning and enhanced storage:
helm install immich-prod charts/immich \
-f charts/immich/values-prod-master-replica.yaml \
--set postgresql.external.password=your-db-password \
--set postgresql.external.host=postgres.default.svc.cluster.local
Features: ML-powered photo recognition, PodDisruptionBudget, NetworkPolicy, ServiceMonitor
Resource allocation: 500m-2000m CPU, 1-2Gi RAM, 100Gi storage
For detailed comparison and configuration examples, see the Scenario Values Guide.
- Kubernetes 1.19+
- Helm 3.0+
- External PostgreSQL 14+ with pgvecto.rs extension
- External Redis/Valkey 6+
- PV provisioner support
Versioning
| Chart Version | App Version | Kubernetes | Helm | Notes |
|---|---|---|---|---|
| 0.1.0 | v1.122.3 | 1.19+ | 3.0+ | Initial release with microservices |
Architecture
Immich consists of two main services:
-
Server (immich-server)
- REST API backend
- Web UI serving
- Database & Redis coordination
- Photo/video upload handling
-
Machine Learning (immich-ml)
- Facial recognition
- Object detection (CLIP)
- Smart search indexing
- Hardware acceleration (optional)
Installing the Chart
Basic Installation
helm install my-immich scripton-charts/immich \
--set postgresql.external.host=postgres-host \
--set postgresql.external.password=dbpass \
--set redis.external.host=redis-host
Production Installation with GPU
helm install my-immich scripton-charts/immich \
-f values-example.yaml \
--set postgresql.external.password=strongpass \
--set redis.external.password=redispass
Configuration
Core Parameters
| Parameter | Description | Default |
|---|---|---|
immich.server.enabled | Enable server service | true |
immich.server.replicaCount | Server replicas | 1 |
immich.machineLearning.enabled | Enable ML service | true |
immich.machineLearning.acceleration | Hardware acceleration (none, cuda, rocm, openvino) | none |
External Services (REQUIRED)
| Parameter | Description | Default |
|---|---|---|
postgresql.external.host | PostgreSQL hostname | "" (REQUIRED) |
postgresql.external.password | PostgreSQL password | "" (REQUIRED) |
redis.external.host | Redis hostname | "" (REQUIRED) |
Persistence
| Parameter | Description | Default |
|---|---|---|
persistence.library.size | Photo library size | 100Gi |
immich.machineLearning.modelCache.size | ML model cache | 10Gi |
S3 Object Storage
Immich can use S3-compatible object storage (MinIO, AWS S3, etc.) for photo and video storage instead of local PVCs.
Quick Configuration
immich:
server:
extraEnv:
- name: IMMICH_MEDIA_LOCATION
value: "s3"
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: immich-s3-credentials
key: access-key-id
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: immich-s3-credentials
key: secret-access-key
- name: AWS_ENDPOINT
value: "http://minio.default.svc.cluster.local:9000"
- name: AWS_REGION
value: "us-east-1"
- name: AWS_S3_BUCKET
value: "immich-media"
- name: AWS_S3_FORCE_PATH_STYLE
value: "true"
Create S3 credentials secret:
kubectl create secret generic immich-s3-credentials \
--from-literal=access-key-id=immich-user \
--from-literal=secret-access-key=immich-secure-password
Benefits:
- Significantly reduced PVC requirements (only thumbnails/cache need local storage)
- Scalable storage independent of pod lifecycle
- Multi-region replication support
- Lower storage costs
For complete S3 integration guide including MinIO setup, bucket creation, and security best practices, see the S3 Integration Guide.
Hardware Acceleration
Enable GPU acceleration for ML workloads:
NVIDIA CUDA
immich:
machineLearning:
acceleration: "cuda"
resources:
limits:
nvidia.com/gpu: 1
AMD ROCm
immich:
machineLearning:
acceleration: "rocm"
Intel OpenVINO
immich:
machineLearning:
acceleration: "openvino"
Backup & Recovery
Immich stores critical data across multiple components requiring a comprehensive backup strategy.
Backup Components
| Component | Priority | Storage Size | Recovery Time |
|---|---|---|---|
| Library PVC | HIGH | 100+ GB | < 2 hours |
| PostgreSQL DB | HIGH | 1-10 GB | < 30 minutes |
| Redis Cache | LOW | < 100 MB | < 10 minutes |
| ML Model Cache | MEDIUM | ~10 GB | < 1 hour |
| Configuration | HIGH | < 1 MB | < 10 minutes |
Quick Backup
# Full backup (all components)
make -f make/ops/immich.mk immich-full-backup
# Individual component backups
make -f make/ops/immich.mk immich-backup-library # Photos/videos (largest)
make -f make/ops/immich.mk immich-backup-db # PostgreSQL metadata
make -f make/ops/immich.mk immich-backup-config # Kubernetes configuration
Recovery Workflow
# 1. Prepare environment (create namespace, secrets)
# 2. Restore PostgreSQL database
make -f make/ops/immich.mk immich-restore-db BACKUP_FILE=/backup/immich/db.dump
# 3. Restore library PVC
make -f make/ops/immich.mk immich-restore-library BACKUP_PATH=/backup/immich/library
# 4. Deploy Immich
helm install immich scripton-charts/immich -f values-recovery.yaml
# 5. Validate recovery
make -f make/ops/immich.mk immich-post-recovery-check
Backup Strategies
Incremental Backup (Recommended):
# Using Restic for deduplication and compression
make -f make/ops/immich.mk immich-backup-library-restic
Volume Snapshot (Fastest):
# Requires CSI snapshot support
make -f make/ops/immich.mk immich-snapshot-library
Recovery Targets
- RTO (Recovery Time Objective): < 2 hours
- RPO (Recovery Point Objective): 24 hours (with daily backups)
Best Practices
- ✅ Daily backups of Library PVC and PostgreSQL database
- ✅ Weekly backups of ML model cache (optional, can be re-downloaded)
- ✅ 3-2-1 rule: 3 copies, 2 different media, 1 offsite
- ✅ Test restores monthly to verify backup integrity
- ✅ Encrypt backups containing sensitive photo metadata
Comprehensive Guide: Immich Backup & Recovery Guide - Detailed procedures, disaster recovery, and troubleshooting (1,046 lines)
Security & RBAC
This chart includes comprehensive RBAC (Role-Based Access Control) for namespace-scoped resource access.
RBAC Resources
Role (namespace-scoped):
- ConfigMaps: Read access for configuration
- Secrets: Read access for database credentials, Redis passwords, S3 keys
- Pods: Read access for health checks and operations
- Services: Read access for service discovery
- Endpoints: Read access for service discovery
- PersistentVolumeClaims: Read access for storage operations
RoleBinding: Links Role to ServiceAccount
Configuration
# Enable RBAC (default: enabled)
rbac:
create: true
annotations: {}
# ServiceAccount configuration
serviceAccount:
create: true
automount: true
annotations: {}
name: "" # Auto-generated if empty
Security Context
Pod Security:
podSecurityContext:
fsGroup: 1000
runAsUser: 1000
runAsGroup: 1000
runAsNonRoot: true
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: false # Immich needs write access for uploads
Network Security
NetworkPolicy (optional):
networkPolicy:
enabled: true
ingress:
- from:
- podSelector:
matchLabels:
app: nginx-ingress
ports:
- protocol: TCP
port: 2283
egress:
- to:
- podSelector:
matchLabels:
app: postgresql
ports:
- protocol: TCP
port: 5432
- to:
- podSelector:
matchLabels:
app: redis
ports:
- protocol: TCP
port: 6379
Best Practices
- ✅ Use dedicated ServiceAccount per Immich installation
- ✅ Enable NetworkPolicy to restrict pod-to-pod communication
- ✅ Use Secrets for sensitive data (database passwords, S3 credentials)
- ✅ Enable TLS/HTTPS for Ingress (production requirement)
- ✅ Regularly rotate credentials (database passwords, Redis passwords)
- ✅ Use Pod Security Standards (Baseline or Restricted)
RBAC Verification:
# Check RBAC resources
kubectl get role,rolebinding -n $NAMESPACE -l app.kubernetes.io/instance=immich
# Verify ServiceAccount permissions
kubectl auth can-i get configmaps --as=system:serviceaccount:default:immich -n default
Operations
Daily Operations
# Port forward to localhost
make -f make/ops/immich.mk immich-port-forward
# View logs
make -f make/ops/immich.mk immich-logs-server
make -f make/ops/immich.mk immich-logs-ml
# Check connectivity
make -f make/ops/immich.mk immich-check-db
make -f make/ops/immich.mk immich-check-redis
# Get version
make -f make/ops/immich.mk immich-get-version
Monitoring & Health Checks
# Check pod status
make -f make/ops/immich.mk immich-status
# Verify database connectivity
make -f make/ops/immich.mk immich-check-db
# Check ML service health
make -f make/ops/immich.mk immich-check-ml
# View resource usage
kubectl top pods -n $NAMESPACE -l app.kubernetes.io/instance=immich
Database Operations
# Connect to PostgreSQL
make -f make/ops/immich.mk immich-db-shell
# Run SQL query
make -f make/ops/immich.mk immich-db-query QUERY="SELECT COUNT(*) FROM assets;"
# Check database size
make -f make/ops/immich.mk immich-db-size
# Vacuum database (maintenance)
make -f make/ops/immich.mk immich-db-vacuum
ML Model Management
# List downloaded models
make -f make/ops/immich.mk immich-list-ml-models
# Check ML cache usage
make -f make/ops/immich.mk immich-check-ml-cache
# Clear ML cache (forces re-download)
make -f make/ops/immich.mk immich-clear-ml-cache
Scaling Operations
# Scale server horizontally
kubectl scale deployment immich-server -n $NAMESPACE --replicas=3
# Scale ML service
kubectl scale statefulset immich-machine-learning -n $NAMESPACE --replicas=2
# Enable HorizontalPodAutoscaler
helm upgrade immich scripton-charts/immich \
--set autoscaling.enabled=true \
--set autoscaling.minReplicas=2 \
--set autoscaling.maxReplicas=5 \
--reuse-values
Performance Tuning
Database Optimization:
# Analyze database
make -f make/ops/immich.mk immich-db-analyze
# Reindex database
make -f make/ops/immich.mk immich-db-reindex
Resource Adjustment:
immich:
server:
resources:
limits:
cpu: 4000m # Increase for high upload concurrency
memory: 4Gi # Increase for large photo libraries
requests:
cpu: 1000m
memory: 2Gi
machineLearning:
resources:
limits:
cpu: 8000m # Increase for faster ML processing
memory: 8Gi # Increase for large ML models
requests:
cpu: 2000m
memory: 4Gi
Troubleshooting
Common Issues:
Deploy immich with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has immich on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartimmich is pinned at v0.4.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply