Kubernetes (Helm)
If you already run a Kubernetes cluster, one Helm chart installs all of RapidMX: the server, the auth-server, MongoDB, Redis, rspamd, ClamAV, Postfix with postfix-bridge, and coturn for video calls. It creates a Gateway for each of its two host names and has cert-manager issue their Let's Encrypt certificates. Domains you add later in the admin console work within seconds, with nothing to restart or upgrade.
This page is the short path to a working install. The Helm chart reference lists every value, and Secrets and OpenBao covers keeping secrets in a vault.
What you need
- A cluster,
kubectland Helm 3.8 or later (3.14 or later for upgrades, see Upgrading) - A default
StorageClass - A Gateway API controller with a
GatewayClass, such as Envoy Gateway. The chart expects the classenvoy; change it withglobal.gateway.className. - cert-manager with Gateway API support turned on (
--set config.enableGatewayAPI=true), for Let's Encrypt certificates - A way to expose port 25: the chart's
postfixService is of typeLoadBalancer - The DNS records and open ports from Before you deploy
The chart grants itself only namespace-scoped permissions (a Role, never a ClusterRole), so installing it needs no
cluster-wide rights beyond what Helm needs to create the namespace.
Install
-
Check the cluster is ready:
kubectl get nodeskubectl get gatewayclasshelm version --shortkubectl get gatewayclassshould list your class (for exampleenvoy) as accepted. -
Install the chart. Replace
example.comwith your domain:helm upgrade --install --create-namespace --namespace rapidmx rapidmx \oci://ghcr.io/rapidmx/charts/server --version 1.0.0-beta.43 \--set global.domain=example.com \--set global.jwt.secret="$(openssl rand -hex 32)" \--set global.mailIngestSecret="$(openssl rand -hex 32)"global.domainis your mail domain. From it, the web app becomesmail.example.comand sign-inauth.example.com.global.jwt.secretis shared by the server and the auth-server.global.mailIngestSecretis shared by the server and postfix-bridge. Both are required, and the render fails without them.
:::warning Keep both secrets An upgrade needs the same two values, or
--reset-then-reuse-values. If you lose them, you can read them back from the cluster, as shown in Upgrading. ::: -
Watch it start. Every pod should reach
Running. ClamAV takes a few minutes to load its signatures:kubectl -n rapidmx get pods --watch -
Find the addresses for your DNS records:
kubectl -n rapidmx get gatewaykubectl -n rapidmx get svc postfixPoint
mail.example.comandauth.example.comat the Gateway's address. Postfix must be reachable onmail.example.comtoo, because that is the name other mail servers connect to.:::tip Good to know If the Gateway and the
postfixService get different addresses, give Postfix a name of its own: add--set postfixBridge.hostname=mx.example.com --set postfixBridge.tls.certManager.enabled=falseto the install, pointmx.example.comat thepostfixService and use it as your MX record. Postfix then uses a self-signed certificate. ::: -
Wait for the certificates to be issued (
READYisTrue):kubectl -n rapidmx get certificateNAME READY SECRET AGEauth.example.com True auth.example.com-tls-cert 41hmail.example.com True mail.example.com-tls-cert 41h -
Read the
adminaccount's password:kubectl -n rapidmx get secret rapidmx-authserver-service-secrets -o jsonpath='{.data.default_accounts}' \| base64 -d | tr -d '\\' | sed -n 's/.*"password":"\([^"]*\)".*/\1/p' -
Open
https://mail.example.comand continue with First-time setup.
What the chart installs
The Helm chart reference explains each part, and which volumes hold data you must back up.
Common variations
| To... | Set |
|---|---|
| Use a Gateway you already have | global.gateway.name and global.gateway.namespace. The Gateway needs an HTTPS listener per host that terminates TLS with the <host>-tls-cert Secret, which the chart lets it read through a ReferenceGrant. |
| Use different host names | host and global.serverHost (to the same value), and authserver.host |
| Keep secrets in OpenBao | global.openbao.enabled=true and the rest of Secrets and OpenBao |
| Send through Amazon SES | mail.transport.provider=ses and postfixBridge.create=false, see Mail transport |
| Turn off the TURN server | coturn.create=false, see Video calls: the TURN relay |
| Install from a checkout | helm repo add bitnami https://charts.bitnami.com/bitnami, then helm dep up ./helm, and use ./helm in place of the oci:// address |
The chart can also run the server on PostgreSQL instead of MongoDB (postgresql.create, global.database.type; it
refuses to render with both databases on). None of the installers use that path, so this guide documents MongoDB only.
If you do choose PostgreSQL, read the PostgreSQL warnings in Upgrading first.
Next steps
- First-time setup
- Backup and restore: know what to back up before you rely on it.
- Monitoring