dolibarr

by HelmForge

Helm chartv1.2.26App 24.0.3Apache-2.0Verified publisher

A Helm chart for deploying Dolibarr ERP/CRM on Kubernetes with MySQL support

About this chart

Dolibarr

A Helm chart for deploying Dolibarr ERP/CRM on Kubernetes using the official dolibarr/dolibarr Docker image.

Installation

HTTPS Repository

helm repo add helmforge https://repo.helmforge.dev
helm repo update
helm install dolibarr helmforge/dolibarr

OCI Registry

helm install dolibarr oci://ghcr.io/helmforgedev/helm/dolibarr

Quick Start

helm install dolibarr oci://ghcr.io/helmforgedev/helm/dolibarr \
  --set mysql.auth.password=dbpassword \
  --set dolibarr.companyName="Example Corp"

Features

  • Official Dolibarr Image — based on the official dolibarr/dolibarr container
  • MySQL Subchart — bundled HelmForge MySQL dependency by default
  • External MySQL/MariaDB — connect to an existing managed database
  • Auto Installation — unattended setup through DOLI_* environment variables
  • Persistent Storage — separate PVCs for /var/www/documents and /var/www/html/custom
  • Ingress Support — configurable ingress with TLS for HTTPS access
  • Gateway API Support — optional HTTPRoute for clusters using Gateway API
  • S3 Backups — optional mysqldump CronJob for S3-compatible storage
  • Secret Preservation — admin, runtime, and database secrets preserved across upgrades via lookup
  • Network Isolation — ingress is limited to the named Dolibarr HTTP port by default
  • Runtime Validation — the chart verifies the real Apache listener and a Dolibarr HTTP response on k3d

Architecture

The chart runs one Dolibarr Deployment because its documents and custom-module volumes default to ReadWriteOnce. A named Service port routes to Apache, whose real listener is configured from containerPorts.http. The application connects either to the bundled HelmForge MySQL StatefulSet or to an operator-managed MySQL/MariaDB endpoint. See DESIGN.md for trust boundaries and design decisions.

Configuration

Minimal

mysql:
  enabled: true
  auth:
    password: "change-me"

dolibarr:
  companyName: "Example Corp"

Production

dolibarr:
  siteUrl: "https://erp.example.com"
  companyName: "Example Corp"
  companyCountryCode: "US"
  enableModules: "societe,produit,service,propal,commande,facture"

mysql:
  enabled: true
  auth:
    existingSecret: dolibarr-mysql
  standalone:
    persistence:
      size: 20Gi

persistence:
  documents:
    size: 20Gi
  custom:
    size: 5Gi

php:
  memoryLimit: 512M
  uploadMaxFilesize: 64M
  postMaxSize: 64M
  maxExecutionTime: "300"

ingress:
  enabled: true
  ingressClassName: traefik
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod
  hosts:
    - host: erp.example.com
      paths:
        - path: /
          pathType: Prefix
  tls:
    - secretName: dolibarr-tls
      hosts:
        - erp.example.com

External Database

mysql:
  enabled: false

database:
  mode: external
  external:
    host: mariadb.example.com
    port: 3306
    name: dolibarr
    username: dolibarr
    existingSecret: dolibarr-db
    existingSecretPasswordKey: password

Examples

Ready-to-adapt values files are available for common deployment models:

  • Simple bundled MySQL
  • Production with TLS and backups
  • External database

To validate an example before applying it:

helm template dolibarr . -f examples/production.yaml

Parameters

Upgrade to 24.0.3

Dolibarr 24.0.3 is a patch release on the 24.0 line. It fixes agenda assigned resources, supplier credit notes, leave credit calculations, CSRF protection, REST API line ordering, and multiple business workflows. Bundled MySQL subchart is updated to 2.4.2 per GR-074. Back up the database and both the documents and custom PVCs before upgrading. The 24.0 major-upgrade cautions still apply: review removed or renamed modules, hooks, configuration variables and integrations, then test the upgrade in staging before reusing production storage. In particular, the Login API is disabled by default in 24.0 unless API_ENABLE_LOGIN_API is enabled, so integrations that use it can stop authenticating.

Review the official Dolibarr 24.0.3 release notes and the 24.0.0 migration notes before production rollout.

Application

KeyDefaultDescription
dolibarr.siteUrl""Full external URL (auto-detected from ingress if empty)
dolibarr.companyNameDolibarrCompany name used during unattended setup
dolibarr.companyCountryCodeUSISO country code used during unattended setup
dolibarr.authdolibarrAuthentication backend
dolibarr.enableModules""Comma-separated modules enabled on first boot
dolibarr.installAutotrueEnable unattended installation
dolibarr.initDemofalseLoad demo data
dolibarr.prodtrueEnable production mode
dolibarr.timezoneUTCPHP timezone
containerPorts.http80Apache listener and pod HTTP port

Admin

KeyDefaultDescription
admin.loginadminAdmin login
admin.password""Admin password (auto-generated if empty)
admin.existingSecret""Existing secret for the admin password

Database

KeyDefaultDescription
database.modeautoDatabase mode (auto, external, mysql)
database.external.host""External MySQL/MariaDB host
database.external.port3306External database port
database.external.namedolibarrDatabase name
database.external.usernamedolibarrDatabase username
database.external.existingSecret""Existing secret for DB password
database.external.sslfalseEnable SSL for external DB connections

MySQL Subchart

KeyDefaultDescription
mysql.enabledtrueDeploy MySQL as a subchart
mysql.architecturestandaloneMySQL architecture
mysql.auth.databasedolibarrDatabase name
mysql.auth.usernamedolibarrDatabase username
mysql.standalone.persistence.size8GiMySQL PVC size
mysql.startupProbe.initialDelaySeconds30MySQL startup probe delay used to avoid false-positive bootstrap warnings

When upgrading from chart releases that used mysql.primary.*, migrate those values to mysql.standalone.*. The chart fails fast if mysql.primary is still present so persistence and resource settings are not silently ignored by the HelmForge MySQL 2.x dependency.

Persistence

KeyDefaultDescription
persistence.documents.enabledtruePersist /var/www/documents
persistence.documents.size8GiDocuments PVC size
persistence.custom.enabledtruePersist /var/www/html/custom
persistence.custom.size2GiCustom modules/themes PVC size

Ingress

KeyDefaultDescription
ingress.enabledfalseEnable ingress
ingress.ingressClassName""Ingress class (traefik, nginx, etc.)
ingress.hosts[]Ingress hosts and paths
ingress.tls[]TLS configuration

Network Policy and Service Account

KeyDefaultDescription
networkPolicy.enabledtrueRestrict inbound traffic to the named HTTP port
networkPolicy.ingressFrom[]Optional ingress peers; empty permits the HTTP port from any namespace
serviceAccount.createfalseCreate a dedicated ServiceAccount
serviceAccount.automountServiceAccountTokenfalseMount a Kubernetes API token in the application pod

Security

The pod does not receive a Kubernetes API token by default. A NetworkPolicy selects only the Dolibarr workload and exposes only its named HTTP port. Secrets generated by the chart are preserved with lookup, and their rendered checksum is included in the pod template so intentional value changes trigger a rollout.

The official image must start as root to perform first-run ownership and Apache setup, and it requires writable application paths. Consequently, runAsNonRoot and readOnlyRootFilesystem are not safe chart defaults. Apply a stricter securityContext only after validating a compatible derivative image and storage layout. TLS termination, external-database controls, Secret rotation, and egress restrictions remain operator responsibilities.

Security Scan: dolibarr

FrameworkScore
MITRE + NSA + SOC287.878784%
MITRE100.00%
NSA82.50%
SOC290.00%

The remaining findings reflect the official Dolibarr container's root-based bootstrap and writable application filesystem.

Troubleshooting

If the pod remains in Init, inspect the wait-for-db init-container logs and verify the selected database hostname, port, and Secret key. If readiness fails, confirm that containerPorts.http is free and inspect the generated Apache files:

kubectl logs deploy/dolibarr -c wait-for-db
kubectl logs deploy/dolibarr -c dolibarr
kubectl exec deploy/dolibarr -c dolibarr -- grep -E '^(Listen|<VirtualHost)' \
  /etc/apache2/ports.conf /etc/apache2/sites-available/000-default.conf

For missing uploads or modules, verify that both PVCs are Bound and that the corresponding existingClaim names are correct. For failed backups, inspect the CronJob-created Job and confirm the S3 endpoint, bucket, and credential Secret.

Notes

  • this chart intentionally supports MySQL/MariaDB only for automated setups
  • PostgreSQL is not included because the official container workflow is not equivalent to the unattended MySQL path
  • persist both documents and custom if you plan to keep generated artifacts, modules, or themes across upgrades
  • built-in Dolibarr cron is intentionally not enabled by this first chart release because it still needs a stable Kubernetes validation path
  • the default startup probe delay accounts for the initial database import performed by the official container on a fresh deployment

More Information

Deploy dolibarr with OpenTenant

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