immich
by Javex
A chart to power Immich (immich.app) running on kubernetes
About this chart
Immich
This chart installs Immich, a self-hosted photo and video management solution.
TL;DR
helm repo add immich-helm https://javex.github.io/immich-helm
helm install --namespace immich install immich immich-helm/immich
Introduction
[!IMPORTANT] This Helm chart is still under development. Expect breaking frequent breaking changes. If you'd like to help test this chart, please consider trying it out as an early adopter.
The chart provides an alternative to the official Helm chart.
It avoids using the bjw-s library
chart. Instead, it uses Helm template files directly. This allows it to follow
Helm best practices more closely and pick typical parameter names in the
values.yaml file.
If you are coming from the official chart, you need to explicitly migrate to the new format. Be careful when doing the migration to avoid breaking your installation. This chart prioritises Helm best practices over backwards compatibility with the official chart.
Migrating
If you'd like to migrate from the official Helm chart to this one, you can follow our migration guide
Database
By default, this chart ships with a very minimal Postgres installation. It is based on the official Docker Compose installation, using Immich's provided Postgres image. This image contains the necessary extensions for the database to work with Immich.
While this default image provides an equivalent to the docker-compose file, it might not be the most suitable for a production deployment. You can use a pre-existing Postgres database, but make sure to follow the linked instructions to ensure your Postgres installation supports the necessary extensions.
You can then update your values.yaml to use an external database:
server:
env:
DB_USERNAME: immich
DB_PASSWORD: <insert secure password>
DB_DATABASE_NAME: immich
DB_HOSTNAME: mydb.mynamespace.svc.cluster.local
If you don't wish to put the password in your Helm values, you can set an empty string here and provide it externally.
External Secrets
You can provide secrets to this chart without adding the literal secret values
to the values.yaml. A common approach is the External Secrets Operator.
To keep secrets out of your values.yaml, create the Secret resource
externally. Then mount it into the container. For example, to provide the
database password externally, you could do this:
server:
env:
DB_PASSWORD: ""
extraEnvFrom:
- secretRef:
name: my-secrets
Ensure that my-secrets contains a DB_PASSWORD key with the correct value.
Disable Default Configuration
By default, the chart ships with a minimal configuration that tells the server where to find the machine learning service. However, when a configuration is provided, Immich does not allow the administrator to change settings via the UI (as these would be overwritten by a new deployment or there would be conflicts). If you prefer to configure Immich via the UI, you can disable this configuration file:
server:
configuration: null
[!TIP] When disabling the default configuration, update the Machine Learning settings to provide the correct URL. The helm chart's NOTES that are shown when you install it will print the correct URL if configuration is disabled.
External Configuration
Similar to the approach for external secrets, it is
possible to provide configuration externally. This can be useful if you want to
put secrets into the configuration, for example an SMTP password for sending
emails. Add this to your values.yaml:
server:
# Setting this to `null` disables the default configuration
configuration: null
env:
IMMICH_CONFIG_FILE: /config/immich-config.yaml
volumes:
- name: config
secret:
# Create this Secret externally
secretName: immich-server-config
volumeMounts:
- name: config
mountPath: /config
This disables the default configuration, and
allows you to provide your own configuration file. Because configuration is
disabled entirely, the Helm chart will not tell Immich about a configuration
file, so you need to set IMMICH_CONFIG_FILE explicitly. Then you mount the
configuration from an external source.
Valkey (Redis Cache)
Caching is provided by the valkey-helm chart. At the moment there is no option to disable it or provide an external cache. Raise an issue if you would like to use an external Valkey or Redis instance.
By default, Valkey's authentication is disabled, relying on network security alone. Refer to the Valkey Helm chart's authentication documentation for how to enable authentication. You then need to provide the correct environment variables to Immich so it can authenticate.
Persistence is disabled for Valkey by default. When a pod re-created, Valkey's data is lost. This is the default for the Docker Compose installation, so it is fine for Immich. Valkey is used to store jobs, which Immich will re-schedule if they were lost. However, if you'd still like data to survive pod re-creation, you can enable persistence:
valkey:
persistence:
enabled: true
size: 200Mi
The size for the volume is only guide. Observe your installation's storage use and adjust it as needed.
For a complete list of options, refer to the valkey helm chart.
Reverse Proxy (HTTPRoute)
[!NOTE] At the moment, only Gateway API (
HTTPRoute) is supported. If you'd like to useIngress, raise an issue.
This charts supports access through a reverse proxy by creating a HTTPRoute.
Ensure you have a gateway created to expose your instance. Then add this to your
values.yaml:
server:
configuration:
server:
externalDomain: https://immich.example.com
httpRoute:
enabled: true
parentRefs:
- name: my-gateway
namespace: gateway-namespace
hostnames:
- immich.example.com
Make sure your DNS server points at the gateway for the hostname you picked (or configure something like External DNS.
The externalDomain configuration is necessary for Immich to render public
shared links correctly.
You can check that the route is valid using the following command:
kubectl describe --namespace immich httproutes.gateway.networking.k8s.io immich-server
Replace the namespace and resource name if you've changed them from the default.
The Status field contains an explanation of whether the route is ready or
there were any errors.
Migrating from the official chart
If you are coming from the official
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.6.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