home-assistant-matter-server

by wittdennis

Helm chartv5.1.1App 1.6.1MITVerified publisher

Helm chart for home assistant matter server

About this chart

home-assistant-matter-server

Helm chart for home assistant matter server

Maintainers

NameEmailUrl
Dennis Witthttps://github.com/wittdennis

Source Code

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

KeyTypeDefaultDescription
affinityobject{}
autoSubscription.enabledbooltrueSubscribe to nodes and run background jobs automatically. Only disable for special use cases
bluetoothCommissioningobject{"adapterId":0,"bindings":"dbus","enabled":false,"mode":"adapter"}Bluetooth settings
bluetoothCommissioning.adapterIdint0Id of the bluetooth adapter e.g.: 0 for hci0. Only used in adapter mode
bluetoothCommissioning.bindingsstring"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.enabledboolfalseFlag to control if bluetooth commissioning should be enabled
bluetoothCommissioning.modestring"adapter"Commissioning mode, possible options are: adapter (local bluetooth adapter of the node), proxy (remote BLE proxy client connecting to the /ble WebSocket endpoint)
customClusterPollIntervalstringnilPolling interval in seconds (60 to 86400) for custom cluster attributes without subscription support. Uses the server default (60) if empty
dashboard.enabledbooltrueFlag to control if the web dashboard should be served
dashboard.productionModestringnilForce dashboard production mode, required when served through a reverse proxy. Defaults to true if ingress or route is enabled
dcl.certificatesDirstringnilDirectory 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.certificatesVolumeobject{}Volume source mounted at the certificates directory, e.g. {"secret": {"secretName": "paa-certificates"}}
dcl.disableSeedboolfalseDisable the bundled offline DCL data and rely on the network DCL only. Cannot be combined with dcl.offline
dcl.offlineboolfalseNever 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.revocationSetsDirstringnilDirectory with device attestation revocation sets (*.json), installed at every start. Defaults to /revocation-sets if dcl.revocationSetsVolume is set
dcl.revocationSetsVolumeobject{}Volume source mounted read-only at the revocation sets directory, e.g. {"configMap": {"name": "revocation-sets"}}
dcl.testNetboolfalseCheck 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
enableServiceLinksbooltrueIndicates whether information about services should be injected into pod's environment variables, matching the syntax of Docker links
extraArgslist[]Additional command line arguments appended to the matter server container args, e.g. ["--thread-rest-probe-port", "8082"]
extraEnvlist[]Additional environment variables for the matter server container, e.g. [{"name": "DEFAULT_FABRIC_LABEL", "value": "Home"}]
fullnameOverridestring""
imageobject{"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.pullPolicystring"IfNotPresent"This sets the pull policy for images.
image.registrystring"ghcr.io"Container registry where the repository is hosted
image.repositorystring"matter-js/matterjs-server"Container repository
image.tagstring""Overrides the image tag whose default is the chart appVersion.
imagePullSecretslist[]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/
ingressobject{"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/
listenAddresseslist[]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.
livenessProbeobject{"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/
lockFileRemoverobject{"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.enabledbooltrueFlag to disable the init container
lockFileRemover.imageobject{"registry":"docker.io","repository":"library/busybox","tag":"1.38.0"}Sets the image for the initContainer
lockFileRemover.image.registrystring"docker.io"Container registry where the repository is hosted
lockFileRemover.image.repositorystring"library/busybox"Container repository
lockFileRemover.image.tagstring"1.38.0"Image tag
log.formatstring"plain"Console log format, possible options are: plain, ansi
log.logLevelstring"info"Global logging level, possible options are: critical, error, warning, info, debug, verbose
nameOverridestring""This is to override the chart name.
networkInterfacestringnilName of the network interface that should be used
nodeSelectorobject{}Selector to control on which node the pods should be running
ota.enabledbooltrueFlag to control if firmware updates are offered to devices
ota.providerDirstringnilDirectory 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.providerVolumeobject{}Volume source mounted at the OTA provider directory, e.g. {"persistentVolumeClaim": {"claimName": "ota-images"}}
ota.uploadMaxInFlightstringnilMaximum number of OTA uploads reserved or transferring at once. Uses the server default (5) if empty
ota.uploadMaxSizeMbstringnilMaximum size in MB of an uploaded OTA image. Uses the server default (64) if empty
persistenceobject{"size":"2Gi","storageClassName":null}Settings for storage
persistence.sizestring"2Gi"Size for the persistent volume claim.
persistence.storageClassNamestringnilStorage class to use for persistent storage. If left empty default storage class will be used.
podAnnotationsobject{}This is for setting Kubernetes Annotations to a Pod. For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/
podLabelsobject{}This is for setting Kubernetes Labels to a Pod. For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
podSecurityContextobject{"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.
portint5580Port of the WebSocket server and dashboard. Binds on the node directly because the pod uses the host network
readinessProbe.httpGet.pathstring"/health"
readinessProbe.httpGet.portstring"http"
resourcesobject{}
routeobject{"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.additionalRuleslist[]Any custom rule you want to specify
route.annotationsobject{}Additional annotations for the HTTPRoute
route.enabledboolfalseFlag to control if route should be created
route.filterslist[]Filter that should be added to the default rule
route.hostnameslist[]Hostnames of the HTTPRoute
route.labelsobject{}Additional labels for the HTTPRoute
route.matcheslist[{"path":{"type":"PathPrefix","value":"/"}}]Matches for the default rule
route.parentRefslist[]Gateway reference that the HTTPRoute should bind against
securityContextobject{"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.
serviceobject{"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.portint80This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports
service.typestring"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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the charthome-assistant-matter-server is pinned at v5.1.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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