Choosing services

Secrets

Environment and mounted files, encrypted in Postgres, Supabase Vault, HashiCorp Vault / OpenBao, AWS Secrets Manager, Azure Key Vault or Google Secret Manager, with secret:// references.

Credentials for the other providers (storage keys, SMTP passwords, client secrets, API keys, even ENCRYPTION_KEY) can live in a secret store instead of the environment or the database. Any provider option can be a reference, secret://name or secret://name#field. Resolved values are cached for SECRETS_CACHE_TTL_SECONDS (default 300), so rotations are picked up without a restart.

OptionSECRETS_PROVIDEROn-premAWSAzureGoogle CloudSwitch
Environment, <VAR>_FILE, a mounted secrets directoryenv (default)yesyes: ECS secrets, mounted filesyes: Container Apps secretsyes: Cloud Run secret volumesconfig
Encrypted in Postgres (secrets.<name> instance settings)dbyesyesyesyesconfig
Supabase Vaultsupabase_vaultwith a Supabase database———config
HashiCorp Vault / OpenBao (KV v2)hashicorp_vaultyescompatible: HCP Vaultcompatiblecompatibleconfig
AWS Secrets Manageraws_secrets_manager—native——config
Azure Key Vaultazure_key_vault——native—config
Google Secret Managergcp_secret_manager———native, with regional endpointsconfig

When to pick which

  • Environment / mounted files when your platform already injects secrets (Kubernetes Secrets, ECS task definitions, Docker secrets).
  • Your cloud's secret store when the app runs in that cloud: it reaches the store with its own identity, and rotation and audit happen there.
  • Vault / OpenBao on premises, or when one store serves several clouds.
  • db for small installs that want secrets out of the environment without another service.

Rules

  • SDKs: aws_secrets_manager, azure_key_vault and gcp_secret_manager need their optional SDK, included in the Docker image by default (Optional drivers).
  • Keep the store in the app's cloud (see multi-cloud). Credentials for other clouds then become references in it.
  • supabase_vault needs the Supabase database. Move secrets elsewhere before moving the database.
  • The switch checks that every secret:// reference in every area resolves in the new store before it writes anything.
  • Secret values are never printed by status, doctor or the switch log.
bash
usertasks-admin switch secrets --to hashicorp_vault --set vault_addr=https://vault.internal:8200 --dry-run

Reference: Secrets.