home-assistant-matter-server
by wittdennis
Helm chart for home assistant matter server
About this chart
home-assistant-matter-server
Helm chart for home assistant matter server
Maintainers
| Name | Url | |
|---|---|---|
| Dennis Witt | https://github.com/wittdennis |
Source Code
- https://github.com/wittdennis/charts/tree/main/home-assistant-matter-server
- https://github.com/matter-js/matterjs-server
Local OTA images
The server serves local firmware images, from the provider directory or uploaded through the dashboard or WebSocket API, only with dcl.testNet enabled. Besides OTA, this also checks the test-net DCL for certificates and commissions devices that do not report the vendor or product id their Certification Declaration is checked against.
Uploads are staged in an ota-uploads subdirectory of the provider directory, so the directory has to be writable by the server. The root filesystem is read-only, so it has to live on a volume: either a path below /data, or ota.providerVolume, which the chart mounts at /ota or at ota.providerDir if set:
dcl:
testNet: true
ota:
providerVolume:
persistentVolumeClaim:
claimName: ota-images
ota.providerVolume takes any Kubernetes volume source. The server runs as 1000:1000. Volumes with fsGroup support, such as most PVCs, are handed over through podSecurityContext.fsGroup. Volumes without it, such as hostPath or NFS, need the directory owned by 1000:1000.
Without ota.providerDir or ota.providerVolume, uploads are staged in the storage path /data.
Custom PAA certificates
The server imports PAA certificates from *.paa.der and *.paa.pem files in dcl.certificatesDir at every start, so devices with a vendor's own PAA can be commissioned. Files ending in .prod.paa.der or .prod.paa.pem are imported as production certificates, all others as test certificates that are only trusted with dcl.testNet enabled.
Imported certificates are kept in the storage path /data, and each file is deleted after a successful import. A file that cannot be read or holds an invalid certificate is logged as an error and kept.
dcl.certificatesVolume takes any Kubernetes volume source and is mounted at /certificates, or at dcl.certificatesDir if set. A read-only source such as a Secret or ConfigMap works: the import is the same, but the files cannot be deleted, so every start logs a warning per file and reports their certificates as already stored:
dcl:
certificatesVolume:
secret:
secretName: paa-certificates
DER files are binary, so in a ConfigMap they go into binaryData. To avoid the warnings, use a writable volume or a path below /data. The same ownership rules as for local OTA images apply.
Revocation sets
The server installs the device attestation revocation sets from the *.json files in dcl.revocationSetsDir at every start and refuses devices whose certificates they list. The files are only read, so dcl.revocationSetsVolume is mounted read-only at /revocation-sets, or at dcl.revocationSetsDir if set:
dcl:
revocationSetsVolume:
configMap:
name: revocation-sets
Values
| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {} | |
| autoSubscription.enabled | bool | true | Subscribe to nodes and run background jobs automatically. Only disable for special use cases |
| bluetoothCommissioning | object | {"adapterId":0,"bindings":"dbus","enabled":false,"mode":"adapter"} | Bluetooth settings |
| bluetoothCommissioning.adapterId | int | 0 | Id of the bluetooth adapter e.g.: 0 for hci0. Only used in adapter mode |
| bluetoothCommissioning.bindings | string | "dbus" | Backend used to reach the adapter, possible options are: dbus (BlueZ on the node via the system D-Bus, works unprivileged), hci (raw HCI socket, requires running as root through podSecurityContext and securityContext). Only used in adapter mode |
| bluetoothCommissioning.enabled | bool | false | Flag to control if bluetooth commissioning should be enabled |
| bluetoothCommissioning.mode | string | "adapter" | Commissioning mode, possible options are: adapter (local bluetooth adapter of the node), proxy (remote BLE proxy client connecting to the /ble WebSocket endpoint) |
| customClusterPollInterval | string | nil | Polling interval in seconds (60 to 86400) for custom cluster attributes without subscription support. Uses the server default (60) if empty |
| dashboard.enabled | bool | true | Flag to control if the web dashboard should be served |
| dashboard.productionMode | string | nil | Force dashboard production mode, required when served through a reverse proxy. Defaults to true if ingress or route is enabled |
| dcl.certificatesDir | string | nil | Directory with PAA certificates (*.paa.der, *.paa.pem) imported at every start. Defaults to /certificates if dcl.certificatesVolume is set. Imported files are deleted, a read-only directory logs a warning per file at every start |
| dcl.certificatesVolume | object | {} | Volume source mounted at the certificates directory, e.g. {"secret": {"secretName": "paa-certificates"}} |
| dcl.disableSeed | bool | false | Disable the bundled offline DCL data and rely on the network DCL only. Cannot be combined with dcl.offline |
| dcl.offline | bool | false | Never contact the DCL. Attestation trusts the bundled DCL data and certificates stored by earlier runs, DCL revocation checks are skipped and firmware update checks do not query the DCL |
| dcl.revocationSetsDir | string | nil | Directory with device attestation revocation sets (*.json), installed at every start. Defaults to /revocation-sets if dcl.revocationSetsVolume is set |
| dcl.revocationSetsVolume | object | {} | Volume source mounted read-only at the revocation sets directory, e.g. {"configMap": {"name": "revocation-sets"}} |
| dcl.testNet | bool | false | Check the test-net DCL for certificates and firmware updates in addition to the production DCL. Required to serve local OTA images and accept OTA uploads. Also commissions devices that do not report the vendor or product id their Certification Declaration is checked against |
| enableServiceLinks | bool | true | Indicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links |
| extraArgs | list | [] | Additional command line arguments appended to the matter server container args, e.g. ["--thread-rest-probe-port", "8082"] |
| extraEnv | list | [] | Additional environment variables for the matter server container, e.g. [{"name": "DEFAULT_FABRIC_LABEL", "value": "Home"}] |
| fullnameOverride | string | "" | |
| image | object | {"pullPolicy":"IfNotPresent","registry":"ghcr.io","repository":"matter-js/matterjs-server","tag":""} | This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ |
| image.pullPolicy | string | "IfNotPresent" | This sets the pull policy for images. |
| image.registry | string | "ghcr.io" | Container registry where the repository is hosted |
| image.repository | string | "matter-js/matterjs-server" | Container repository |
| image.tag | string | "" | Overrides the image tag whose default is the chart appVersion. |
| imagePullSecrets | list | [] | This is for the secretes for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ |
| ingress | object | {"annotations":{},"className":"","enabled":false,"hosts":[{"host":"chart-example.local","paths":[{"path":"/","pathType":"ImplementationSpecific"}]}],"tls":[]} | This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/ |
| listenAddresses | list | [] | IP addresses, interface names or absolute unix socket paths the WebSocket server binds to. Binds on all node interfaces if empty. The kubelet probes and the service reach the server through the node IP, so one of the entries has to cover it. |
| livenessProbe | object | {"httpGet":{"path":"/health","port":"http"}} | This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/ |
| lockFileRemover | object | {"enabled":true,"image":{"registry":"docker.io","repository":"library/busybox","tag":"1.38.0"}} | Init container to remove matter.lock files which can be left behind if the matter-server doesn't shut down cleanly |
| lockFileRemover.enabled | bool | true | Flag to disable the init container |
| lockFileRemover.image | object | {"registry":"docker.io","repository":"library/busybox","tag":"1.38.0"} | Sets the image for the initContainer |
| lockFileRemover.image.registry | string | "docker.io" | Container registry where the repository is hosted |
| lockFileRemover.image.repository | string | "library/busybox" | Container repository |
| lockFileRemover.image.tag | string | "1.38.0" | Image tag |
| log.format | string | "plain" | Console log format, possible options are: plain, ansi |
| log.logLevel | string | "info" | Global logging level, possible options are: critical, error, warning, info, debug, verbose |
| nameOverride | string | "" | This is to override the chart name. |
| networkInterface | string | nil | Name of the network interface that should be used |
| nodeSelector | object | {} | Selector to control on which node the pods should be running |
| ota.enabled | bool | true | Flag to control if firmware updates are offered to devices |
| ota.providerDir | string | nil | Directory with local OTA images, e.g. below /data. Defaults to /ota if ota.providerVolume is set. Only read when dcl.testNet is enabled. OTA uploads are staged in it, so it has to be writable |
| ota.providerVolume | object | {} | Volume source mounted at the OTA provider directory, e.g. {"persistentVolumeClaim": {"claimName": "ota-images"}} |
| ota.uploadMaxInFlight | string | nil | Maximum number of OTA uploads reserved or transferring at once. Uses the server default (5) if empty |
| ota.uploadMaxSizeMb | string | nil | Maximum size in MB of an uploaded OTA image. Uses the server default (64) if empty |
| persistence | object | {"size":"2Gi","storageClassName":null} | Settings for storage |
| persistence.size | string | "2Gi" | Size for the persistent volume claim. |
| persistence.storageClassName | string | nil | Storage class to use for persistent storage. If left empty default storage class will be used. |
| podAnnotations | object | {} | This is for setting Kubernetes Annotations to a Pod. For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ |
| podLabels | object | {} | This is for setting Kubernetes Labels to a Pod. For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ |
| podSecurityContext | object | {"fsGroup":1000,"fsGroupChangePolicy":"OnRootMismatch","runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000,"seccompProfile":{"type":"RuntimeDefault"}} | Security context of the pod. The image runs as 1000:1000; fsGroup hands existing data owned by another user over to it. Volumes without fsGroup support (e.g. hostPath) need a manual chown -R 1000:1000 of the data. |
| port | int | 5580 | Port of the WebSocket server and dashboard. Binds on the node directly because the pod uses the host network |
| readinessProbe.httpGet.path | string | "/health" | |
| readinessProbe.httpGet.port | string | "http" | |
| resources | object | {} | |
| route | object | {"additionalRules":[],"annotations":{},"enabled":false,"filters":[],"hostnames":[],"labels":{},"matches":[{"path":{"type":"PathPrefix","value":"/"}}],"parentRefs":[]} | This block is for setting up gateway api http route. More information can be found here: https://gateway-api.sigs.k8s.io/ |
| route.additionalRules | list | [] | Any custom rule you want to specify |
| route.annotations | object | {} | Additional annotations for the HTTPRoute |
| route.enabled | bool | false | Flag to control if route should be created |
| route.filters | list | [] | Filter that should be added to the default rule |
| route.hostnames | list | [] | Hostnames of the HTTPRoute |
| route.labels | object | {} | Additional labels for the HTTPRoute |
| route.matches | list | [{"path":{"type":"PathPrefix","value":"/"}}] | Matches for the default rule |
| route.parentRefs | list | [] | Gateway reference that the HTTPRoute should bind against |
| securityContext | object | {"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"privileged":false,"readOnlyRootFilesystem":true,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000,"seccompProfile":{"type":"RuntimeDefault"}} | Security context of the matter server container. Add NET_RAW to capabilities.add if the node's net.ipv4.ping_group_range does not include gid 1000 and device pings are needed. |
| service | object | {"port":80,"type":"ClusterIP"} | This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/ |
| service.port | int | 80 | This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports |
| service.type | string | "ClusterIP" | This sets the service type more information can be found here: https://kubernetes |
Deploy home-assistant-matter-server with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has home-assistant-matter-server 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 charthome-assistant-matter-server is pinned at v5.1.1 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