roundcube

by encircle360 GmbH

Helm chartv0.8.3App 1.6.16Apache-2.0Verified publisher

A free and open source webmail solution with a desktop-like user interface

About this chart

roundcube

A free and open source webmail solution with a desktop-like user interface

Homepage: https://github.com/encircle360-oss/helm-charts/tree/main/charts/roundcube

Introduction

This chart bootstraps a Roundcube deployment on a Kubernetes cluster using the Helm package manager.

Roundcube is a browser-based multilingual IMAP client with an application-like user interface. It provides full functionality expected from an email client, including MIME support, address book, folder management, message searching and spell checking.

Prerequisites

  • Kubernetes 1.27+
  • Helm 3.14.0+
  • PV provisioner support in the underlying infrastructure (if using SQLite)
  • Access to an IMAP/SMTP mail server

Installing the Chart

To install the chart with the release name my-roundcube:

helm repo add encircle360-oss https://encircle360-oss.github.io/helm-charts/
helm repo update
helm install my-roundcube encircle360-oss/roundcube

Uninstalling the Chart

To uninstall/delete the my-roundcube deployment:

helm uninstall my-roundcube

Configuration

Basic Configuration

The following table lists the most important configurable parameters:

ParameterDescriptionDefault
roundcube.defaultHostDefault IMAP server addressssl://mail.example.com
roundcube.defaultPortDefault IMAP server port993
roundcube.smtpServerSMTP server addresstls://mail.example.com
roundcube.smtpPortSMTP server port587

Database Configuration

This chart supports three database backends:

SQLite (Default)

database:
  type: sqlite
persistence:
  enabled: true
  size: 5Gi

MySQL/MariaDB

database:
  type: mysql
  external:
    host: mysql.example.com
    port: 3306
    name: roundcube
    user: roundcube
    password: secretpassword

PostgreSQL

database:
  type: pgsql
  external:
    host: postgresql.example.com
    port: 5432
    name: roundcube
    user: roundcube
    password: secretpassword

Ingress Configuration

To expose Roundcube via Ingress:

ingress:
  enabled: true
  className: nginx
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod
  hosts:
    - host: webmail.example.com
      paths:
        - path: /
          pathType: Prefix
  tls:
    - secretName: roundcube-tls
      hosts:
        - webmail.example.com

Session Storage with Redis

For better performance in multi-replica deployments:

redis:
  enabled: true
  host: redis-master.default.svc.cluster.local
  port: 6379
  password: redispassword

Installing Additional Plugins via Composer

Roundcube supports installing additional plugins via composer. You can specify plugins using the composerPlugins list:

roundcube:
  plugins:
    - archive
    - zipdownload
  composerPlugins:
    - johndoh/contextmenu
    - sblaisot/automatic_addressbook
    - texxasrulez/persistent_login

This will:

  • Install the specified plugins via composer during container startup
  • Automatically make them available in Roundcube
  • Work with any plugin available on Packagist

Popular composer plugins include:

  • johndoh/contextmenu - Context menu for message list
  • sblaisot/automatic_addressbook - Automatically add recipients to address book
  • texxasrulez/persistent_login - Stay logged in across sessions
  • weird-birds/thunderbird_labels - Thunderbird-style labels

Custom Configuration

You can provide custom Roundcube configuration:

roundcube:
  customConfig: |
    <?php
    $config['spell_engine'] = 'aspell';
    $config['enable_spellcheck'] = true;
    // Additional custom configuration

Plugin-Specific Configuration

Many Roundcube plugins require their own config.inc.php file in the plugin directory. You can provide plugin-specific configurations using the pluginConfigs map:

roundcube:
  plugins:
    - identity_from_directory
    - persistent_login
  pluginConfigs:
    identity_from_directory: |
      <?php
      $config['identity_from_directory_ldap_host'] = ['ldap://localhost:389'];
      $config['identity_from_directory_ldap_base_dn'] = 'dc=example,dc=com';
      $config['identity_from_directory_ldap_bind_dn'] = 'cn=admin,dc=example,dc=com';
      $config['identity_from_directory_ldap_bind_pass'] = 'secret';
    persistent_login: |
      <?php
      $config['login_lifetime'] = 30;
      $config['login_secure_cookie'] = true;
      $config['login_token_expiration'] = 3600;

This will:

  • Create a separate ConfigMap for each plugin configuration
  • Mount each config directly to /var/www/html/plugins/<plugin-name>/config.inc.php
  • No init containers or lifecycle hooks required
  • Configs are immediately available when the container starts

Plugin-Specific Configuration with Secrets

For sensitive plugin configuration values (passwords, API tokens, OAuth secrets), use the secretEnvVars feature for a fully declarative approach:

Option 1: Using secretEnvVars (Recommended - Fully Declarative)

roundcube:
  plugins:
    - identity_from_directory
  pluginConfigs:
    identity_from_directory: |
      <?php
      $config['identity_from_directory_ldap_host'] = ['ldap://localhost:389'];
      $config['identity_from_directory_ldap_base_dn'] = 'dc=example,dc=com';
      $config['identity_from_directory_ldap_bind_dn'] = 'cn=admin,dc=example,dc=com';
      $config['identity_from_directory_ldap_bind_pass'] = getenv('LDAP_BIND_PASSWORD');
  secretEnvVars:
    LDAP_BIND_PASSWORD: "my-secret-password"
    API_KEY: "my-api-key"
    OAUTH_CLIENT_SECRET: "oauth-secret"

This will:

  • Automatically create a Kubernetes Secret
  • Inject environment variables into the container
  • Work with SOPS/sealed-secrets by encrypting your values.yaml or separate secrets.yaml
  • No external Secret creation or Helmfile hooks needed

Security with SOPS:

# Encrypt your values file with SOPS
sops -e values.yaml > values.enc.yaml

# Deploy with encrypted values
helm secrets upgrade my-release ./roundcube -f values.enc.yaml

Option 2: Using External Secrets (For existing secret management solutions)

roundcube:
  pluginConfigs:
    identity_from_directory: |
      <?php
      $config['identity_from_directory_ldap_bind_pass'] = getenv('LDAP_BIND_PASSWORD');
  extraEnvVars:
    - name: LDAP_BIND_PASSWORD
      valueFrom:
        secretKeyRef:
          name: my-existing-secret
          key: password

You must create the Secret separately (manually or via external-secrets operator):

apiVersion: v1
kind: Secret
metadata:
  name: my-existing-secret
type: Opaque
stringData:
  password: my-secret-password

Security Benefits:

  • secretEnvVars: Fully declarative, works with SOPS/sealed-secrets, no external tools needed
  • extraEnvVars: Supports external secret management (External Secrets Operator, Vault, etc.)
  • Secrets separated from configuration
  • Secrets never stored in ConfigMaps
  • Environment variables accessible via getenv() in PHP

Multi-Domain Support

Roundcube can serve multiple domains with completely different configurations:

roundcube:
  multiDomain:
    enabled: true
    domains:
      - name: "mail.example.com"
        config: |
          $config['default_host'] = 'ssl://imap.example.com:993';
          $config['smtp_server'] = 'tls://smtp.example.com:587';
          $config['managesieve_host'] = 'imap.example.com';
          $config['managesieve_port'] = 4190;
          $config['plugins'] = array('managesieve', 'password', 'archive');
      - name: "mail.company.org"
        config: |
          $config['default_host'] = 'ssl://mail.company.org:993';
          $config['smtp_server'] = 'ssl://mail.company.org:465';
          $config['smtp_conn_options'] = array(
            'ssl' => array('verify_peer' => false)
          );
          $config['password_algorithm'] = 'sha256-crypt';
          $config['password_db_dsn'] = 'mysql://user:pass@localhost/users';
          $config['plugins'] = array('password', 'vacation', 'forward');

ingress:
  enabled: true
  hosts:
    - host: mail.example.com
      paths:
        - path: /
    - host: mail.company.org
      paths:
        - path: /

With this configuration:

  • Each domain can have completely different settings
  • Full control over IMAP, SMTP, ManageSieve, OAuth, plugins, etc.
  • Users accessing different domains get their specific configuration
  • Fallback to default settings if domain is not configured

Note: When multiDomain.enabled: true, the chart deliberately omits the ROUNDCUBEMAIL_DEFAULT_HOST, ROUNDCUBEMAIL_DEFAULT_PORT, ROUNDCUBEMAIL_SMTP_SERVER, ROUNDCUBEMAIL_SMTP_PORT, ROUNDCUBEMAIL_SMTP_USER, and ROUNDCUBEMAIL_SMTP_PASS environment variables. The upstream entrypoint translates those into config.docker.inc.php, which Roundcube loads after the multi-domain config.inc.php. If they were set, every login would silently bypass the per-domain switch and hit the default host. The fallback in roundcube.defaultHost / roundcube.smtpServer is still rendered into the multi-domain config.inc.php, so unmatched hosts continue to fall through to the chart's default values.

Maintainers

NameEmailUrl
encircle360-oss[email protected]

Source Code

Values

KeyTypeDefaultDescription
affinityobject{}
autoscaling.enabledboolfalse
autoscaling.maxReplicasint10
autoscaling.minReplicasint1
autoscaling.targetCPUUtilizationPercentageint80
autoscaling.targetMemoryUtilizationPercentageint80
database.external.existingSecretstring""
database.external.existingSecretPasswordKeystring"password"
database.external.existingSecretUserKeystring"username"
database.external.hoststring""
database.external.namestring"roundcube"
database.external.passwordstring""
database.external.portint3306
database.external.userstring"roundcube"
database.typestring"sqlite"
fullnameOverridestring""
image.pullPolicystring"IfNotPresent"
image.repositorystring"roundcube/roundcubemail"
image.tagstring"1.6.16-apache-nonroot"
imagePullSecretslist[]
ingress.annotationsobject{}
ingress.classNamestring""
ingress.enabledboolfalse
ingress.hosts[0].hoststring"webmail.example.com"
ingress.hosts[0].paths[0].pathstring"/"
ingress.hosts[0].paths[0].pathTypestring"Prefix"
ingress.tlslist[]
initContainerslist[]
livenessProbe.enabledbooltrue
livenessProbe.failureThresholdint3
livenessProbe.initialDelaySecondsint30
livenessProbe.periodSecondsint10
livenessProbe.successThresholdint1
livenessProbe.timeoutSecondsint5
memcached.enabledboolfalse
memcached.hoststring""
memcached.portint11211
nameOverridestring""
nodeSelectorobject{}
persistence.accessModestring"ReadWriteOnce"
persistence.enabledbooltrue
persistence.existingClaimstring""
persistence.logsPathstring"/var/roundcube/logs"
persistence.sizestring"5Gi"
persistence.sqlitePathstring"/var/roundcube/db"
persistence.storageClassstring""
persistence.tempPathstring"/tmp/roundcube"
podAnnotationsobject{}
podSecurityContext.fsGroupint33
podSecurityContext.runAsNonRootbooltrue
podSecurityContext.runAsUserint33
readinessProbe.enabledbooltrue
readinessProbe.failureThresholdint3
readinessProbe.initialDelaySecondsint5
readinessProbe.periodSecondsint10
readinessProbe.successThresholdint1
readinessProbe.timeoutSecondsint5
redis.enabledboolfalse
redis.existingSecretstring""
redis.existingSecretPasswordKeystring"password"
redis.hoststring""
redis.passwordstring""
redis.portint6379
replicaCountint1
resources.limits.memorystring"512Mi"
resources.requests.cpustring"100m"
resources.requests.memorystring"256Mi"
roundcube.composerPluginslist[]
roundcube.customConfigstring""
roundcube.defaultHoststring"ssl://mail.example.com"
roundcube.defaultPortint993
roundcube.desKeystring""
roundcube.extraEnvVarslist[]
roundcube.extraVolumeMountslist[]
roundcube.extraVolumeslist[]
roundcube.multiDomain.domainslist[]
roundcube.multiDomain.enabledboolfalse
roundcube.pluginConfigsobject{}
roundcube.plugins[0]string"archive"
roundcube.plugins[1]string"zipdownload"
roundcube.plugins[2]string"managesieve"
roundcube.productNamestring"Roundcube Webmail"
roundcube.secretE

Deploy roundcube with OpenTenant

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