homarr
by homarr-labs
A Helm chart to deploy homarr for Kubernetes
About this chart
Homarr
A Helm chart to deploy homarr for Kubernetes
Homepage: https://homarr-labs.github.io/charts/charts/homarr/
Source Code
Requirements
Kubernetes: >=1.24.0-0
Dependencies
This chart has no dependencies.
Installing the Chart
To install the chart with the release name homarr
OCI (Recommended)
helm install homarr oci://ghcr.io/homarr-labs/charts/homarr
Traditional
helm repo add homarr-labs https://homarr-labs.github.io/charts/
helm repo update
helm install homarr homarr-labs/homarr
Uninstalling the Chart
To uninstall the homarr deployment
helm uninstall homarr
The command removes all the Kubernetes components associated with the chart including persistent volumes and deletes the release.
Configuration
Read through the values.yaml file. It has several commented out suggested values.
Specify each parameter using the --set key=value[,key=value] argument to helm install.
helm install homarr \
--set env.TZ="America/New York" \
homarr-labs/homarr
Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart.
helm install homarr homarr-labs/homarr -f values.yaml
Custom configuration
Secrets
To avoid including sensitive information in plain text within your version control, consider using a declarative approach by applying secrets directly with kubectl apply. For example, instead of including repository credentials in your Helm values, you can leverage a kubernetes secrets manager.
Below is an exhaustive list of all secrets:
| FEATURE | SECRET NAME | SECRET KEYS | Required |
|---|---|---|---|
| OIDC | auth-oidc-secret | oidc-client-idoidc-client-secret | No |
| LDAP | auth-ldap-secret | bind-password | No |
| DATABASE | db-secret | db-url | No |
| DATABASE | db-encryption | db-encryption-key | yes |
Database
You have multiple options for configuring the database:
| DRIVER TYPE | Persistence mode |
|---|---|
| better-sqlite3 | Pod disk |
| better-sqlite3 | homarr-database PVC |
| mysql2 | External MySql database |
| node-postgres | External Postgresql database |
Pod disk
No additional configuration is required. However, keep in mind that if the pod restarts, all data will be lost. This setup is not recommended for production use.
To create the necessary database secret, execute the following command:
kubectl create secret generic db-encryption \
--from-literal=db-encryption-key='<SECRET_ENCRYPTION_KEY_SECRET_TO_CHANGE>' \
--namespace homarr
PVC
To persist data, you need to enable the homarr-database PVC. This will store the Homarr database on a mounted volume.
Associated secret to create :
kubectl create secret generic db-encryption \
--from-literal=db-encryption-key='<SECRET_ENCRYPTION_KEY_SECRET_TO_CHANGE>' \
--namespace homarr
Bellow an example of the override value file :
persistence:
homarrDatabase:
enabled: true
storageClassName: "default"
size: "1Gi"
External MySql database
To create the necessary database secrets, execute the following command:
kubectl create secret generic db-encryption \
--from-literal=db-encryption-key='<SECRET_ENCRYPTION_KEY_SECRET_TO_CHANGE>' \
--namespace homarr
kubectl create secret generic db-secret \
--from-literal=db-url='mysql://user:password@host:port/homarrdb' \
--namespace homarr
Below is an example of the override values file:
database:
type: mysql
External Postgresql database
To create the necessary database secrets, execute the following command:
kubectl create secret generic db-encryption \
--from-literal=db-encryption-key='<SECRET_ENCRYPTION_KEY_SECRET_TO_CHANGE>' \
--namespace homarr
kubectl create secret generic db-secret \
--from-literal=db-url='postgresql://user:password@host:port/homarrdb' \
--namespace homarr
Below is an example of the override values file:
database:
type: postgresql
Ingress
The ingress section in the values.yaml file allows you to configure how external traffic accesses your application through an Ingress resource. This section defines whether Ingress is enabled, the class to use, and how to set up hosts, paths, and TLS for secure connections.
service:
enabled: true # Ensure the service is enabled for Ingress to route traffic
ingress:
enabled: true
ingressClassName: "traefik"
annotations:
# Add any additional annotations as needed
hosts:
- host: homarr.homelab.dev
paths:
- path: /
pathType: ImplementationSpecific
tls:
- hosts:
- "homarr.homelab.dev"
- "www.homarr.homelab.dev"
secretName: homelab-tls
HTTPRoute (Gateway API)
The httproute section in the values.yaml file allows you to configure how external traffic accesses your application using the Kubernetes Gateway API. This provides a more expressive and future-proof alternative to Ingress, with support for advanced routing, filters, and multiple parent Gateways.
service:
enabled: true # must be enabled for HTTPRoute to forward traffic
httproute:
enabled: true
parentRefs:
- name: my-gateway
namespace: default
hostnames:
- homarr.homelab.dev
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: homarr
port: 7575
Notes:
- parentRefs: the Gateway(s) this route attaches to. Gateways must already exist.
- hostnames: domain names this route applies to.
- rules: each rule can define matches (paths, headers, queries), optional filters, and backendRefs to services
- TLS must be configured on the Gateway (not on HTTPRoute). For example, the Gateway can have a TLS listener for homarr.homelab.dev, and this route will automatically apply once matched.
Certificates
Configuration for trusted certificate persistence. Supports:
- Declarative config via
configmaporsecret - Pre-existing secret with
existingSecret
type: configmap
Use inline certificates to generate a ConfigMap, mounted as individual files.
persistence:
homarrTrustedCerts:
enabled: true
type: configmap
certificates:
cert1.crt: |
-----BEGIN CERTIFICATE-----
MIID...ABCD==
-----END CERTIFICATE-----
cert2.crt: |
-----BEGIN CERTIFICATE-----
MIID...EFGH==
-----END CERTIFICATE-----
Behavior:
- Helm creates a ConfigMap with keys cert1.crt and cert2.crt
- Mounts them as /appdata/trusted-certificates/cert1.crt and /appdata/trusted-certificates/cert2.crt
type: secret
Use inline certificates to generate a Kubernetes Secret, mounted as files.
persistence:
homarrTrustedCerts:
enabled: true
type: secret
certificates:
cert1.crt: |
-----BEGIN CERTIFICATE-----
MIIC...XYZ==
-----END CERTIFICATE-----
cart2.crt: |
-----BEGIN CERTIFICATE-----
MIIC...XYZ==
-----END CERTIFICATE-----
Behavior:
- Helm creates a Kubernetes Secret with cert1.crt and cart2.crt keys
- Mounts it into the container
type: existingSecret
Use an existing Kubernetes Secret, assuming its keys are filenames.
persistence:
homarrTrustedCerts:
enabled: true
type: existingSecret
existingSecretName: "existingSecretName"
existingSecretKeys:
- cert3.crt
- cert4.crt
Behavior:
- No new Secret is created
- Uses existingSecretName directly
- Mounts all keys as files in /appdata/trusted-certificates
Summary Table
| Type | Creates Resource | Requires Certificates | Uses Existing | Mounts As Files |
|---|---|---|---|---|
configmap | ConfigMap | Yes (certificates) | ❌ | ✅ |
secret | Secret | Yes (certificates) | ❌ | ✅ |
existingSecret | ❌ | ❌ | ✅ | ✅ |
All available values are listed on the artifacthub. If you find any issue please open an issue on github
Values
| Key | Type | Default | Description |
|---|---|---|---|
| additionalObjects | list | [] | Additional resources to deploy. These objects are templated. |
| affinity | object | {} | Node affinity for pod scheduling |
| autoscaling.enabled | bool | false | Enable autoscaling |
| autoscaling.maxReplicas | int | 100 | Maximum replicas |
| autoscaling.minReplicas | int | 1 | Minimum replicas |
| autoscaling.targetCPUUtilizationPercentage | int | 80 | Target CPU utilization for autoscaling |
| containerPorts | object | {"http":{"port":7575,"protocol":"TCP"}} | containerPorts defines the ports to open on the container. It is a map where each entry specifies: - port (int) (required): The port number to expose inside the container. - protocol (string) (required): The network protocol (TCP or UDP) used for the port. - disabled (bool) : Optional flag to disable this port (defaults to false). Can be overridden via Helm values. By default, this configuration exposes TCP port 7575 with the name http. |
| database.migrationEnabled | bool | true | Database migration configuration. DB_MIGRATIONS_DISABLED Set to true to disable database migrations. Migrations are enabled by default (false). |
| database.type | string | "sqlite" | Database type: sqlite, mysql or postgresql |
| env.AUTH_COOKIE_PREFIX | string | "homarr" | Prefix used for all authentication cookies. Change if you run another Auth.js/NextAuth app on the same hostname to avoid cookie name collisions. Only letters, numbers, hyphens and underscores. |
| env.AUTH_LDAP_BASE | string | nil | Base dn of your LDAP server |
| env.AUTH_LDAP_BIND_DN | string | nil | User used for finding users and groups |
| env.AUTH_LDAP_GROUP_CLASS | string | "groupOfUniqueNames" | Class used for querying groups |
| env.AUTH_LDAP_GROUP_FILTER_EXTRA_ARG | string | nil | Extra arguments for user's groups search filter (& based) |
| env.AUTH_LDAP_GROUP_MEMBER_ATTRIBUTE | string | "member" | Attribute used for querying group member |
| env.AUTH_LDAP_GROUP_MEMBER_USER_ATTRIBUTE | string | "dn" | User attribute used for comparing with group member |
| env.AUTH_LDAP_SEARCH_SCOPE | string | "base" | LDAP search scope between base, one or sub |
| env.AUTH_LDAP_URI | string | nil | URI of your LDAP server |
| env.AUTH_LDAP_USERNAME_ATTRIBUTE | string | "uid" | Attribute used for username |
| env.AUTH_LDAP_USERNAME_FILTER_EXTRA_ARG | string | nil | Extra arguments for user search filter (& based) |
| env.AUTH_LDAP_USER_MAIL_ATTRIBUTE | string | "mail" | Attribute used for mail field |
| env.AUTH_LOGOUT_REDIRECT_URL | string | nil | URL to redirect to after clicking logging out. |
| env.AUTH_OIDC_AUTO_LOGIN | string | "false" | Automatically redirect to OIDC login |
| env.AUTH_OIDC_CLIENT_NAME | string | "OIDC" | Display name of provider (in login screen) |
| env.AUTH_OIDC_GROUPS_ATTRIBUTE | string | "groups" | Attribute used for groups (roles) claim |
| env.AUTH_OIDC_ISSUER | string | nil | Issuer URI of OIDC provider without trailing slash (/) |
| env.AUTH_OIDC_NAME_ATTRIBUTE_OVERWRITE | string | nil | Overwrite name attribute. By default, it will use preferred_username if it does not contain a @ and otherwise name. |
| env.AUTH_OIDC_SCOPE_OVERWRITE | string | "openid email profile groups" | Override the OIDC scopes |
| env.AUTH_PROVIDERS | string | "credentials" | Enabled authentication methods. Multiple providers can be enabled with by separating them with , (ex. AUTH_PROVIDERS=credentials,oidc, it is highly recommended to just enable one provider). |
| env.AUTH_SESSION_EXPIRY_TIME | string | "30d" | Time for the session to time out. Can be set as pure number, which will automatically be used in seconds, or followed by s, m, h or d for seconds, minutes, hours or days. (ex: "30m") |
| env.ENABLE_DNS_CACHING | string | "false" | Enables dns caching. This is not yet working for all users. See #4 |
Deploy homarr with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has homarr 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 charthomarr is pinned at v8.44.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