Passbolt on Google Cloud Run
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 Cloud Run v2 on top of the
App_CloudRun foundation, which provisions and manages the
shared Google Cloud 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 common to every Cloud Run application — service identity, ingress and load balancing, scaling and concurrency, CI/CD, Cloud Armor, IAP, Binary Authorization, VPC Service Controls, backups, and the deployment lifecycle — refer to the App_CloudRun foundation guide rather than repeating them here.
1. Overview
Passbolt runs as a single Apache/PHP container on Cloud Run v2. The deployment wires together a focused set of Google Cloud services:
| Capability | Google Cloud service | Notes |
|---|---|---|
| Compute | Cloud Run v2 | Apache/PHP container, port 80, 1 vCPU / 2Gi by default, min_instance_count = 0 (scale-to-zero) |
| Database | Cloud SQL for MySQL (MYSQL_8_0) | Required — Passbolt is a MySQL-only CakePHP application; discrete DATASOURCES_DEFAULT_* env vars, not a single DSN |
| Cryptographic state | Two dedicated GCS buckets (storage, jwt) | Hold the vendor-self-generated GPG server keypair and JWT keypair — not Terraform-generated secrets |
| Secrets | Secret Manager | Only the database password is generated by the foundation — Passbolt itself contributes no secret at all (Passbolt_Common's secret_ids output is always empty) |
| Ingress | Cloud Run URL / Cloud Load Balancing | Default run.app URL; optional external HTTPS load balancer + custom domain |
Sensible defaults worth knowing up front:
- MySQL is mandatory.
database_type = "MYSQL_8_0"is fixed byPassbolt_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 volumes — not created or rotated by Terraform. - Two purpose-built GCS volumes, not one, and not the whole
/etc/passboltdirectory.storagemounts narrowly at/etc/passbolt/gpg;jwtmounts narrowly at/etc/passbolt/jwt. Mounting a single volume over all of/etc/passboltwould 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. HTTPS = "on"is always injected. Passbolt'sbootstrap.phphas$trustProxy = falsehardcoded, so it does not honorX-Forwarded-Protoby default — but it does check the literalenv('HTTPS')value directly. Since Cloud Run terminates TLS at the edge and forwards plain HTTP to the container, this static override makes Passbolt generatehttps://URLs correctly in emails and absolute links.enable_cloudsql_volumedefaults tofalseat this module's variable level — asymmetric withPassbolt_GKE, where it defaultstrue(both matchPassbolt_Common's own default oftrue). Set it explicitly totruefor socket-based MySQL connections on Cloud Run.- No first-visit web setup wizard. The only way an admin account exists is
via the
admin-bootstrapinit job, which prints a one-time setup URL to Cloud Logging for the operator to open in a Passbolt-compatible browser extension. - No Redis.
enable_redis = falseby default — Passbolt has no Redis integration used by this module.
2. Google Cloud Services & How to Explore Them
All commands assume PROJECT and REGION are set. Service and resource names
are reported in the deployment Outputs.
A. Cloud Run — the Passbolt service
- Console: Cloud Run → select the service for revisions, traffic, logs, and metrics.
- CLI:
gcloud run services list --project "$PROJECT" --region "$REGION"
gcloud run services describe <service-name> --project "$PROJECT" --region "$REGION"
gcloud run revisions list --service <service-name> --project "$PROJECT" --region "$REGION"
See App_CloudRun for scaling, concurrency, execution environment, and traffic splitting.
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. The database 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, 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_CloudRun for the connection model, backups, and password rotation.
C. Cloud Storage — the GPG and JWT keypair volumes
Two GCS buckets are provisioned by Passbolt_Common and mounted via GCS Fuse:
storage at /etc/passbolt/gpg, jwt at /etc/passbolt/jwt. These are not
generic upload/media buckets — they 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
storageandjwtsuffixes). - 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
The service is reachable at its run.app URL by default. An external HTTPS
load balancer with a custom domain, Cloud CDN, and Cloud Armor can be layered
on; ingress settings and VPC egress control connectivity.
- Console: Cloud Run (service URL); Network services → Load balancing.
- CLI:
gcloud run services describe <service-name> --region "$REGION" --format='value(status.url)'
See App_CloudRun.
F. Cloud Logging & Monitoring
Container logs flow to Cloud Logging — including the admin-bootstrap init
job's one-time setup URL output. Cloud Run and Cloud SQL metrics flow to Cloud
Monitoring, with optional uptime checks and alert policies.
- Console: Logging → Logs Explorer; Monitoring → Dashboards / Alerting.
- CLI:
gcloud run services logs read <service-name> --project "$PROJECT" --region "$REGION" --limit 50
3. Passbolt Application Behaviour
-
The 2-stage initialization job chain, and why the second job is genuinely non-trivial.
Passbolt_Commondefines two ordered Cloud Run Jobs, both withexecute_on_apply = true:-
db-init(mysql:8.0-debian) — creates the MySQL role and database (the shared catalog-widedb-init.sh,caching_sha2_password-safe). -
admin-bootstrap(passbolt/passbolt:<version>,depends_on_jobs = ["db-init"]) — registers the initial admin account.Cloud Run Jobs invoke a container's
command/argsdirectly, bypassing the vendor's own/docker-entrypoint.shchain entirely — so a barecake passbolt register_useron 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 owninstall()function (which also handles JWT keypair generation and the database schema install/migrate), and only then runscake passbolt register_user -u <admin_email> -f <admin_first_name> -l <admin_last_name> -r admin— without the-q/quiet flag, so the one-time setup URL is printed and lands in Cloud Logging. Confirmed against the real vendor/passbolt/entrypoint.shsource. Idempotent:gpg_gen_key/install()no-op once the keys and schema already exist from a prior run.
-
-
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:
gcloud logging read \
'resource.type="cloud_run_job" AND resource.labels.job_name~admin-bootstrap' \
--project "$PROJECT" --limit 20 --format='value(textPayload)' | grep '/setup/start/' -
Health endpoint.
GET /healthcheck/status.jsonreturns an unauthenticated200with{"header":{"status":"success",...},"body":"OK"}once ready — confirmed via local container testing and live deployment. Both the startup and liveness probes target this path by default. -
Inspect job execution:
gcloud run jobs list --project "$PROJECT" --region "$REGION"
gcloud run jobs executions list --job <job-name> --project "$PROJECT" --region "$REGION"
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_CloudRun with its standard behaviour.
Group 1 — Project & Identity
| Variable | Default | Description |
|---|---|---|
project_id | (required) | Target Google Cloud project. |
region | us-central1 | Region for the service and regional resources. |
Group 2 — Deployment Environment
| Variable | Default | Description |
|---|---|---|
tenant_deployment_id | demo | Short suffix that makes resource names unique per environment. Use a distinct value (e.g. cr) from any co-deployed Passbolt_GKE (gke) to avoid a naming collision. |
support_users | [] | Emails granted project access and monitoring alerts. |
resource_labels | {} | Labels applied to all resources. |
Group 3 — Application Identity
| Variable | Default | Description |
|---|---|---|
application_name | passbolt | Base name for resources. Do not change after first deploy. |
display_name | Passbolt | Human-readable name shown in the Console. |
application_version | latest | passbolt/passbolt image tag. |
admin_email | admin@example.com | Email for the admin account registered by admin-bootstrap. |
admin_first_name / admin_last_name | Admin / User | Name fields for the initial admin account. |
enable_gcs_storage_volume | true | Mounts the storage (GPG) and jwt GCS volumes. Keep enabled. |
Group 4 — Runtime & Scaling
| Variable | Default | Description |
|---|---|---|
deploy_application | true | Set false to provision infrastructure only. |
container_image_source | prebuilt | Deploys the official image directly; Passbolt only supports the prebuilt image. |
cpu_limit | 1000m | 1 vCPU. |
memory_limit | 2Gi | Memory limit — PHP 8.x + Apache. |
min_instance_count | 0 | Scale-to-zero by default. |
max_instance_count | 1 | Single instance by default. |
container_port | 80 | Passbolt (Apache) listens here. |
execution_environment | gen2 | Required execution environment. |
enable_cloudsql_volume | false | Asymmetric with Passbolt_GKE's default of true. Set true for socket-based MySQL connections — Passbolt's DATASOURCES_DEFAULT_HOST accepts the socket directory directly. |
cloudsql_volume_mount_path | /cloudsql | Container path for the Auth Proxy socket. |
container_protocol | http1 | "http1" or "h2c". |
enable_image_mirroring | true | Mirrors the Passbolt image into Artifact Registry. |
Group 5 — Access & Networking
| Variable | Default | Description |
|---|---|---|
ingress_settings | all | Traffic ingress control. |
vpc_egress_setting | PRIVATE_RANGES_ONLY | VPC egress control. |
enable_iap | false | Identity-Aware Proxy. |
Group 6 — Environment Variables & Secrets
| Variable | Default | Description |
|---|---|---|
environment_variables | {} | Extra non-secret settings. HTTPS = "on" and (when known) APP_FULL_BASE_URL are set automatically. |
secret_environment_variables | {} | Map of env var → Secret Manager secret name. Passbolt itself contributes none. |
Group 11 — Cloud Storage
| Variable | Default | Description |
|---|---|---|
gcs_volumes | [] | Additional GCS buckets to mount, on top of the two Passbolt provisions automatically (storage, jwt). |
enable_nfs | true | Provisions a Filestore volume. Not used by Passbolt's own persistence model — the GPG/JWT keypairs live on dedicated GCS volumes and everything else is in MySQL. Harmless generic default. |
Group 12 — Database Backend
| Variable | Default | Description |
|---|---|---|
database_type | MYSQL_8_0 | Cloud SQL engine. Passbolt requires MySQL. |
db_name | passbolt | MySQL database name. |
db_user | passbolt | MySQL application user. |
database_password_length | 32 | Generated password length (16–64). |
db_host_env_var_name / db_user_env_var_name / db_name_env_var_name / db_password_env_var_name | DATASOURCES_DEFAULT_HOST / _USERNAME / _DATABASE / _PASSWORD | Set by passbolt.tf, not user-facing — Passbolt reads discrete CakePHP/PDO env var names, not the Foundation's standard DB_* names. |
Group 13 — Jobs & Scheduled Tasks
| Variable | Default | Description |
|---|---|---|
initialization_jobs | [] | Leave empty for Passbolt_Common's default 2-job chain (db-init → admin-bootstrap). A non-empty list replaces it entirely. |
cron_jobs | [] | Passbolt has no platform-scheduled recurring tasks by default. |
Group 14 — Observability & Health
| Variable | Default | Description |
|---|---|---|
startup_probe | HTTP /healthcheck/status.json, 20s delay, 20 retries | Passbolt's unauthenticated status endpoint. |
liveness_probe | HTTP /healthcheck/status.json, 60s delay | Same endpoint. |
uptime_check_config | { enabled=false, path="/" } | Cloud Monitoring uptime check. |
Group 21 — Redis
| Variable | Default | Description |
|---|---|---|
enable_redis | false | Not used by Passbolt. Present for platform compatibility. |
Group 22 — VPC Service Controls & Audit Logging
Standard App_CloudRun VPC-SC integration — see App_CloudRun.
5. Outputs
Returned on a successful deployment — the quickest way to locate and explore the running resources.
| Output | Description |
|---|---|
service_name | Cloud Run service name. |
service_url | Default run.app URL of the service. |
service_location | Region the service runs in. |
database_instance_name | Cloud SQL instance name. |
database_name / database_user | Application database name / user. |
database_password_secret | Secret Manager secret holding the DB password. |
database_host / database_port | DB endpoint / port. |
storage_buckets | The storage (GPG) and jwt GCS buckets. |
container_image | Deployed image. |
initialization_jobs | Names of the created init jobs (db-init, admin-bootstrap). |
deployment_id / tenant_id / resource_prefix | Naming identifiers. |
project_id / project_number | Project identifiers. |
cicd_enabled / github_repository_url | CI/CD status. |
vpc_sc_enabled / vpc_sc_perimeter_name / vpc_sc_dry_run_mode | VPC-SC status. |
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_CloudRun 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.
| Setting | Sensible value | Risk | Consequence if wrong |
|---|---|---|---|
database_type | MYSQL_8_0 | Critical | Passbolt's CakePHP schema is MySQL-only — any other engine breaks startup entirely. |
enable_gcs_storage_volume | true | Critical | Disabling 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 container restart. |
initialization_jobs order (db-init → admin-bootstrap) | Leave [] unless you fully understand the dependency | Critical | The 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. |
enable_cloudsql_volume | true (note: defaults false on this variant) | Medium | Passbolt's DATASOURCES_DEFAULT_HOST works over the Cloud SQL Auth Proxy Unix socket directly; leaving this at its Cloud-Run-side default of false uses direct TCP instead, which still works but forgoes the socket's TLS termination and matches neither Passbolt_Common's own default nor the GKE variant. |
admin_email / admin_first_name / admin_last_name | Set intentionally before first deploy | Medium | These 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 of | — | — | Unlike 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 deleting and re-running the admin-bootstrap job (it is idempotent for the GPG/JWT/schema steps, but register_user itself may need a fresh invocation for a new URL — check Passbolt's own CLI docs for re-issuing a setup link). |
For the foundation behaviour referenced throughout — service identity, scaling and concurrency, ingress and load balancing, CI/CD, Cloud Armor, IAP, Binary Authorization, VPC-SC, backups, and image mirroring — see App_CloudRun. Passbolt-specific application configuration shared with the GKE variant is described in Passbolt_Common.