Skip to main content

Passbolt on GKE Autopilot

Passbolt on GKE Autopilot

Passbolt (Community Edition) is a free, open-source, team-oriented password manager with GPG-based encryption and per-user/group credential sharing — AGPL-3.0 licensed, ~6k GitHub stars. It occupies a different niche from this catalog's Vaultwarden module: Vaultwarden is a personal/Bitwarden-compatible vault, while Passbolt is built around organization-wide GPG-encrypted credential sharing between users and groups. This module deploys the official passbolt/passbolt image on GKE Autopilot on top of the App_GKE foundation, which provisions and manages the shared Google Cloud and Kubernetes infrastructure.

This guide focuses on the cloud services Passbolt uses and how to explore and operate them from the Google Cloud Console and the command line. For the mechanics that are common to every GKE application — Workload Identity, ingress, autoscaling, CI/CD, Cloud Armor, IAP, Binary Authorization, VPC Service Controls, backups, and the deployment lifecycle — refer to the App_GKE foundation guide rather than repeating them here.


1. Overview

Passbolt runs as a single Apache/PHP pod on GKE Autopilot. The deployment wires together a focused set of Google Cloud services:

CapabilityGoogle Cloud serviceNotes
ComputeGKE AutopilotApache/PHP pod, port 80, 1 vCPU / 2Gi by default, min_instance_count = 1, max_instance_count = 1
DatabaseCloud SQL for MySQL (MYSQL_8_0)Required — Passbolt is a MySQL-only CakePHP application; discrete DATASOURCES_DEFAULT_* env vars, not a single DSN
Cryptographic stateTwo dedicated GCS-Fuse volumes (storage, jwt)Hold the vendor-self-generated GPG server keypair and JWT keypair — not Terraform-generated secrets
SecretsSecret ManagerOnly the database password is generated by the foundation — Passbolt itself contributes no secret at all (Passbolt_Common's secret_ids output is always empty)
IngressCloud Load BalancingExternal LoadBalancer Service by default, optional custom domain + managed certificate

Sensible defaults worth knowing up front:

  • MySQL is mandatory. database_type resolves to MYSQL_8_0 (fixed by Passbolt_Common); Passbolt is built on CakePHP with a MySQL-only schema.
  • No server-side application secret. Unlike WordPress (multiple salts) or Laravel-family apps (APP_KEY), Passbolt has no Terraform-generated encryption key at all. Its security model is entirely client-side: the browser extension generates a GPG keypair and master password locally during setup. The server's own GPG keypair (for encrypting data to Passbolt) and its JWT keypair (API auth tokens) are both self-generated by the vendor's own entrypoint on first boot and persisted on dedicated GCS-Fuse volumes — not created or rotated by Terraform.
  • Two purpose-built GCS-Fuse volumes, not one, and not the whole /etc/passbolt directory. storage mounts narrowly at /etc/passbolt/gpg; jwt mounts narrowly at /etc/passbolt/jwt. Mounting a single volume over all of /etc/passbolt would shadow baked-in config/PHP files (app.php, bootstrap.php, routes.php) that live directly in that directory in the image — the same class of bug this catalog previously hit with Cloudreve.
  • GCS Fuse mount options set explicit uid=33/gid=33 — a real GKE-specific bug fix, not a defensive default. Even though the passbolt/passbolt image's top-level container process runs as root, the vendor entrypoint's gpg_gen_key() function actually performs the key-export step as su ... www-data (uid=33/gid=33). GKE's GCS Fuse CSI driver — unlike Cloud Run's own gcsfuse integration — does not default to a writable mount for a non-root UID, so both volumes explicitly set uid=33/gid=33 (plus file-mode=0664/dir-mode=0775) to avoid EACCES on first boot. This was found and fixed live: the same bug class as a uid-1000 Node app hit elsewhere in this catalog on the same day — always verify the actual runtime UID of whatever process writes to a GCS-Fuse-mounted path, not just the image's declared USER.
  • HTTPS = "on" is always injected. Passbolt's bootstrap.php has $trustProxy = false hardcoded, so it does not honor X-Forwarded-Proto by default — but it does check the literal env('HTTPS') value directly. Since the GKE LoadBalancer terminates TLS at the edge and forwards plain HTTP to the pod, this static override makes Passbolt generate https:// URLs correctly in emails and absolute links.
  • enable_cloudsql_volume defaults to true here — matching Passbolt_Common's own default, and the opposite of Passbolt_CloudRun, whose top-level variable defaults false.
  • No first-visit web setup wizard. The only way an admin account exists is via the admin-bootstrap init job, which prints a one-time setup URL to its pod logs (surfaced in Cloud Logging) for the operator to open in a Passbolt-compatible browser extension.
  • No Redis. enable_redis = false by default — Passbolt has no Redis integration used by this module.

2. Google Cloud Services & How to Explore Them

All commands assume you have run gcloud container clusters get-credentials <cluster> --region <region> --project <project> and that PROJECT, REGION, and NAMESPACE are set. The namespace and other identifiers are reported in the deployment Outputs.

A. GKE Autopilot — the Passbolt workload

  • Console: Kubernetes Engine → Workloads → select the Passbolt workload to see pods, revisions, and events. Kubernetes Engine → Services & Ingress shows the external IP.
  • CLI:
    kubectl get pods,svc -n "$NAMESPACE"
    kubectl logs -n "$NAMESPACE" deploy/<service-name> --tail=100

See App_GKE for how Autopilot and the workload type (Deployment vs StatefulSet) are managed.

B. Cloud SQL for MySQL

Passbolt stores all application data — users, groups, folders, encrypted password resources, sharing permissions — in a managed Cloud SQL MySQL 8.0 instance. Pods reach it through the Cloud SQL Auth Proxy sidecar over a loopback TCP connection (127.0.0.1) by default (enable_cloudsql_volume = true). The connection uses Passbolt's own discrete env var names (DATASOURCES_DEFAULT_HOST/_USERNAME/_PASSWORD/_DATABASE, confirmed against the vendor's own /passbolt/env.sh), aliased from the Foundation's standard DB_* values by the Application Module.

  • Console: SQL → select the instance for connections, backups, flags, and metrics.
  • CLI:
    gcloud sql instances list --project "$PROJECT"
    gcloud sql instances describe <instance-name> --project "$PROJECT"
    gcloud sql connect <instance-name> --user=<db-user> --database=<db-name> --project "$PROJECT"

See App_GKE for the connection model, automated backups, and password rotation.

C. Cloud Storage — the GPG and JWT keypair volumes

Two GCS buckets are provisioned by Passbolt_Common and mounted via the GCS Fuse CSI driver: storage at /etc/passbolt/gpg, jwt at /etc/passbolt/jwt, both with explicit uid=33/gid=33 mount options (see Overview). These hold the vendor-self-generated server GPG keypair and JWT keypair, both generated once on first boot and reused on every subsequent boot. Losing either bucket invalidates every credential Passbolt has encrypted server-side and every issued JWT session.

  • Console: Cloud Storage → find the two buckets (names include storage and jwt suffixes).
  • CLI:
    gsutil ls -p "$PROJECT" | grep passbolt
    gsutil ls gs://<storage-bucket-name>/ # expect serverkey.asc, serverkey_private.asc

D. Secret Manager

Passbolt itself contributes no secret — the only Secret Manager entry related to this deployment is the database password, managed by the Foundation.

  • Console: Security → Secret Manager.
  • CLI:
    gcloud secrets list --project "$PROJECT" --filter="name~passbolt"

E. Networking & ingress

By default the workload is exposed through an external Cloud Load Balancing IP (service_type = LoadBalancer). A custom domain with a Google-managed certificate can be enabled, and a static IP is reserved by default (reserve_static_ip = true) so the address survives redeploys.

  • Console: Network services → Load balancing; VPC network → IP addresses.
  • CLI:
    kubectl get svc -n "$NAMESPACE"
    gcloud compute addresses list --project "$PROJECT"

See App_GKE for custom domains, Cloud CDN, and static IP details.

F. Cloud Logging & Monitoring

Pod stdout/stderr flow to Cloud Logging — including the admin-bootstrap init job's one-time setup URL output. GKE and Cloud SQL metrics flow to Cloud Monitoring, with optional uptime checks and alert policies.

  • Console: Logging → Logs Explorer; Monitoring → Dashboards / Alerting.
  • CLI:
    gcloud logging read 'resource.type="k8s_container" AND resource.labels.namespace_name="'"$NAMESPACE"'"' \
    --project "$PROJECT" --limit 50

3. Passbolt Application Behaviour

  • The 2-stage initialization job chain, and why the second job is genuinely non-trivial. Passbolt_Common defines two ordered Kubernetes Jobs, both with execute_on_apply = true:

    1. db-init (mysql:8.0-debian) — creates the MySQL role and database (the shared catalog-wide db-init.sh, caching_sha2_password-safe).

    2. admin-bootstrap (passbolt/passbolt:<version>, depends_on_jobs = ["db-init"], mounts the storage and jwt volumes) — registers the initial admin account.

      Kubernetes Jobs invoke a container's command/args directly, bypassing the vendor's own /docker-entrypoint.sh chain entirely — so a bare cake passbolt register_user on a freshly-provisioned container fails with an Internal Error 500, because the GPG server keypair (normally generated during the vendor entrypoint's own boot sequence) doesn't exist yet, and the schema hasn't been installed either. The job instead sources the vendor's own entrypoint functions (/passbolt/entrypoint.sh, /passbolt/env.sh, /passbolt/deprecated_paths.sh), generates/imports the GPG server keypair if missing, generates a self-signed SSL cert if missing, runs the vendor's own install() function (which also handles JWT keypair generation and the database schema install/migrate), and only then runs cake passbolt register_user -u <admin_email> -f <admin_first_name> -l <admin_last_name> -r adminwithout the -q/quiet flag, so the one-time setup URL is printed and lands in the job pod's logs. Confirmed against the real vendor /passbolt/entrypoint.sh source. Idempotent: gpg_gen_key/install() no-op once the keys and schema already exist from a prior run.

    On GKE, execute_on_apply = false (if ever set on a custom job) would only stop Terraform from waiting for the job — the underlying Kubernetes Job/pod is still created and scheduled immediately either way. Correctness of the db-initadmin-bootstrap ordering here relies on depends_on_jobs (App_GKE's job dependency system), not on apply-time sequencing.

  • No first-visit setup wizard, and a genuinely different bootstrap model from most apps in this catalog. Passbolt requires the client (a browser extension) to generate its own GPG keypair and master password — there is no server-side password to seed and nothing to retrieve from Secret Manager. Retrieve the one-time setup URL instead:

    kubectl get jobs -n "$NAMESPACE"
    kubectl logs -n "$NAMESPACE" job/<admin-bootstrap-job-name> | grep '/setup/start/'
  • Health endpoint. GET /healthcheck/status.json returns an unauthenticated 200 with {"header":{"status":"success",...},"body":"OK"} once ready — confirmed via local container testing and live deployment. Both the container-level startup_probe/liveness_probe target this path by default.

  • Inspect job execution:

    kubectl get jobs -n "$NAMESPACE"
    kubectl logs -n "$NAMESPACE" job/<job-name>

4. Configuration Variables

Variables are grouped exactly as they appear on the deployment platform. Only settings specific to or notable for Passbolt are listed; every other input is inherited from App_GKE with its standard behaviour and defaults.

Group 1 — Project & Identity

VariableDefaultDescription
project_id(required)Target Google Cloud project.
regionus-central1Region for the workload and regional resources.

Group 2 — Deployment Environment

VariableDefaultDescription
tenant_deployment_iddemoShort suffix that makes resource names unique per environment. Use a distinct value (e.g. gke) from any co-deployed Passbolt_CloudRun (cr) to avoid a naming collision.
support_users[]Emails granted project access and monitoring alerts.
resource_labels{}Labels applied to all resources.

Group 3 — Application & Database Identity

VariableDefaultDescription
application_namepassboltBase name for resources. Do not change after first deploy.
application_display_namePassboltHuman-readable name shown in the Console.
application_versionlatestpassbolt/passbolt image tag.
admin_emailadmin@example.comEmail for the admin account registered by admin-bootstrap.
admin_first_name / admin_last_nameAdmin / UserName fields for the initial admin account.
enable_gcs_storage_volumetrueMounts the storage (GPG) and jwt GCS-Fuse volumes. Keep enabled.

Group 4 — Runtime & Scaling

VariableDefaultDescription
container_image_sourceprebuiltDeploys the official image directly; Passbolt only supports the prebuilt image.
cpu_limit1000m1 vCPU.
memory_limit2GiMemory limit — PHP 8.x + Apache.
container_port80Passbolt (Apache) listens here.
min_instance_count1Minimum pod replicas.
max_instance_count1Maximum pod replicas.
enable_cloudsql_volumetrueCloud SQL Auth Proxy sidecar. Passbolt's DATASOURCES_DEFAULT_HOST alias resolves to the sidecar's loopback address when enabled.
enable_image_mirroringtrueMirrors the Passbolt image into Artifact Registry.

Group 6 — GKE Backend Configuration

VariableDefaultDescription
service_typeLoadBalancerHow the Kubernetes Service is exposed.
workload_typenull (resolves to Deployment)"Deployment" or "StatefulSet".
session_affinityClientIPSession affinity for the Kubernetes Service.
namespace_name"" (auto-generated)Kubernetes namespace.

Group 13 — NFS

VariableDefaultDescription
enable_nfstrueProvisions a Filestore volume. Not used by Passbolt's own persistence model — the GPG/JWT keypairs live on dedicated GCS-Fuse volumes and everything else is in MySQL. Harmless generic default.

Group 14 — Cloud Storage

VariableDefaultDescription
gcs_volumes[]Additional GCS buckets to mount via the GCS Fuse CSI driver, on top of the two Passbolt provisions automatically (storage, jwt).

Group 16 — Database Configuration

VariableDefaultDescription
database_typenull (resolves to MYSQL_8_0)Cloud SQL engine. Passbolt requires MySQL.
application_database_namepassboltMySQL database name.
application_database_userpassboltMySQL application user.
database_password_length32Generated password length (16–64).

Group 11 — Workload Automation

VariableDefaultDescription
initialization_jobs[]Leave empty for Passbolt_Common's default 2-job chain (db-initadmin-bootstrap). A non-empty list replaces it entirely.
cron_jobs[]Passbolt has no platform-scheduled recurring tasks by default.

Group 10 — Observability & Health

VariableDefaultDescription
startup_probe / liveness_probeHTTP /healthcheck/status.jsonContainer-level probes, passed through Passbolt_Common.
startup_probe_config / health_check_configFoundation LoadBalancer-level probesPath "/" by default — distinct from the container-level probes above.
uptime_check_config{ enabled=false, path="/" }Cloud Monitoring uptime check.

Group 15 — Redis

VariableDefaultDescription
enable_redisfalseNot used by Passbolt. Present for platform compatibility.

Group 19 — Custom Domain, Static IP & Networking

VariableDefaultDescription
enable_custom_domaintrueProvision Ingress for custom hostnames.
reserve_static_iptrueReserve a stable global static IP — recommended so the service address doesn't shift on redeploy.

Every other input (Module Metadata, Environment Variables & Secrets, CI/CD & GitHub Integration, Custom SQL, IAP & Cloud Armor, StatefulSet Configuration, VPC Service Controls, Reliability Policies) is inherited from App_GKE with its standard behaviour — see App_GKE for the full, group-organized list.


5. Outputs

Returned on a successful deployment — the quickest way to locate and explore the running resources.

OutputDescription
service_nameKubernetes Service name.
namespaceNamespace the workload runs in.
service_cluster_ip / service_external_ipIn-cluster ClusterIP / external LoadBalancer IP.
service_urlURL to reach Passbolt.
database_instance_nameCloud SQL instance name.
database_name / database_userApplication database name / user.
database_password_secretSecret Manager secret holding the DB password.
database_host / database_portDB endpoint (127.0.0.1 via the Auth Proxy sidecar) / port.
storage_bucketsThe storage (GPG) and jwt GCS buckets.
container_imageDeployed image.
initialization_jobsNames of the created init jobs (db-init, admin-bootstrap).
kubernetes_readyWhether the cluster endpoint is available and all workload resources are deployed. false on the first apply of a new inline cluster — a re-run completes the deployment.
deployment_id / tenant_id / resource_prefixNaming identifiers.
project_id / project_numberProject identifiers.

6. Configuration Pitfalls & Sensible Defaults

Risk: Critical (data loss / outage / security) — High (service degraded) — Medium (cost or partial degradation) — Low (minor).

Inherited plan-time validation. This module passes its configuration through the App_GKE foundation engine, which validates values and combinations at plan time. Invalid configuration fails the plan with a clear, named error before any resource is created.

SettingSensible valueRiskConsequence if wrong
database_typeresolves to MYSQL_8_0CriticalPassbolt's CakePHP schema is MySQL-only — any other engine breaks startup entirely.
enable_gcs_storage_volumetrueCriticalDisabling loses the persistent volumes for the self-generated GPG server keypair and JWT keypair — every credential Passbolt has encrypted server-side, and every issued JWT session, becomes unrecoverable on the next pod restart.
GCS Fuse uid=33/gid=33 mount optionsAlready set in Passbolt_Common — do not remove if customizing gcs_volumesCriticalWithout them, www-data (the uid the vendor entrypoint's key-generation step actually runs as) gets EACCES: permission denied writing the GPG/JWT key files on first boot, and the pod never becomes genuinely usable even if it reports Ready.
initialization_jobs order (db-initadmin-bootstrap)Leave [] unless you fully understand the dependencyCriticalThe admin-bootstrap job's replication of the vendor's own GPG-key-generation/schema-install sequence is load-bearing — a naive replacement job that just runs cake passbolt register_user directly fails with an Internal Error because the GPG server keypair and schema don't exist yet. On GKE, execute_on_apply=false does NOT delay pod scheduling — only Terraform's wait — so the ordering guarantee comes entirely from depends_on_jobs.
enable_cloudsql_volumetrue (this variant's default)HighThe Auth Proxy sidecar is the intended MySQL connectivity path on GKE.
reserve_static_iptrueMediumWithout a reserved static IP, the external LoadBalancer address can change across redeploys, breaking any bookmarked URL or DNS record pointed at it.
admin_email / admin_first_name / admin_last_nameSet intentionally before first deployMediumThese seed the one and only admin account the admin-bootstrap job creates; there is no in-app way to change them after the fact except through Passbolt's own admin UI once logged in.
No admin password to lose track ofUnlike most apps in this catalog, there is no Secret-Manager-held admin credential to retrieve. If the one-time setup URL is missed and expires, the fix is re-running the admin-bootstrap job (idempotent for the GPG/JWT/schema steps; check Passbolt's own CLI docs for re-issuing a setup link for register_user).

For the foundation behaviour referenced throughout — Workload Identity, autoscaling, ingress and certificates, CI/CD, Cloud Armor, IAP, Binary Authorization, VPC-SC, backups, and image mirroring — see App_GKE. Passbolt-specific application configuration shared with the Cloud Run variant is described in Passbolt_Common.