matrix

by zekker6

Helm chartv3.39.0App v1.165.0Verified publisher

A Helm chart to deploy a Matrix homeserver stack into Kubernetes

About this chart

matrix

A Helm chart to deploy a Matrix homeserver stack into Kubernetes

This chart is not maintained by the upstream project and any issues with the chart should be raised here

Chart source: https://github.com/typokign/matrix-chart

Features

  • Latest version of Synapse
  • (Optional) Latest version of Riot Web
  • (Optional) Choice of lightweight Exim relay or external mail server for email notifications
  • (Optional) Coturn TURN server for VoIP calls
  • (Optional) matrix-org/matrix-appservice-irc IRC bridge
  • (Optional) tulir/mautrix-whatsapp WhatsApp bridge
  • (Optional) Half-Shot/matrix-appservice-discord Discord bridge
  • Fully configurable via values.yaml
  • Ingress definition for federated Synapse and Riot

Breaking changes

2.82.0 -> 3.0.0

The chart no longer includes postgresql chart by default. Previously, it was using a bitnami/postgresql which became obsolete after introducing a paid subscription for bitnami docker images. See these issues for more details:

  • https://github.com/bitnami/charts/issues/35164
  • https://github.com/zekker6/helm-charts/issues/825

Source Code

Requirements

Dependencies

RepositoryNameVersion

TL;DR

helm repo add zekker6 https://zekker6.github.io/helm-charts/
helm repo update
helm install matrix zekker6/matrix

Installing the Chart

To install the chart with the release name matrix

helm install matrix zekker6/matrix

Uninstalling the Chart

To uninstall the matrix deployment

helm uninstall matrix

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. Other values may be used from the values.yaml from the common library.

Specify each parameter using the --set key=value[,key=value] argument to helm install.

helm install matrix \
  --set env.TZ="America/New York" \
    zekker6/matrix

Alternatively, a YAML file that specifies the values for the above parameters can be provided while installing the chart.

helm install matrix zekker6/matrix -f values.yaml

Custom configuration

N/A

Values

Important: When deploying an application Helm chart you can add more values from our common library chart here

KeyTypeDefaultDescription
bridges.affinityboolfalse
bridges.discord.auth.botTokenstring""
bridges.discord.auth.clientIdstring""
bridges.discord.channelNamestring"[Discord] :guild :name"
bridges.discord.data.capacitystring"512Mi"
bridges.discord.data.storageClassstring""
bridges.discord.defaultVisibilitystring"public"
bridges.discord.enabledboolfalse
bridges.discord.image.pullPolicystring"Always"
bridges.discord.image.repositorystring"halfshot/matrix-appservice-discord"
bridges.discord.image.tagstring"latest"
bridges.discord.joinLeaveEventsbooltrue
bridges.discord.presencebooltrue
bridges.discord.readReceiptbooltrue
bridges.discord.replicaCountint1
bridges.discord.resourcesobject{}
bridges.discord.selfServiceboolfalse
bridges.discord.service.portint9005
bridges.discord.service.typestring"ClusterIP"
bridges.discord.typingNotificationsbooltrue
bridges.discord.users.nicknamestring":nick"
bridges.discord.users.usernamestring":username#:tag"
bridges.irc.data.capacitystring"1Mi"
bridges.irc.databasestring"matrix_irc"
bridges.irc.databaseSslVerifybooltrue
bridges.irc.enabledboolfalse
bridges.irc.image.pullPolicystring"IfNotPresent"
bridges.irc.image.repositorystring"matrixdotorg/matrix-appservice-irc"
bridges.irc.image.tagstring"release-0.22.0-rc1"
bridges.irc.presenceboolfalse
bridges.irc.replicaCountint1
bridges.irc.resourcesobject{}
bridges.irc.servers."chat.freenode.net".namestring"Freenode"
bridges.irc.servers."chat.freenode.net".portint6697
bridges.irc.servers."chat.freenode.net".sslbooltrue
bridges.irc.service.portint9006
bridges.irc.service.typestring"ClusterIP"
bridges.volume.accessModestring"ReadWriteMany"
bridges.volume.capacitystring"1Mi"
bridges.volume.storageClassstring""
bridges.whatsapp.bot.avatarstring"mxc://maunium.net/NeXNQarUbrlYBiPCpprYsRqr"
bridges.whatsapp.bot.displayNamestring"WhatsApp bridge bot"
bridges.whatsapp.bot.usernamestring"whatsappbot"
bridges.whatsapp.callNoticesbooltrue
bridges.whatsapp.communityNamestring"whatsapp_{{.Localpart}}={{.Server}}"
bridges.whatsapp.connection.maxAttemptsint3
bridges.whatsapp.connection.qrRegenCountint2
bridges.whatsapp.connection.reportRetrybooltrue
bridges.whatsapp.connection.retryDelayint-1
bridges.whatsapp.connection.timeoutint20
bridges.whatsapp.data.capacitystring"512Mi"
bridges.whatsapp.data.storageClassstring""
bridges.whatsapp.enabledboolfalse
bridges.whatsapp.image.pullPolicystring"Always"
bridges.whatsapp.image.repositorystring"dock.mau.dev/tulir/mautrix-whatsapp"
bridges.whatsapp.image.tagstring"latest"
bridges.whatsapp.permissions.*string"relaybot"
bridges.whatsapp.relaybot.enabledboolfalse
bridges.whatsapp.relaybot.inviteslist[]
bridges.whatsapp.relaybot.managementstring"!foo:example.com"
bridges.whatsapp.replicaCountint1
bridges.whatsapp.resourcesobject{}
bridges.whatsapp.service.portint29318
bridges.whatsapp.service.typestring"ClusterIP"
bridges.whatsapp.users.displayNamestring"{{if .Notify}}{{.Notify}}{{else}}{{.Jid}}{{end}} (WA)"
bridges.whatsapp.users.usernamestring"whatsapp_{{.}}"
coturn.allowGuestsbooltrue
coturn.enabledbooltrue
coturn.image.pullPolicystring"IfNotPresent"
coturn.image.repositorystring"instrumentisto/coturn"
coturn.image.tagstring"4.5"
coturn.kindstring"DaemonSet"
coturn.labels.componentstring"coturn"
coturn.ports.fromint49152
coturn.ports.toint49172
coturn.replicaCountint1
coturn.resourcesobject{}
coturn.service.typestring"ClusterIP"
coturn.sharedSecretstring""
coturn.urislist[]
fullnameOverridestring""
imagePullSecretslist[]
ingress.annotations."nginx.ingress.kubernetes.io/configuration-snippet"string"proxy_intercept_errors off;\n"
ingress.enabledbooltrue
ingress.federationbooltrue
ingress.hosts.federationstring"matrix-fed.chart-example.local"
ingress.hosts.riotstring"element.chart-example.local"
ingress.hosts.synapsestring"matrix.chart-example.local"
ingress.tlslist[]
mail.enabledbooltrue
mail.external.hoststring""
mail.external.passwordstring""
mail.external.portint25
mail.external.requireTransportSecuritybooltrue
mail.external.usernamestring""
mail.fromstring"Matrix <[email protected]>"
mail.relay.enabledbooltrue
mail.relay.image.pullPolicystring"IfNotPresent"
mail.relay.image.repositorystring"devture/exim-relay"
mail.relay.image.tagstring"4.98-r0-4"
mail.relay.labels.componentstring"mail"
mail.relay.probes.livenessobject{}
mail.relay.probes.readinessobject{}
mail.relay.probes.startupobject{}
mail.relay.replicaCountint1
mail.relay.resourcesobject{}
mail.relay.service.portint25
mail.relay.service.typestring"ClusterIP"
mail.riotUrlstring""
matrix.adminEmailstring"[email protected]"
matrix.blockNonAdminInvitesboolfalse
matrix.disabledboolfalse
matrix.disabledMessagestring""
matrix.encryptByDefaultstring"invite"
matrix.federation.allowPublicRoomsbooltrue
matrix.federation.enabledbooltrue
matrix.ip_blacklist[0]string"127.0.0.0/8"
matrix.ip_blacklist[10]string"198.51.100.0/24"
matrix.ip_blacklist[11]string"203.0.113.0/24"
matrix.ip_blacklist[12]string"224.0.0.0/4"
matrix.ip_blacklist[13]string"::1/128"
matrix.ip_blacklist[14]string"fe80::/10"
matrix.ip_blacklist[15]string"fc00::/7"
matrix.ip_blacklist[16]string"2001:db8::/32"
matrix.ip_blacklist[17]string"ff00::/8"
matrix.ip_blacklist[18]string"fec0::/10"
matrix.ip_blacklist[1]string"10.0.0.0/8"
matrix.ip_blacklist[2]string"172.16.0.0/12"
matrix.ip_blacklist[3]string"192.168.0.0/16"
matrix.ip_blacklist[4]string"100.64.0.0/10"
matrix.ip_blacklist[5]string"192.0.0.0/24"
matrix.ip_blacklist[6]string"169.254.0.0/16"
matrix.ip_blacklist[7]string"192.88.99.0/24"
matrix.ip_blacklist[8]string"198.18.0.0/15"
matrix.ip_blacklist[9]string"192.0.2.0/24"
matrix.logging.rootLogLevelstring"WARNING"
matrix.logging.sqlLogLevelstring"WARNING"
matrix.logging.synapseLogLevelstring"WARNING"
matrix.oidc_providerslist[]
matrix.presencebooltrue
matrix.registration.allowGuestsboolfalse
matrix.registration.autoJoinRoomslist[]
matrix.registration.disable_verificationboolfalse
matrix.registration.enable_3pid_lookupbooltrue
matrix.registration.enabledboolfalse
matrix.retentionPeriodstring"7d"
matrix.searchbooltrue
matrix.security.surpressKeyServerWarningbooltrue
matrix.serverNamestring"example.com"
matrix.telemetryboolfalse
matrix.uploads.maxPixelsstring"32M"
matrix.uploads.maxSizestring"10M"
matrix.urlPreviews.enabledboolfalse
matrix.urlPreviews.rules.ip.blacklist[0]string"127.0.0.0/8"
matrix.urlPreviews.rules.ip.blacklist[1]string"10.0.0.0/8"
matrix.urlPreviews.rules.ip.blacklist[2]string"172.16.0.0/12"
matrix.urlPreviews.rules.ip.blacklist[3]string"192.168.0.0/16"
matrix.urlPreviews.rules.ip.blacklist[4]string"100.64.0.0/10"
matrix.urlPreviews.rules.ip.blacklist[5]string"169.254.0.0/16"
matrix.urlPreviews.rules.ip.blacklist[6]string"::1/128"
matrix.urlPreviews.rules.ip.blacklist[7]string"fe80::/64"
matrix.urlPreviews.rules.ip.blacklist[8]string"fc00::/7"
matrix.urlPreviews.rules.maxSizestring"10M"
matrix.urlPreviews.rules.urlobject{}
nameOverridestring""
networkPolicies.enabledboolfalse
postgresql.allowUnsafeLocaleboolfalse
postgresql.databasestring"matrix"
postgresql.hostnamestring""
postgresql.passwordstring"matrix"
postgresql.portint5432
postgresql.sslboolfalse
postgresql.sslModestring""
postgresql.usernamestring"matrix"
riot.branding.authFooterLinkslist[]
riot.branding.authHeaderLogoUrlstring""
riot.branding.brandstring"Element"
riot.branding.welcomeBackgroundUrlstring""
riot.enabledbooltrue
riot.image.pullPolicystring"IfNotPresent"
riot.image.repositorystring"vectorim/riot-web"
riot.image.tagstring"v1.7.33"
riot.integrations.apistring"https://scalar.vector.im/api"
riot.integrations.enabledbooltrue
riot.integrations.uistring"https://scalar.vector.im/"
riot.integrations.widgets[0]string"https://scalar.vector.im/_matrix/integrations/v1"
riot.integrations.widgets[1]string"https://scalar.vector.im/api"
riot.integrations.widgets[2]string"https://scalar-staging.vector.im/_matrix/integrations/v1"
riot.integr

Deploy matrix with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has matrix 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 chartmatrix is pinned at v3.39.0 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